Twin Builder Options: C-Model Options
Use these options to define settings for the compilation and import of C-Models.
- C++ Compiler – Set the C++ compiler used to compile C-Models. By default, the latest version of the installed Visual Studio C++ compilers is used for compilation. Currently VS C++ 2015, VS C++ 2017, VS C++ 2019, and VS C++ 2022 are supported. Professional and Community versions are supported. For more details, see Program Requirements in the Introduction to the Twin Builder C Interface section.
- Model DLL Location – Configure
the default handling of binaries during model import.
- Keep DLL on Disc – Determine whether the binaries are stored on disc as .dll files or copied into the model definition in the project. Clear this check box to store the binaries with the model; they will be extracted to a temp location for simulation.
- Warn about Override/Replace of Existing DLL – Determine whether a warning message appears when the generated C-Model DLL replaces an existing DLL at the same location, or if it overrides a C-Model DLL with the same name that is located in a lower-priority location. For example, a C-Model DLL in PersonalLib\bin overrides a C-Model DLL with the same name in UserLib\bin or SysLib\bin.
- Copy DLL to Bin Directory of: – Select where to copy the binaries during model import. Binaries saved to disc as .dll files must be stored in <PersonalLib>\bin or <UserLib>\bin.
- Default Model Source – Configure where to store the C-Model sources.
- None – The sources for the C-Model are not stored in a separate location or kept on disc after the model editor is closed. The compiled C-Model will have no knowledge about the model sources and cannot reopen them at a later point. This setting is useful if the C-Model will be given away and there is no need or desire to reopen and edit the model again.
- Path to Project – The generated C-Model component stores the location of the source files. The project for the C-Model can be reopened and edited in the C-Model editor later if the sources are still located at the same place.
- Zip Model Source – The generated C-Model component stores the model sources. The project for the C-Model can be reopened and edited in the C-Model editor later, and the model sources get restored to a temporary location. This setting is useful if anyone can edit the model.
- Remote Solve – Configure how the system copies C-Models to the remote site when using a remote solver.
- Copy Model DLLs to Remote Location manually – When you select this check box, the remote solver expects all required C-Model DLLs which are not stored with the C-Model (see Model DLL Location above) to be accessible from one of the library locations on the remote machine (PersonalLib\Bin or UserLib\Bin). Clear this check box to transfer the C-Model DLLs to a temporary location on the remote machine before the start of each simulation.
Note:The auto-copy function does not work for sub-DLLs that are loaded (dynamically loaded or statically linked) by the top C-Model DLL.