Jump to content

Stage time information [Add on / Python / Inspect]


---
 Share

Recommended Posts

Hi, 

I am working in Zeiss Inspect. I am new to Python scripting in the Add-ons.

I am trying to generate a report which lists details about each stage range in my project. 
I am able to export the name of each stage range as well as the index of the corresponding first and final stages. But I am struggling to get the time information for these stages. I did not find out how to access that data.

I used the Script Object window to try to find out where to access that data but I wasn't successful.
The only way I manage to get some time information is by using "relative time". But this does not seem to be what I am looking for. This seems to output the time information of the currently selected frame in the main user interface.

Thanks for any help you might be able to offer 🙂
Chris

Link to comment
Share on other sites

Solved.
Working within Visual Studio Code helped me to identify the attribute I was looking for:

gom.app.project.stages[stage_index].time_stamp

Link to comment
Share on other sites

  • 1 month later...

I am currently facing a similar problem. I export the recording time with the following code example. Unfortunately, the output is only accurate to the minute. Is it also possible to export seconds and milliseconds in the time format?

import gom
current_component = gom.app.project.actual_elements.filter('type','surface_component')[0]
time = current_component.get('stage.absolute_time_stamp')
print(time)
 
>>>  21.01.2021 11:42

 

Furthermore, the command in Christophe's post only provides the relative timestamp. Is it possible to change it to the absolute time?

 gom.app.project.stages[stage_index].time_stamp 

 

Link to comment
Share on other sites

 Share

×
×
  • Create New...