Jump to content

GD&T Outputs via Script


Recommended Posts


I'm trying to build a script that creates a list of features in a project and outputs a variety of information based on the features. This includes stuff like X, Y, Z, I, J, K, Comments & Tolerances etc. The problem I am having is outputting position which is applied to the features via GD&T. 

This is an example of how my script currently captures the X,Y & Z coordinates by using the following code: 

ele_name = element.get('nominal_element.name')

and X, Y, Z etc using variations of the following. 

x_cord = format(element.center_coordinate.x, '.3f')

I need to get the equivalent keywords for the tolerance datum system, tolerance zone type, material requirement, tolerance limit so that I can build a "custom" output comment for the features. 

I've tried recording and inputting keywords using the script features however I can't figure out how to adapt the below to work. 

Please sign in to view this quote.

I need to get the above element values to work within the list. 

Any help, information or guidance would be greatly appreciated. 



Link to comment
Share on other sites

I managed to fix the issue.

I replaced the gom.app.project.inspection['Circle_1_Example.Position']

section with the term "element.get" similar to the X,Y,Z. 

The problem was finding the link to the feature so I had to add another list for any feature that had a GD&T position applied to it and then append the output CSV file to include this information. 

Link to comment
Share on other sites


  • Create New...