Jump to content

How to change the stage range in a report page by script?


---
 Share

Recommended Posts

Hello, 

I'm looking for the API call for changing the stage range in a table or view on a report page. It is on views 

I have to do this by open the stage range in the explorer when I edit the view or table on a page. 

Thanks in advance, 

Johnny

Link to comment
Share on other sites

Hi,

you can record those actions.

I've recorded "gom.script.sys.show_stage( stage=gom.app.project.stages['stage1'])"

You can also record creation of stage range

Edited
Link to comment
Share on other sites

Hello Martin, 

It is not about the creation of the stage range, but the selection of the stage range for a report view. 

This was recorded from start to edit a view including the close of the edit action. 

gom.script.view.set_tab_visible (
	view='left_docking_area', 
	visible=True)

gom.script.view.set_tab_visible (
	view='properties', 
	visible=True)

gom.script.view.set_tab_visible (
	view='properties', 
	visible=True)

gom.script.view.set_tab_visible (
	view='properties', 
	visible=True)

gom.script.sys.open_stage_range (element=gom.app.project.stage_markers['C-Final TID'])

Not helpful for me. There are gui actions included. 

 

Johnny

Link to comment
Share on other sites

Hi Johnny,

maybe in addition to the functions described in Working with stages — App Development Documentation the commands gom.script.sys.enable_stage()/disable_stage() could be used:

gom.script.sys.enable_stage (stages=gom.StageSelection (first=gom.app.project.stages['ZEISS Training Object 3'], last=gom.app.project.stages['ZEISS Training Object 3']))
gom.script.sys.disable_stage (stages=gom.StageSelection (first=gom.app.project.stages['ZEISS Training Object 4'], last=gom.app.project.stages['ZEISS Training Object 4']))

So you could enable only the stages needed for a report view, trigger a recomputation if required, export the report and restore the previous set of enabled stages.

Hope this helps!

Best regards,

Matthias

 

Link to comment
Share on other sites

 Share

×
×
  • Create New...