Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X
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.
Solved! Go to Solution.
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.
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
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.
How about this method as an index for the annotation ?
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.
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.
Would you mind to send the drawing that involved the situation you mentioned, and give some notes in it, so that i can truely get you point, and i will test in your drawing, also will send you the result while i have found the solution,however, sometimes i have some connection issue with ptc community that brings me some problem to get you message form this web.
Thank you for your reply.
It is very easy to reproduce this.
Step 1
Create a model with multiple combined states
Step 2
Create multiple driving dimensions (show annotations) on this model.
Step 3
Assign one of the driving dimensions to multiple combined states
Step 4
Delete this driving dimension by selecting it on one combined state and pressing the delete function.
Step 5
Scan the model in toolkit using ProCombstateAnnotationsGet
You'll see the driving dimension is no longer an annotation element but just an ordinary annotation and is still assigned to the other combined states (not on the combined state you pressed the delete function on).
hi all,
for combined states bound annotations (or annotation elements) I would try ProCombstateAnnotationsGet(...). as far as I know for dimensions this function would list dimension ids (either shown or erased) in comb state and ignore the rest. Visiting comb states and getting a list of all state bound dimensions is probably what you are looking for.
HIH.
FV.
Thank you for your reply.
Originally I used "ProSolidAnnotationelemsVisit" to create a list of annotations but I found out that I missed annotations by doing so.
Therefore I changed my function to use "ProCombstateAnnotationsGet" as you suggested but as you say it lists all dimensions (either shown or erased/deleted). What I want to accomplish is to identify the erased/deleted dimensions.
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.
Thank you for your reply.
Apparently the behaviour of deleted annotations still being detected is a bug in Creo 6.0.4.0 that will be solved in Creo 6.0.5.0