Jump to content

The use of Python in combination with stages


---
 Share

Recommended Posts

Hello,

In multiple projects there are 5 or 10 or 20 stages or ..... . 

To run the python code on a variety of stages, there is a dynamical solution needed for completing the code on a ll present stages in 1 file.

Example e.g. closing holes on all stages:

# -*- coding: utf-8 -*-

import gom

gom.script.sys.show_stage (stage=gom.app.project.stages['D13051_0-2340592-1-A-498_Cav5.1_V1_2023-09-27'])

gom.script.sys.show_stage (stage=gom.app.project.stages['D13051_0-2340592-1-A-498_Cav8.5_V1_2023-09-27'])

gom.script.mesh.close_holes_automatically (
    delete_neighborhood_size=1, 
    filling_result='normal', 
    keep_point_selection=True, 
    max_edges_per_hole=1000, 
    max_hole_size=10.0)

The names of the stages should be dynamical, something like:

elements=gom.ElementSelection ({'category': ['key', 'elements', 'is_element_in_clipboard', 
                                        'True', 'explorer_category', 'actual', 'object_family', 'mesh']}), 

 

Can anyone help me with this, please?

 

Link to comment
Share on other sites

Hello,

 

our Table Export is looping the stages with 

for stage in gom.app.project.stages:
    
    gom.script.sys.show_stage (stage=stage)

Edited
Link to comment
Share on other sites

 Share

×
×
  • Create New...