### Example file path Source: https://docs.sofistik.com/2025/en/cdb_interfaces/vba/examples/vba_example2.html Location of the example files within the SOFiSTiK installation directory. ```text C:\\2024\SOFiSTiK 2024\interfaces\examples\vba\read_nodes ``` -------------------------------- ### Locate Python Example Source: https://docs.sofistik.com/2025/en/cdb_interfaces/python/examples/python_example5.html Path to the example project within the SOFiSTiK installation directory. ```text C:\\2024\SOFiSTiK 2024\interfaces\examples\python\python_3.x\number2text ``` -------------------------------- ### Locate Interface Examples Source: https://docs.sofistik.com/2025/en/cdb_interfaces/introduction/about_cdb/structure.html Path to the directory containing language-specific interface examples. ```text C:\\2024\SOFiSTiK 2024\interfaces\examples\ ``` -------------------------------- ### Locate Python CDB Example Source: https://docs.sofistik.com/2025/en/cdb_interfaces/python/examples/python_example1.html Path to the directory containing the connect_to_cdb.py example file. ```text C:\\2024\SOFiSTiK 2024\interfaces\examples\python\python_3.x\connect_to_cdb ``` -------------------------------- ### SOFiSTiK 2025 Installation Configuration JSON Source: https://docs.sofistik.com/2025/en/administration/_downloads/c4889a60a69d971d856e5355dd28f7d2/sample_install.json Defines the installation path, product MSI parameters, and the command line sequence for installing SOFiSTiK 2025 components. ```json { "target_directory": "C:\\Program Files\\SOFiSTiK", "product_msi_parameters": [ "revit_rxa_2025", [], "cadx_2025", [], "soficad_2025", [ "CURRENT_AUTOCAD", "SOFTWARE\\Autodesk\\AutoCAD\\R24.2\\ACAD-6101:409", "ACAD_ID", "ACAD", "ACADDIR", "C:\\Program Files\\Autodesk\\AutoCAD 2025" ], "sofiplus_2025", [ "ACADDIR", "C:\\Program Files\\Autodesk\\AutoCAD 2025", "ACAD_ID", "ACAD", "CURRENT_AUTOCAD", "SOFTWARE\\Autodesk\\AutoCAD\\R24.0\\ACAD-4101:409" ] ], "language": "en", "cmdline_to_install": [ "codemeter", "webview2", "vc_redist_2022_x64", "windowsdesktop_runtime_win_x64", "sofistik_core_services", "sofistik_2025", "sofiplus_2025", "soficad_2025", "soficad_oem_deu_2025", "sofiplus_x_enu_2025", "revit_rxa_2025" ], "cmdline_to_remove": [ ] } ``` -------------------------------- ### Example SOFISTIK.DEF Configuration Source: https://docs.sofistik.com/2025/en/fea/basic/def_env_variable.html A sample configuration file defining various environment variables for SOFiSTiK programs. ```text SOFISTIK_C=49 GRAFSIZE=SIZE -HP 0 HEAD1=New HQ of Xyz-Insurance-Company CDBASEVER=503 ``` -------------------------------- ### Connect to CDB in VB.NET Source: https://docs.sofistik.com/2025/en/cdb_interfaces/vb_net/examples/vb_net_example1.html Full example demonstrating how to set environment variables, initialize the CDB connection, check status, and close the database. ```vbnet Imports System.Runtime.InteropServices Module main 'In this example, 64bit DLLs are used Public Declare Function sof_cdb_init Lib "sof_cdb_w-2024.dll" Alias "VB_sof_cdb_init" ( ByVal name As String, ByVal InitType As Integer ) As Integer Public Declare Function sof_cdb_status Lib "sof_cdb_w-2024.dll" Alias "VB_sof_cdb_status" ( ByVal Index As Integer ) As Integer Public Declare Function sof_cdb_close Lib "sof_cdb_w-2024.dll" Alias "VB_sof_cdb_close" ( ByVal Index As Integer ) As Integer Sub Main() Dim Filename As String Dim Index As Integer Dim Path As String Dim analysisPath As String Dim analysisPath2 As String 'Path of the SOFiSTIK Directory analysisPath = "C:\sofistik_installation\trunk\SOFiSTiK trunk\interfaces\64bit" analysisPath2 = "C:\sofistik_installation\trunk\SOFiSTiK trunk" 'Set the environment variable Path = Environment.GetEnvironmentVariable("path") Path = analysisPath2 + ";" + analysisPath + ";" + Path Environment.SetEnvironmentVariable("path", Path) 'Filename = full path with name of the cdb Filename = "S:\test\test.cdb" ' To connect to the CDB we will use Index = sof_cdb_init(Filename, 99) If Index < 0 Then Console.WriteLine("ERROR: Index= " & Index & " < 0 - see clib1.h for meaning of error codes") Console.ReadKey() Exit Sub ElseIf Index = 0 Then Console.WriteLine("ERROR: Index= " & Index & " - The File is not a database") Console.ReadKey() Exit Sub End If ' Output the index and status Console.WriteLine("Index: " & Index) 'This outputs the status of the CDB, please refer to cdbase.chm for more details Console.WriteLine("CDB Status: " & sof_cdb_status(Index)) ' Close the CDB Call sof_cdb_close(0) 'Check if CDB closed succesfully If sof_cdb_status(Index) = 0 Then Console.WriteLine("CDB closed succesfully, status = 0") End If ' Press any key to close the program Console.Write("Press any to close the program") Console.ReadKey() End Sub End Module ``` -------------------------------- ### Execute Silent Installation via Command Line Source: https://docs.sofistik.com/2025/en/administration/installation/inst_silent.html Run the sam_apply.exe executable with a JSON configuration file to perform a silent installation. ```batch "C:\Program Files\SOFiSTiK\common\SOFiSTiK Application Manager (SAM)\sam_apply.exe" --cli-input-json "C:\sofistik_mirror\sample_install.json" ``` -------------------------------- ### Locate C# Single Span Girder Example Source: https://docs.sofistik.com/2025/en/cdb_interfaces/c_sharp/examples/c_sharp_example4.html Path to the project files for the single span girder example within the SOFiSTiK installation directory. ```text C:\\2024\SOFiSTiK 2024\interfaces\examples\c#\single_span_girder ``` -------------------------------- ### Connect to CDB Example Source: https://docs.sofistik.com/2025/en/cdb_interfaces/fortran/examples/fortran_example1.html Demonstrates the basic workflow of initializing a connection to a CDB file, checking its status, and closing it. Ensure the CDB path is correctly specified for your environment. ```fortran program connect_to_CDB implicit none ! Variables integer :: nid, l, ie, index, istat character(len=30) :: filename character(len=72) :: text index = 99 ! input here the CDB name or the CDB path filename = "S:\test\connect_to_cdb.cdb" ! Connect to CDB ! In this example 64bit debug DLL is used call cdinit(filename, index) if (nid > 0) then write(*,*) " cdb_init of ", filename," succesfull ", nid else write(*,*) " cdb_init of ", filename," not succesfull ", nid endif ! Check status call cdstat(index, istat) print *, "CDB status is: ", istat ! Lets close the CDB now call cdclose(0) ! Check status again, if closed, status = 0 call cdstat(index, istat) print *, "CDB status is: ", istat ! Press key to close the program print *, "Press key to close the program" read (*,*) end program connect_to_CDB ``` ```fortran filename = "connect_to_cdb.cdb" ``` -------------------------------- ### Sample Protocol File Output Source: https://docs.sofistik.com/2025/en/fea/calculation/prt.html Example of a standard protocol file output showing program execution steps, versioning, and timing information. ```text *** Start: Program Calculation - Version 2023-0.0 *** Start: Program AQUA : Materials and Cross-Section SOFiSTiK trunk-0.0.1970 AQUA - GENERAL SECTIONS Output on file scl_4_iterative.plb Project data base scl_4_iterative.cdb - 30. access Project: Model and geometry TIME NEEDED 2, TOTAL 2 DATE 2023-03-05, 13:28:53 *** Stop : Program AQUA : Materials and Cross-Section *** Start: Program SOFIMSHC : Model and geometry SOFiSTiK trunk-0.0.1970 SOFIMSHC - GEOMETRY + STRUCT Output on file scl_4_iterative.plb Project data base scl_4_iterative.cdb - 31. access Project: Model and geometry Analysis and decomposition of structural model: CPU-time [s]: 0.02, geom. tolerance [m]: 0.040 TIME NEEDED 0, TOTAL 0 DATE 2023-03-05, 13:28:53 *** Stop : Program SOFIMSHC : Model and geometry *** Start: Program SOFILOAD : Loading SOFiSTiK trunk-0.0.1970 SOFILOAD - LOAD GENERATOR Output on file scl_4_iterative.plb Project data base scl_4_iterative.cdb - 32. access Project: Model and geometry TIME NEEDED 0, TOTAL 0 TIME NEEDED 0, TOTAL 0 DATE 2023-03-05, 13:28:54 *** Stop : Program SOFILOAD : Loading ``` -------------------------------- ### Launch Report Browser via Command Shell Source: https://docs.sofistik.com/2025/en/fea/report_browser/advanced_commands.html Basic syntax for starting the program from a command shell. ```bash ursula [/options] [filename] ``` -------------------------------- ### Locate CDBase Interface DLL Directories Source: https://docs.sofistik.com/2025/en/cdb_interfaces/introduction/about_cdb/required__license_dlls.html Standard installation paths for 32-bit and 64-bit interface DLLs. ```text C:\\2024\SOFiSTiK 2024\interfaces\32bit C:\\2024\SOFiSTiK 2024\interfaces\32bit_debug C:\\2024\SOFiSTiK 2024\interfaces\64bit C:\\2024\SOFiSTiK 2024\interfaces\64bit_debug ``` -------------------------------- ### Generated SOFiLOAD Input Example Source: https://docs.sofistik.com/2025/en/fea/ssd/tasks/task_combine_loads/task_combine_loads.html Example of the input generated for the SOFiLOAD program following the automatic combination process. ```text PROG SOFiLOAD HEAD Combine loads LC NO 15010 TYPE (D) TITL "LC 15010 comb + Imp 61" COPY NO 1 FACT 1 COPY NO 2 FACT 1 COPY NO 11 FACT 1.5 COPY NO 37 FACT 1.05 COPY NO 39 FACT 1.05 COPY NO 40 FACT 1.05 COPY NO 47 FACT 1.05 COPY NO 49 FACT 1.05 COPY NO 50 FACT 1.05 COPY NO 61 FACT 1 LC NO 15011 TYPE (D) TITL "LC 15011 comb - Imp 60" COPY NO 1 FACT 1.35 COPY NO 2 FACT 1.35 COPY NO 10 FACT 0.9 COPY NO 21 FACT 0.75 COPY NO 34 FACT 1.5 COPY NO 35 FACT 1.5 COPY NO 36 FACT 1.5 COPY NO 38 FACT 1.5 COPY NO 44 FACT 1.5 COPY NO 45 FACT 1.5 COPY NO 46 FACT 1.5 COPY NO 48 FACT 1.5 COPY NO 60 FACT -1 LC NO 15012 TYPE (D) TITL "(1)+(2)+1.5(34)+1.5(37)+1.5(40)+1.5(44)+1.5(47)+1.5(50)" COPY NO 1 FACT 1 COPY NO 2 FACT 1 COPY NO 34 FACT 1.5 COPY NO 37 FACT 1.5 COPY NO 40 FACT 1.5 COPY NO 44 FACT 1.5 COPY NO 47 FACT 1.5 COPY NO 50 FACT 1.5 END ``` -------------------------------- ### Load and configure DLL functions Source: https://docs.sofistik.com/2025/en/cdb_interfaces/python/configure.html Example of loading a SOFiSTiK DLL and configuring the return type for a specific function. ```python # Get the DLL functions myDLL = cdll.LoadLibrary("sof_cdb_w-2024.dll") py_sof_cdb_get = cdll.LoadLibrary("sof_cdb_w-2024.dll").sof_cdb_get py_sof_cdb_get.restype = c_int ``` -------------------------------- ### Workbook Configuration Path Source: https://docs.sofistik.com/2025/en/cdb_interfaces/vba/examples/vba_example1.html The default directory path for the configured workbook example within the SOFiSTiK installation. ```text C:\\2024\SOFiSTiK 2024\interfaces\examples\vba\configure_workbook ``` -------------------------------- ### Command Line Syntax for Starting a Program Source: https://docs.sofistik.com/2025/en/fea/calculation/start_single_program.html Use this syntax to execute a program directly. Ensure the filename is enclosed in quotes if it contains spaces. ```text program filename [-parm] [projekt] ``` -------------------------------- ### View PSJOBINFO output examples Source: https://docs.sofistik.com/2025/en/fea/calculation/job_history.html Displays the format of job information headers in the data echo. ```text PROG AQUA $ Datafile: D:\STATIC\P00\DAT0.DAT (.#01) 14:48:48 25/05/95 HEAD ... ``` ```text PROG AQUA $ Datafile: D:\STATIC\P00\DAT0.DAT (.#01) 25/05/95 $ Jobnumber: PC-Nr:17/8700063 14:48:48 HEAD ... ``` -------------------------------- ### CDB Access via Python Source: https://docs.sofistik.com/2025/en/cdb_interfaces/python/examples/python_example5.html Complete example demonstrating how to connect to a CDB file, read loadcase data, and decode strings using ctypes. ```python # +============================================================================+ # | Company: SOFiSTiK AG | # | Version: SOFiSTIK 2024 | # +============================================================================+ ################################################################################ # ABOUT: # In this example we will show how to use the sof_lib_ps2cs() function # sof_lib_ps2cs() converts integer values to string # import all types from sofistik_daten.py, original file can be found by following # --> examples/python/sofistik_daten.py from sofistik_daten import * import os # for the environment variable necessary import platform # checks the python platform from ctypes import * # read the functions from the cdb # This example has been tested with Python 3.7 (64-bit) print("The path variable=", os.environ["Path"]) # Check the python platform (32bit or 64bit) print("Python architecture=", platform.architecture()) sofPlatform = str(platform.architecture()) # Get the DLLs (32bit or 64bit DLL) if sofPlatform.find("32Bit") < 0: # Set environment variable for the dll files print ("Hint: 64bit DLLs are used") # Set DLL dir path - new in PY 3.8 for ctypes # See: https://docs.python.org/3/whatsnew/3.8.html#ctypes #os.add_dll_directory(r"C:\sofistik_installation\2024\SOFiSTiK 2024\interfaces\64bit") #os.add_dll_directory(r"C:\sofistik_installation\2024\SOFiSTiK 2024") os.add_dll_directory(r"S:\sof\2024\exe\trunk\_build.fea-gui\release_with_symbols\x64\bin") # Get the DLL functions myDLL = cdll.LoadLibrary("sof_cdb_w-2024.dll") py_sof_cdb_get = cdll.LoadLibrary("sof_cdb_w-2024.dll").sof_cdb_get py_sof_cdb_get.restype = c_int py_sof_cdb_kenq = cdll.LoadLibrary("sof_cdb_w-2024.dll").sof_cdb_kenq_ex py_sof_lib_ps2cs = cdll.LoadLibrary("sof_cdb_w-2024.dll").sof_lib_ps2cs py_sof_lib_cs2ps = cdll.LoadLibrary("sof_cdb_w-2024.dll").sof_lib_cs2ps else: # Set environment variable for the DLL files print ("Hint: 32bit DLLs are used") # Set DLL dir path - new in PY 3.8 for ctypes # See: https://docs.python.org/3/whatsnew/3.8.html#ctypes os.add_dll_directory(r"C:\sofistik_installation\2024\SOFiSTiK 2024\interfaces\32bit") os.add_dll_directory(r"C:\sofistik_installation\2024\SOFiSTiK 2024") # Get the DLL functions myDLL = cdll.LoadLibrary("cdb_w31.dll") py_sof_cdb_get = cdll.LoadLibrary("cdb_w31.dll").sof_cdb_get py_sof_cdb_get.restype = c_int py_sof_cdb_kenq = cdll.LoadLibrary("cdb_w31.dll").sof_cdb_kenq_ex py_sof_lib_ps2cs = cdll.LoadLibrary("cdb_w31.dll").sof_lib_ps2cs py_sof_lib_cs2ps = cdll.LoadLibrary("cdb_w31.dll").sof_lib_cs2ps # Connect to CDB Index = c_int() cdbIndex = 99 # Set the CDB Path # e.g. fileName = "S:\\test\\read_nodes.cdb" fileName = r"S:\test\155852\155852.cdb" # important: Unicode call! Index.value = myDLL.sof_cdb_init(fileName.encode('utf-8'), cdbIndex) cdbStat = c_int() # get the CDB status cdbStat.value = myDLL.sof_cdb_status(Index.value) # Print the Status of the CDB print("CDB Status:", cdbStat.value) pos = c_int(0) datalen = c_int(0) ie = c_int(0) datalen.value = sizeof(CLC_CTRL) RecLen = c_int(sizeof(clc_ctrl)) # 17 array elements × 4 + include 0 (17*4+1) s = create_string_buffer(17*4+1) """ do while ie == 0, see cdbase.chm, Returnvalue. = 0 -> No error = 1 -> Item is longer than Data = 2 -> End of file reached = 3 -> Key does not exist """ while ie.value < 2: ie.value = py_sof_cdb_get(Index, 12, 1, byref(clc_ctrl), byref(RecLen), 1) if ie.value < 2: myDLL.sof_lib_ps2cs(byref(clc_ctrl.m_rtex), byref(s), sizeof(s)) print(s.value) # Always read the length of record before sof_cdb_get is called RecLen = c_int(sizeof(clc_ctrl)) # Close the CDB, 0 - will close all the files myDLL.sof_cdb_close(0) # Print again the status of the CDB, if status = 0 -> CDB Closed successfully cdbStat.value = myDLL.sof_cdb_status(Index.value) if cdbStat.value == 0: print("CDB closed successfully, status = 0") ``` -------------------------------- ### text_if Word Template Examples Source: https://docs.sofistik.com/2025/en/soficad/cmdref/b/bewehrung_allgemein/stahlliste.html Examples of the text_if function applied in Word templates under different variable assumptions. ```text > {text_if([[Comment: ]], comment)} > {text_if([[Comment ]], comment, [[. And finish]])} > {text_if([[Comment: ]], comment, member)} > {text_if([[Comment: ]], comment)} > {text_if([[Comment: ]], comment, [[. And finish]])} > {text_if(comment, member)} ``` -------------------------------- ### MAXIMA Combination 2 Configuration Source: https://docs.sofistik.com/2025/en/tutorials/superpositions/action-sup-alex-excl-exex/superposition_action-sup-alex-excl-exex.html Example of defining alternative load groups and exclusive actions using SUP EXEX for ULS combinations. ```CADINP +PROG MAXIMA HEAD Combination 2 ECHO LOAD,FACT COMB 2 EXTR desi TYPE desi BASE 2200 ACT G ACT X_1 LC 11 TYPE AG1 ! different permanent load groups for X_1, X_2 and X_3 ACT X_2 LC 12 TYPE AG2 ACT X_3 LC 13 TYPE AG3 ACT Z_1 SUP EXEX ! modifiaction SUP EXEX alternativ within action or defintion at LC ! LC (21 29 1) TYPE A7 ! same variable load group for Z_1, Z_2 and Z_3 ACT Z_2 SUP EXEX ! LC (31 39 1) TYPE A7 ACT Z_3 SUP EXEX ! LC (41 49 1) TYPE A7 SUPP 2 EXTR mami ETYP beam TYPE MY FROM 20010 X 1[-] ! full output for hogging moment column 3 = end of beam no. 20010 END ``` -------------------------------- ### Connect to CDB in C++ Source: https://docs.sofistik.com/2025/en/cdb_interfaces/cpp/examples/cpp_example1.html Initializes the database connection using sof_cdb_init, checks the status, and closes the connection. Ensure the project is configured for 64-bit architecture as per the example comments. ```cpp int main() { // In this example debug 64bit dlls are used (Visual Studio Platform 64bit) // Connect to CDB // int sof_cdb_init ( char* FileName, int Index); /* Index = 0 initialise CDBASE and open scratch data base only Index > 0 open an existing data base with exactly tis index (STATUS=UNKNOWN) = somehow obsolete call, use 99! Index = 99 test if NAME is a valid database and open the base if possible. Return with the assigned index. If the file does not exist, it will be created. Index = 97 open the database via pvm Return with the assigned index. Index = 96 open a scratch database, filename is the path to use or NULL. Index = 95 open in read-only mode Index = 94 create a new data base (STATUS=NEW) */ int index = 99; char* fileName = "S:\\test\\cdbPath.cdb"; int ie = sof_cdb_init(fileName, index); if (ie < 0) { cout << "ERROR: Index= " << ie << " < 0 - see clib1.h for meaning of error codes" << endl; cout << "Press any to close the program"; system("pause"); return(0); } else if(ie == 0) { cout << "ERROR: Index= " << ie << " - The File is not a database" << endl; cout << "Press any to close the program"; system("pause"); return(0); } // Get Status // int sof_cdb_status (int ie); cout << "The CDB Status: " << sof_cdb_status(ie) << endl; // Close the CDB // int sof_cdb_close (int ie); sof_cdb_close(0); cout << "The CDB Status after closing: " << sof_cdb_status(ie) << endl; system("pause"); return 0; } ``` -------------------------------- ### Read Nodes from CDB Example Source: https://docs.sofistik.com/2025/en/cdb_interfaces/python/examples/python_example2.html This script demonstrates how to initialize a connection to a CDB file, iterate through node records, and print their properties. It requires the 'sofistik_daten.py' module and appropriate SOFiSTiK DLLs based on the system architecture. ```python # import all types from sofistik_daten.py, original file can be found by following # --> examples/python/sofistik_daten.py from sofistik_daten import * import os # for the environment variable necessary import platform # checks the python platform from ctypes import * # read the functions from the cdb # This example has been tested with Python 3.7 (64-bit) print("The path variable=", os.environ["Path"]) # Check the python platform (32bit or 64bit) print("Python architecture=", platform.architecture()) sofPlatform = str(platform.architecture()) # Get the DLL (32bit or 64bit DLL) if sofPlatform.find("32Bit") < 0: # Set environment variable for the DLL files print("Hint: 64bit DLLs are used") path = os.environ["Path"] # 64bit DLLs dllPath = r"C:\sofistik_installation\trunk\SOFiSTiK trunk\interfaces\64bit" dllPath += ";" # other necessary DLLs dllPath += r"C:\sofistik_installation\trunk\SOFiSTiK trunk" os.environ["Path"] = dllPath + ";" + path # Get the DLL functions myDLL = cdll.LoadLibrary("sof_cdb_w-2024.dll") py_sof_cdb_get = cdll.LoadLibrary("sof_cdb_w-2024.dll").sof_cdb_get py_sof_cdb_get.restype = c_int py_sof_cdb_kenq = cdll.LoadLibrary("sof_cdb_w-2024.dll").sof_cdb_kenq_ex else: # Set environment variable for the dll files print("Hint: 32bit DLLs are used") path = os.environ["Path"] # 32bit DLLs dllPath = r"C:\sofistik_installation\trunk\SOFiSTiK trunk\interfaces\32bit" os.environ["Path"] = dllPath + ";" + path # Get the DLL functions myDLL = cdll.LoadLibrary("cdb_w31.dll") py_sof_cdb_get = cdll.LoadLibrary("cdb_w31.dll").sof_cdb_get py_sof_cdb_get.restype = c_int py_sof_cdb_kenq = cdll.LoadLibrary("cdb_w31.dll").sof_cdb_kenq_ex # Connect to CDB Index = c_int() cdbIndex = 99 # Set the CDB Path # e.g. fileName = "S:\\test\\read_nodes.cdb" fileName = r"S:\test\read_nodes.cdb" # important: Unicode call! Index.value = myDLL.sof_cdb_init(fileName.encode('utf-8'), cdbIndex) cdbStat = c_int() # get the CDB status cdbStat.value = myDLL.sof_cdb_status(Index.value) # Print the Status of the CDB print("CDB Status:", cdbStat.value) pos = c_int(0) datalen = c_int(0) a = c_int() ie = c_int(0) datalen.value = sizeof(CNODE) RecLen = c_int(sizeof(cnode)) """ do while ie == 0, see cdbase.chm, Returnvalue. = 0 -> No error = 1 -> Item is longer than Data = 2 -> End of file reached = 3 -> Key does not exist """ while ie.value < 2: ie.value = py_sof_cdb_get(Index, 20, 0, byref(cnode), byref(RecLen), 1) print("{:10d}{:10d}{:10d}{:10d}{:10.2f}{:10.2f}{:10.2f}".format( cnode.m_nr, # node-number cnode.m_inr, # internal node-number cnode.m_kfix, # degree of freedoms cnode.m_ncod, # additional bit code cnode.m_xyz[0], # x coordinates cnode.m_xyz[1], # y coordinates cnode.m_xyz[2]) # z coordinates ) # Always read the length of record before sof_cdb_get is called RecLen = c_int(sizeof(cnode)) # Close the CDB, 0 - will close all the files myDLL.sof_cdb_close(0) # Print again the status of the CDB, if status = 0 -> CDB Closed successfully cdbStat.value = myDLL.sof_cdb_status(Index.value) if cdbStat.value == 0: print("CDB closed successfully, status = 0") ``` -------------------------------- ### SOFiLOAD Input for Combined Loads Source: https://docs.sofistik.com/2025/en/fea/ssd/tasks/task_combine_characteristic_loads/task_combine_characteristic_loads.html Example of the generated SOFiLOAD input syntax for combining load cases with specific factors and evaluation types. ```SOFiLOAD PROG SOFiLOAD HEAD Combine loads LC NO 901 TYPE T TITL "Temperature load LC 901" COPY NO 81 FACT 1 COPY NO 83 FACT 0.75 EVAL TYPE TEIG END ``` -------------------------------- ### Create Structural Areas Source: https://docs.sofistik.com/2025/en/sofiplus/cmdref/tools/scripting/index.html Examples for defining structural areas using different geometric primitives. ```lua local area = sofistik.Area.new() area.number = 1 area.group = 99 area.thickness = 0.2 area.geometry:set_quad({0, 0, 0}, {1, 0, 0}, {1,1,0}, {0,1,0}) ``` ```lua area.geometry:set_tri({0, 0, 0}, {1, 0, 0}, {1,1,0}) ``` ```lua local area = sofistik.Area.new() area.geometry :move_to({0, 0, 0}) :line_to({1, 0, 0}) :line_to({2, 0.5, 0}) :line_to({1, 1, 0}) :line_to({0, 1, 0}) :close() ``` -------------------------------- ### Continue Calculation on Error Example Source: https://docs.sofistik.com/2025/en/fea/calculation/continue_calculation_on_error.html Demonstrates the use of the /+R flag to ensure subsequent program modules execute even if the preceding module encounters an error. ```text +PROG AQUA /+R HEAD DUMMY_TEXT ! This should trigger an error END +PROG TEMPLATE HEAD TXB ASD END ``` -------------------------------- ### Set environment variable via batch and then run XLSM file Source: https://docs.sofistik.com/2025/en/cdb_interfaces/vba/configure.html Configures the system path to include the SOFiSTiK installation directory before launching the specified Excel workbook. Ensure all Excel instances are closed before execution as this method is not recommended. ```batch set local set path=C:\\2024\SOFiSTiK 2024; ^ %path% start "" "C:\exampleFolder\exampleWorkbook.xlsm" exit ``` -------------------------------- ### CDB Get Loop Condition Source: https://docs.sofistik.com/2025/en/cdb_interfaces/c_sharp/examples/c_sharp_example4.html Example of the loop condition used to iterate through CDB records. ```csharp while (sof_cdb_get(index, 1, 1, &mat_conc, ref datalen, 1) < 2) ``` -------------------------------- ### Initialize Fortran Program and Modules Source: https://docs.sofistik.com/2025/en/cdb_interfaces/fortran/examples/fortran_example4.html Sets up the program structure and imports necessary CDB interface modules. ```fortran program single_span_girder use cdbase use CDB_TYPES ! this are our included data types use CDB_TYPES_CON ! add the types into project / solution use CDB_TYPES_GEO use CDB_TYPES_LFC use CDB_TYPES_MAT use CDB_TYPES_LFC use CDB_TYPES_TEN use CDB_TYPES_SYS use CDB_TYPES_SCT implicit none ``` -------------------------------- ### Connect to CDB Source: https://docs.sofistik.com/2025/en/cdb_interfaces/fortran/examples/fortran_example4.html Initializes the connection to the specified CDB file using cdinit. ```fortran ! Define the parameters for cdinti() ! nid = 99, test if NAME is a valid database and open the base if possible. ! Return with the assigned index. ! If the file does not exist, it will be created. nid=99 file = "simple_span_girder.cdb" !name of the cdb or the full path ! Connect to the CDB call cdinit(file,nid) if (nid > 0) then write(*,*) " cdb_init of ", file," successful ", nid else write(*,*) " cdb_init of ", file," not successful ", nid endif ``` -------------------------------- ### List CADINP Export Options Source: https://docs.sofistik.com/2025/en/fea/basic/interfaces/ifc_export.html Execute the help command to display all available configuration options for the IFC export utility. ```text +sys sof_ifcexport.exe --help ``` -------------------------------- ### Conditional assignment example Source: https://docs.sofistik.com/2025/en/cdb_interfaces/cadinp/template/if.html Assigns a value based on the evaluation of a condition. ```CADINP IF (#A < 0.3) ! condition 1 LET#VALUE 0.50 ELSEIF (#A>1.0) ! or condition 2 LET#VALUE 0.70 ELSE LET#VALUE 0.50+0.20*(#A-0.3) ! else this value ENDIF ``` -------------------------------- ### Iteration Loop Condition Source: https://docs.sofistik.com/2025/en/cdb_interfaces/vb_net/examples/vb_net_example4.html Example of a loop condition used for iterative calculations. ```vbnet Do While (Mrd <= Meds) And (mu <= 0.296) ``` -------------------------------- ### Nested Loop Generation Source: https://docs.sofistik.com/2025/en/cdb_interfaces/cadinp/template/loop.html Example of a two-level loop structure and its resulting output. ```CADINP LOOP#1 3 TXB ADEF #1+1 LOOP 2 TXB BDIV 0.5 #1+1 TXB 0.2 1 ENDLOOP ENDLOOP ``` ```text ADEF 1 BDIV 0.5 1 0.2 1 0.5 1 0.2 1 ADEF 2 BDIV 0.5 2 0.2 1 0.5 2 0.2 1 ADEF 3 BDIV 0.5 3 0.2 1 0.5 3 0.2 1 ``` -------------------------------- ### CDB Get Return Value Source: https://docs.sofistik.com/2025/en/cdb_interfaces/c_sharp/examples/c_sharp_example4.html Indicates the return value for reaching the end of the file. ```csharp sof_cdb_get() == 2 → CD_ERR_DATAEND (2) End of file reached ``` -------------------------------- ### Get Maximum Beam Forces Source: https://docs.sofistik.com/2025/en/cdb_interfaces/vba/examples/vba_example4.html Retrieves maximum internal forces for a specific load case. ```VBA 'Loop and get the values Call sof_cdb_get(Index, 102, 1001, data, datalen , 1) If data.m_ID = 0 Then If Abs(Ned) < Abs(data.m_N) Then Ned = data.m_N End If If Abs(Med) < Abs(data.m_MY) Then Med = data.m_MY End If End If ``` -------------------------------- ### Import Namespace Source: https://docs.sofistik.com/2025/en/cdb_interfaces/vb_net/examples/vb_net_example4.html Standard import for handling DLL interop. ```vbnet Imports System.Runtime.InteropServices ``` -------------------------------- ### Configure Text Height in SOFiCAD_USR.bdd Source: https://docs.sofistik.com/2025/en/soficad/cmdref/k/einstellungen/benutzerdefinition.html Example of setting the text height for Stahlbau Light lettering to 3.5 mm. ```text ; text height 15 0 Real 3.5 ``` -------------------------------- ### Connect to CDB via Python Source: https://docs.sofistik.com/2025/en/cdb_interfaces/python/examples/python_example1.html Configures the environment path, loads the appropriate DLL based on architecture, and initializes the CDB connection. ```python import os # for the environment variable necessary, this is a great tool import platform # checks the python platform import string from ctypes import * # read the functions from the cdb # This example has been tested with Python 3.7 (64-bit) print ("The path variable=", os.environ["Path"]) # Check the python platform (32bit or 64bit) print ("Python architecture=", platform.architecture()) sofPlatform = str(platform.architecture()) # Get the DLLs (32bit or 64bit DLL) if sofPlatform.find("32Bit") < 0: # Set environment variable for the dll files print ("Hint: 64bit DLLs are used") path = os.environ["Path"] # 64bit DLLs dllPath = r"C:\sofistik_installation\trunk\SOFiSTiK trunk\interfaces\64bit" dllPath += ";" # other necessary DLLs dllPath += r"C:\sofistik_installation\trunk\SOFiSTiK trunk" os.environ["Path"] = dllPath + ";" + path # Get the DLL functions myDLL = cdll.LoadLibrary("sof_cdb_w-2024.dll") py_sof_cdb_get = cdll.LoadLibrary("sof_cdb_w-2024.dll").sof_cdb_get py_sof_cdb_get.restype = c_int py_sof_cdb_kenq = cdll.LoadLibrary("sof_cdb_w-2024.dll").sof_cdb_kenq_ex else: # Set environment variable for the DLL files print ("Hint: 32bit DLLs are used") path = os.environ["Path"] # 32bit DLLs dllPath = r"C:\sofistik_installation\trunk\SOFiSTiK trunk\interfaces\32bit" os.environ["Path"] = dllPath + ";" + path # Get the DLL functions myDLL = cdll.LoadLibrary("cdb_w31.dll") py_sof_cdb_get = cdll.LoadLibrary("cdb_w31.dll").sof_cdb_get py_sof_cdb_get.restype = c_int py_sof_cdb_kenq = cdll.LoadLibrary("cdb_w31.dll").sof_cdb_kenq_ex # Connect to CDB Index = c_int() cdbIndex = 99 # input the cdb path here fileName = r"S:\test\test_file.cdb" # important: Unicode call! Index.value = myDLL.sof_cdb_init(fileName.encode('utf-8'), cdbIndex) # get the CDB status cdbStat = c_int() cdbStat.value = myDLL.sof_cdb_status(Index.value) # Print the Status of the CDB print ("CDB Status:", cdbStat.value) # Close the CDB, 0 - will close all the files myDLL.sof_cdb_close(0) # Print again the status of the CDB, if status = 0 -> CDB Closed successfully cdbStat.value = myDLL.sof_cdb_status(Index.value) if cdbStat.value == 0: print ("CDB closed successfully, status = 0") ``` -------------------------------- ### Assign Interpolated Cross Sections Source: https://docs.sofistik.com/2025/en/sofiplus/cmdref/tools/scripting/index.html Defines different cross-sections at the start and end of a line to enable linear interpolation. ```lua sln.section_at_start = 1 sln.section_at_end = 2 ``` -------------------------------- ### Configure Environment Path Source: https://docs.sofistik.com/2025/en/cdb_interfaces/vb_net/examples/vb_net_example4.html Sets the system path to include the directory containing the 64-bit SOFiSTiK DLLs. ```vbnet Public Sub Main() Dim Filename As String Dim ie As Integer Dim Path As String Dim analysisPath As String Dim datalen As Integer Dim analysisPath2 As String 'Path of the SOFiSTIK Directory analysisPath = "C:\sofistik_installation\trunk\SOFiSTiK trunk\interfaces\64bit" analysisPath2 = "C:\sofistik_installation\trunk\SOFiSTiK trunk" 'Set the environment variable Path = Environment.GetEnvironmentVariable("path") Path = analysisPath2 + ";" + analysisPath + ";" + Path Environment.SetEnvironmentVariable("path", Path) ' ... ``` -------------------------------- ### Initialize Preset Action Combinations in MAXIMA Source: https://docs.sofistik.com/2025/en/tutorials/superpositions/general-maxima/superposition_general-maxima.html Calculates default action combinations and superposition values using the MAXIMA module. ```SOFiSTiK +PROG MAXIMA HEAD Preset action combinations CTRL INIT 1 ! does not delete the combinations in the 2nd run ECHO TABS YES END ``` -------------------------------- ### Configure Steelwork Layer in SOFiCAD_USR.bdd Source: https://docs.sofistik.com/2025/en/soficad/cmdref/k/einstellungen/benutzerdefinition.html Example of setting a specific layer for steel construction profiles by removing the semicolon and defining the layer name. ```text ; Steelwork Light ; Layer ;14 0 String "T__KONS" ``` -------------------------------- ### Configure Manual Proxy Settings Source: https://docs.sofistik.com/2025/en/administration/get-ready/administration.html Create this file in C:\ProgramData\SOFiSTiK\conf\ to manually define proxy settings when automatic discovery is not supported. ```json { "proxy": [ "https=localhost:8080" ], "proxy_bypass": [], "disable_loopback_proxy_bypass_for_localhost": false, "socks_proxy" : "" } ``` -------------------------------- ### Importing Required Libraries Source: https://docs.sofistik.com/2025/en/cdb_interfaces/python/examples/python_example4.html Initial imports for environment management, platform checking, and C-type interfacing. ```python import os # for the environment variable necessary import platform # checks the python platform from ctypes import * # read the functions from the cdb ``` -------------------------------- ### Configure CDB Filename Path Source: https://docs.sofistik.com/2025/en/cdb_interfaces/vb_net/examples/vb_net_example1.html Set the full path to the .cdb file before initializing the connection. ```vbnet 'Filename = full path with name of the cdb Filename = "S:\test\test.cdb" ``` -------------------------------- ### Decode Nodes KFIX Value in C# Source: https://docs.sofistik.com/2025/en/cdb_interfaces/c_sharp/examples/c_sharp_example3.html Example implementation for decoding a KFIX integer value into a string representation of active degrees of freedom. ```csharp static void Main(string[] args) { float x = 0; int result = 112; string value = "PXPYPZMXMYMZ"; x = (64 & result); if (x > 0) value = "PXPYPZMXMYMZ"; x = (32 & result); if (x > 0) value = value.Replace("MZ", null); x = (16 & result); if (x > 0) value = value.Replace("MY", null); x = (8 & result); if (x > 0) value = value.Replace("MX", null); x = (4 & result); if (x > 0) value = value.Replace("PZ", null); x = (2 & result); if (x > 0) value = value.Replace("PY", null); x = (1 & result); if (x > 0) value = value.Replace("PX", null); // Replace the text value = value.Replace("PXPYPZ", "PP"); value = value.Replace("MXMYMZ", "MM"); value = value.Replace("PYPZ", "XP"); value = value.Replace("PXPZ", "YP"); value = value.Replace("PXPY", "ZP"); value = value.Replace("MYMZ", "XM"); value = value.Replace("MXMZ", "YM"); value = value.Replace("MXMY", "ZM"); value = value.Replace("PPMM", "F"); Console.WriteLine("Value:" + value); Console.ReadKey(); } ``` -------------------------------- ### Initialize Preset Action Combinations Source: https://docs.sofistik.com/2025/en/tutorials/superpositions/general-maxima/superposition_general-maxima.html Initializes MAXIMA for preset action combinations without deleting existing combinations from previous runs. ```CADINP !*!Label Using preset action combinations +PROG MAXIMA HEAD Preset action combinations CTRL INIT 1 ! does not delete the combinations in the 2nd run ECHO TABS YES END ``` -------------------------------- ### Define SOFiSTiK DLL Functions in VB.NET Source: https://docs.sofistik.com/2025/en/cdb_interfaces/vb_net/configure.html Use these declarations to interface with the 64-bit SOFiSTiK DLLs. Ensure the library name matches your installed version. ```vb.net Imports System.Runtime.InteropServices Module main 'In this example, 64bit DLLs are used Public Declare Function sof_cdb_init Lib "sof_cdb_w-2024.dll" Alias "VB_sof_cdb_init" ( ByVal name As String, ByVal InitType As Integer ) As Integer Public Declare Function sof_cdb_status Lib "sof_cdb_w-2024.dll" Alias "VB_sof_cdb_status" ( ByVal Index As Integer ) As Integer Public Declare Function sof_cdb_close Lib "sof_cdb_w-2024.dll" Alias "VB_sof_cdb_close" ( ByVal Index As Integer ) As Integer ' ... ``` -------------------------------- ### Connect to CDB Source: https://docs.sofistik.com/2025/en/cdb_interfaces/vb_net/examples/vb_net_example4.html Initializes the connection to the database file and checks for errors. ```vbnet '################################################## '# Connect to the CDB ie = sof_cdb_init(Filename, 99) If ie < 0 Then Console.WriteLine("ERROR: Index= " & ie & " < 0 - see clib1.h for meaning of error codes") Console.ReadKey() Exit Sub ElseIf ie = 0 Then Console.WriteLine("ERROR: Index= " & ie & " - The File is not a database") Console.ReadKey() Exit Sub End If ``` -------------------------------- ### Define Dimension Style Mapping in INI Source: https://docs.sofistik.com/2025/en/soficad/cmdref/re/export.html Example entry for the [DIMENSIONSTYLES] section of the INI file to map an automatically generated AutoCAD style to a SOFiCAD style. ```ini 1_8mm_ISOCPEUR_1 = SOFI18 ``` -------------------------------- ### Initialize CDB Index Source: https://docs.sofistik.com/2025/en/cdb_interfaces/c_sharp/examples/c_sharp_example4.html Basic initialization call for the CDB index. ```csharp index = sof_cdb_init() ```