- Goal
The following script demonstrates how to automatically update all imported pressures after the mesh has been generated.
- Code
def after_mesh_generated(this,mesh_object):# Do not edit this line """ Called after mesh has been generated. Keyword Arguments : this -- this python object mesh_object -- The mesh object that was generated """ # This script shows how to automatically update all imported pressures # after the mesh has been generated # The script is working with 'after mesh generated' callback # The Python code object should be located under the model # Note: the script may not work if you are using shared licenses # Once the mesh has been generated, get all Imported Pressures to automatically reimport them # Be careful this could be a time consuming task if many imported loads need to be updated importedLoads=ExtAPI.DataModel.GetObjectsByType(DataModelObjectCategory.ImportedPressure) # Loop over all imported pressure and import load for ild in importedLoads: ild.Activate() ild.ImportLoad()