Skip to main content
May 18, 2020 3:15 PM UTC
Solved

How to determine whether a dimension/annotation is valid

I'm using CreoToolkit with Creo 6.0.4.0
When you scan a 3D model for 3D annotations even deleted annotations can be found.
I don't use the visit functions as I'm not able to find all the dimension types this way.
I have not found a method to distinguish deleted (invalid) annotations from valid annotations.
Is there a way to check the status (deleted/not-deleted) of an annotation in Toolkit?

 

Thank you very much in advance.

FV_01Answer
Jul 7, 2020 7:24 PM UTC

the second output argument of ProCombstateAnnotationsGet(...) returns shown/erased state - 0 is shown and 1 is erased ('displayed' and 'undisplayed' in Creo6 lingo). An annotation element is not going to be a member of the returned array if it had been never attached to a combstate. ProAnnotationIsShown(...) will return the global status of the annotation in a solid model - if it returns false I don't think it is necessary to drill down to combstates.

I do not know about deleted/undeleted states for annotations or annotation elements and if those things are in pro/toolkit in the first place. There are old enums from pro/develop days which become ProDrawMode in pro/toolkit - maybe this is the point of the confusion. 

By the way, ProSolidAnnotationelemsVisit(...)  is to be used for 'free' notes, refdims, etc... The function was not intended to be a global collector for all ( free and feat bound) annotation elements. For feat bound annotation elems one need to visit features in a solid and filter on ProFeattype and then visit annot elems in collected  features.

HIH.

11 replies

Jun 29, 2020 2:31 AM UTC

 

Does this help you? i think the annotations is invalid while  missing the reference or the status is IsIncomplete,

but i checked it in Otkjava, however, Toolkit should be the same

annotation.JPG

JB_87049Author
Jun 29, 2020 9:04 AM UTC

There is a problem with the functions HasMissingReferences and IsComplete (at least in the C library, I haven't tested other libraries)..
E.g. if you have a driven dimension that has semantic references assigned to it, these functions don't detect the references.

Jun 30, 2020 1:31 AM UTC

How about this method as an index for the annotation ?

wfcAnnotation.Annotation.IsInactive