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

How to determine whether a dimension/annotation is valid

Highlighted
Aquamarine

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.

5 REPLIES 5
Highlighted

Re: How to determine whether a dimension/annotation is valid

 

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

Highlighted

Re: How to determine whether a dimension/annotation is valid

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.

Highlighted

Re: How to determine whether a dimension/annotation is valid

How about this method as an index for the annotation ?

wfcAnnotation.Annotation.IsInactive

Highlighted

Re: How to determine whether a dimension/annotation is valid

Perhaps a brief overview how to reproduce the problem.
Create a model with multiple combined states. Assign one linear dimension (using Show Annotations) to multiple combined states. Delete this linear dimension by deleting it on one combined state. Although not visible the original linear dimension can still be detected on the other combined state. In an attempt to filter this dimension out of my list of dimensions I have now tested

• ProAnnotationIsInactive
• ProModelitemIsHidden
• ProAnnotationIsShown

None of them seems to work like one would expect.
The behaviour of the last one "ProAnnotationIsShown" is the strangest of them all. It will give "PRO_B_FALSE" for the left-over dimension of the deleted annotation but it will only work for annotations of type PRO_DIMENSION. If you have annotations of type PRO_SURF_FIN, PRO_GTOL, PRO_NOTE, ... the result will also be "PRO_B_FALSE" although they are visible. This is becoming too big of a frustration. Any help to shine some light on this behaviour is very much appreciated.

Highlighted

Re: How to determine whether a dimension/annotation is valid

I discovered my conclusion ProAnnotationIsShown is not correct for other types than PRO_DIMENSION is incorrect. Apparently this function looks - besides the value of the Annotation Settings - at which combined state is active and only gives information about the active combined state of the model. So it can't be used to distinguish valid annotations and remaining deleted annotations.

Announcements