[Gl...] Posted April 20 Share Posted April 20 Hello ya'll, I was in need of a tool to mass create inspection points. I am using Zeiss Correlate on Photogrammetry data. I am using target markers. My projects all contain around 20 components, and the total target count is ~250. I could not find a way to get XYZ position data without creating inspection points, and I could not find a way to mass create these points through the Correlate program, so I created this app. I hope this helps someone else. If you know of something I could improve, or an easier way to achieve this - I am open to suggestions. I get the feeling that there is a button somewhere in the program for this already, because it seems like this would be a useful feature. Thank you! import gom array1 = gom.app.project.actual_elements array1 = sorted(array1, key=lambda e: str(e)) # Constructs and their number of points must be the same between projects, otherwise inspection point numbering will differ. for name in array1: if str(name) == "gom.app.project.actual_elements['actual_master']": continue if str(name) == "gom.app.project.actual_elements['all_measurement_series']": continue if str(name) == "gom.app.project.actual_elements['all_reference_points']": continue if str(name) == "gom.app.project.actual_elements['Analog input 0']": continue if str(name) == "gom.app.project.actual_elements['Analog input 1']": continue if str(name) == "gom.app.project.actual_elements['Analog input 2']": continue if str(name) == "gom.app.project.actual_elements['Analog input 3']": continue if str(name) == "gom.app.project.actual_elements['Analog input 4']": continue if str(name) == "gom.app.project.actual_elements['Analog input 5']": continue if str(name) == "gom.app.project.actual_elements['Analog input 6']": continue if str(name) == "gom.app.project.actual_elements['Analog input 7']": continue if "Point" in str(name): print("Operation Complete. Ending Script.") break print(name) print(name.data.coordinate.shape[1]) points_total = name.data.coordinate.shape[1] for x in range(points_total): if name.data.coordinate[0][1] is not None: try: MCAD_ELEMENT=gom.script.inspection.inspect_by_point (point={'id': x, 'target': name, 'type': 'coded'}) except Exception as e: print(f"Skipping {name}: {e}") continue Link to comment Share on other sites More sharing options...
[Ma...] Posted April 21 Share Posted April 21 I would suggest to place a keyword into that element so you can then make for cycle where you scan all elements for your keyword ( it will fail, when there is no such keyword, so place it into TRY/EXCEPT, with "pass" in exception ) Now you don't need to manually place names into condition 1 Link to comment Share on other sites More sharing options...
[De...] Posted April 24 Share Posted April 24 You should just be able to select the point component & File-Export-StageData-CSV 1 Link to comment Share on other sites More sharing options...
[Gl...] Posted 6 hours ago Author Share Posted 6 hours ago Appreciate the info! Is there a way to export that way using the local coordinate system? Please sign in to view this quote. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in