How can I speed up the execution of jython file in Flux?

Yann_Le_Floch
Yann_Le_Floch
Altair Employee
edited November 2021 in Altair HyperWorks

In order to speed up the execution of jython file, you can use the following python commands:

Command
Allows
startMacroTransaction()
Opening a macro transaction
endMacroTransaction()
Closing a macro transaction

Example: Transaction of parameters modification:

startMacroTransaction()
ParameterGeom['Param_1'].expression='1'
ParameterGeom['Param_2'].expression='2'
ParameterGeom['Param_3'].expression='3'
ParameterGeom['Param_4'].expression='4'
endMacroTransaction()

Note 1: Use these commands only for the same type of transaction such as creation or modification or deletion.

Note 2: A macro transaction opened with startMacroTransaction() should always be closed with endMacroTransaction()

Note 3: Do not put commands such as deleteMesh() or buildFace() within a macro transaction.

Note 4: Add as many blocks of macro transactions as needed.

Welcome!

It looks like you're new here. Sign in or register to get started.

Welcome!

It looks like you're new here. Sign in or register to get started.