Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X
Updating code for Creo3 compliance deprecating Pro_develop. This function use to get me all the dimensions in a model that were visible in the drawing. I can still find if dimension is reldriven, but it appears to me they took away my ability to check for PRODIM_ATTR_VIS_IN_DWG_ONLY. Is there a way?
ndim = prodim_get_dim_ids(models[0], PRO_DIM_PARAM , PRODIM_ATTR_DRIVEN |
PRODIM_ATTR_VIS_IN_DWG_ONLY, &dim_array);
Thanks
Solved! Go to Solution.
https://support.ptc.com/appserver/cs/view/solution.jsp?n=CS228567
From Pro/ENGINEER 2000i2 the Pro/Develop function prodim_get_dim_ids() is superseded by ProDrawingDimensionVisit() and ProSolidDimensionVisit().
I'm not sure offhand, but I think these would be dimensions that are driven and reply false to ProDimensionIsAccessibleInModel
. Well, I figured it out. The old PD way in one step you got all the dimensions, with a filter applied for driven_dims and vis_in_dwg.
The new way:
First realize that dimensions either belong to a drawing or a solid. That decision is somewhat determined by the config option "create_drawing_dims_only" was set to YES. Default is NO. We use NO. That determines if you use ProSolidDimensionVisit or ProDrawingDimensionVisit (or both)
For me, I Use ProSolidDimensionVisit
Then use ProAnnotationIsShown on every dim, passing in the drawing handle you suspect is could be shown in.
Also using ProDimensionCanRegen
Basically I'm cleaning up by looking for all the purple dims and hiding them.
Oh! I thought you were looking through solid dims and wondering which ones not to worry about because they are only for use in a particular drawing. Yes, if you have a drawing to hand, ProAnnotationIsShown (or ProDrawingDimensionIsDisplayed), in the filter func to ...Visit is a good way to know the dimension is in the drawing.
https://support.ptc.com/appserver/cs/view/solution.jsp?n=CS228567
From Pro/ENGINEER 2000i2 the Pro/Develop function prodim_get_dim_ids() is superseded by ProDrawingDimensionVisit() and ProSolidDimensionVisit().
Thanks for taking a look Matt! And Seshu! This has been a tricky topic. The key words went from visible to displayed to shown. And it all went from pro develop to proDimension.h and now to proannotation.h. Unfortunate use of time, chasing this and reworking all of this old code.