Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X
Is there a way to create an annotation feature using a driven dimension?
Apparently the function ProAnnotationfeatCreate() and ProAnnotationfeatElementAdd() only allow to add an annotation element to an annotation feature. A driven dimension annotation is not an annotation element and I don't see a function to convert it into one. So how does one create an annotation feature using a driven dimension?
Solved! Go to Solution.
The problem in my case is that the driven dimensions are considered as bad inputs.
The only reason I could come up with to explain this behaviour is that this is caused by the fact these driven dimensions are not recognised as annotation elements. I have verified this in my code.
Strangely enough if you do the conversion to an annotation feature manually in Creo it works.
So I have now solved my problem by embedding a mapkey into my toolkit code.
hello all,
Just to make sure - we are talking about a driven (or reference) dimension with a ProSolid being a dim's parent, is it correct?
Yes, I'm referring to a driven dimension (e.g. a linear dimension) that is created by referencing two surfaces of a solid.
Thank you for your reply.
I tried that already. There is one small problem with this suggestion, namely a "driven dimension" annotation is NOT an annotation element (a "driving dimension" annotation is) hence it won't be accepted by the suggested function. I've now circumvented this problem by using mapkeys.
AFAIK, ProAnnotationfeatElementCopy(...) works as expected - it takes ProSelection constructed from a ProFeature. the feature has to have PRO_FEAT_ANNOTATION as ProFeattype. This function will create a copy of the driven or ref dimension in the target annotation feature. The original driven dimension would stay as it was and could be deleted if needs to be.
ProAnnotationElem of a driven dimension which has a ProSolid owner is accessed via ProSolidAnnotationelemsVisit(...)
The problem in my case is that the driven dimensions are considered as bad inputs.
The only reason I could come up with to explain this behaviour is that this is caused by the fact these driven dimensions are not recognised as annotation elements. I have verified this in my code.
Strangely enough if you do the conversion to an annotation feature manually in Creo it works.
So I have now solved my problem by embedding a mapkey into my toolkit code.