Skip to main content
15-Moonstone
May 18, 2020
Solved

How to determine whether a dimension/annotation is valid

  • May 18, 2020
  • 1 reply
  • 4421 views

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.

Best answer by FV_01

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.

1 reply

12-Amethyst
June 29, 2020

 

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_8704915-MoonstoneAuthor
15-Moonstone
June 29, 2020

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.

12-Amethyst
June 30, 2020

How about this method as an index for the annotation ?

wfcAnnotation.Annotation.IsInactive