Jump to content

Recommended Posts

Currently we scrap out PDFs to create csv files for our records.

I'm experimenting with GOM's native CSV exporter. The problem I have is it seems the Measurement Check 'names' and the table template 'name' are hard coded  into the python code when I record the IDE screen in GOM....


gom.script.table.export_table_contents (
	cell_separator=',', 
	codec='utf-8', 
	decimal_separator='.', 
	elements=[gom.app.project.inspection['DISTANCE_1'], gom.app.project.inspection['RADIUS_2'], gom.app.project.inspection['POSITION_3']], 
	file='C:/Custom_Template.csv', 
	header_export=True, 
	line_feed='\r', 
	sort_column=0, 
	sort_order='ascending', 
	template_name='Custom_Template', 
	text_quoting='', 
	write_one_line_per_element=False)

Is there a way to allow the 'elements=' to include all the items in the current active table? I cannot make this python script parametric for all programs if I can't do this.

Is there a way to let the 'template_name=' be whatever template is active in the program?  We have a lot of old templates that are running around and I'd like this field to accept any active template that is in the program?

 

Thanks

Link to comment
https://qualityforum.zeiss.com/topic/3035-python-script-to-export-csv/
Share on other sites

×
×
  • Create New...