Jump to content

Recommended Posts

Is there a function or a variable in the scripting to query whether the currently open project is completely calculated? Or do you have to make do with it, e.g. to go through all the actual elements and check them to see if they are calculated or not? 
Thank you in advance for any help!

Hello,

is this supposed to mimic the behavior of the status bar? 

There is "gom.app.project.project_statistics.all.number_of_computed" and "gom.app.project.project_statistics.all.total_number" in Statistics -> Project statistics -> all elements. It considers visible elements only though.

The metrology technician should be provided with a script that is executed before the "publication" of a project and which checks the project for various things. One of the checks should be whether the project is fully calculated, so that no project is stored in an "undefined" state, so to speak.


for i in gom.ElementSelection ({'category': ['key', 'elements', 'part', gom.app.project.parts['Part'], 'explorer_category', 'inspection']}):
    x = i.get('name')
    if gom.app.project.inspection[x].computation_status == 'computed':
        print(f'Feature {x} is computed')
    else:
        print(f'Feature{x} would not compute')

×
×
  • Create New...