Use Altair Compose commands to interact with Flux
Introduction
This section presents the different commands allowing the interaction between Flux and solidThinking Compose.
Workflow
In the following table, the steps to follow in Compose for a nominal scenario are presented, an example is available in the installation path : C:\Program Files\Altair \2018.1\flux\Flux\Api\win64\Compose\flux_mp.oml
Copy and paste this file in your working repertory, the other file, flux_mp.bat starts the first one.- To add the corresponding toolbox, the Compose project must be at this path :
C:\Program Files\Altair \2018.1\flux\Flux\Bin\dll\win64
- To start with the commands, the flux server must be configured.
Command example
- Configure the server (add more options with the server arguments described above).
serverUid =
FMP_startLocaleServer(FLUX2D_64,'../',strcat(NUMERICAL_MEMORY_LABEL,'600000000'))
- Execute a python or a pyFlux command
FMP_executeJythonCommand(serverUid, 'newProject()')
FMP_executeJythonCommand(serverUid, 'Face[1].region=RegionFace[“IRON”]')
FMP_executeJythonCommand(serverUid, 'closeProject()')
FMP_executeJythonCommand(serverUid, 'PythonOrPyfluxCommand()')
FMP_executeJythonCommand(serverUid, 'executeBatchSpy('Python_File.py')')
- Set an array double
FMP_setJythonDoubleArrayValue(serverUid,'b',[123.4,567.8])
- Get an array double
b = FMP_getJythonDoubleArrayValue(serverUid,'b')
- Set an array integer
FMP_setJythonIntArrayValue(serverUid,'d',[123,456]);
- Get an array integer
d = FMP_getJythonIntArrayValue(serverUid,'d')
- Set an array string
FMP_setJythonStringArrayValue(serverUid,'f',{'text one','text two'});
- Get an array string
f = FMP_getJythonStringArrayValue(serverUid,'f')
lastInstance = MeshLineArithmetic(name='10',
color=Color['White'],
number=10)
And
in Compose this command must not contain any line withdrawal. The good compose
command for the following example : FMP_executeJythonCommand(serverUid, 'lastInstance = MeshLineArithmetic(name="10",color=Color["White"],number=10)');