The External element provides a way to link GoldSim to complex, user-defined functions or to other simulation and analysis computer programs. The user-defined functions, modules, or external programs are linked into GoldSim using the External element which references a DLL (Dynamic Link Library) that provides the connection wrapper to the external function or program.
This file contains examples that illustrate the basics of passing different value types (i.e. scalar, vector, lookup table, etc.) and the different run states that need to be addressed (i.e. Initialize, Cleanup, etc.). The external function are contained in the GSExternalExampleCPP.dll (C++ version) and GSExternalExampleF90.dll (FORTRAN version). The source code for the DLLs can be found in the GSExampleDLLs folder.
Simple_Scalar_Example shows the simplest example: an External element that emulates simple Expression element operations on scalar values.
Simple_Error_Example shows how to return an error message from the DLL.
Matrix_IO_Example demonstrates how matrices are sent to and returned from an External DLL function.
Initialize_Cleanup_Example shows how the Initialize and Cleanup calls can be used to do pre-calculation and post-calculation tasks.
LookupTable_Import_Example demonstrates how to use External elements to import data to LookupTable elements.
Simple_Scalar_Example shows the simplest example: an External element that emulates simple Expression element operations on scalar values.
To Open the Model File:
- Start GoldSim
- Click on the File and select Open Example...
- Browse to General Examples --> External
- Select the file called External.gsm
Comments
0 comments
Please sign in to leave a comment.