cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

API to get dimensions from stp file AP242

psarode
6-Contributor

API to get dimensions from stp file AP242

Hello Support team

I have created dimensions in creo for a prt and successfully exported step files using AP242 protocol and I able to see dimension both in creo file and step file (refer dimensions.jpg)

I want to read dimension from creo and stp file and below is the logic and apis used to get dimensions from creo

I have used "ProSolidDimensionVisit" API to get the dimensions .
This API give callback to 'test_DimVisitAction' callback function whenever any dimension is found in the model.

test_DimVisitAction - A self written callback function,
whenever we get a dimension this callback function gets called. API's used inside this functions are
ProAnnotationIsShown
ProDimensionSymbolGet
ProDimensionValueGet
ProDimensionTypeGet

Note:


Could you please let me know does the API 'ProSolidDimensionVisit' gives the dimension for step file If not
If not then could please let me know which API I should use to get dimension for both Creo and Step files.

2 REPLIES 2
sjuraj
13-Aquamarine
(To:psarode)

I think there is no API for step models. Step is ISO standard textual format.

What you can do is to export AP242 with annotations and create som step parser and pair step annotation with specified dimension in creo model.

But I do not know what would you pair annotation based on. You will have to learn how is step structured. 

psarode
6-Contributor
(To:sjuraj)

Okay seems like their's no option ti do this without having develop our own parser. 

Thanks @sjuraj 

Top Tags