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 image )
I want to read dimension from creo and stp file and below is the logic and apis used to get dimensions from creo
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.
I have used ProSolidDimensionVisit
API to get the dimensions.
This API gives a 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. APIs used inside these functions are:
ProAnnotationIsShown
ProDimensionSymbolGet
ProDimensionValueGet
ProDimensionTypeGet
The idea in general is that if someone sends to me an STP file, I should be able to extract the dimensions automatically in this file