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

How to convert a driven dimension into an annotation feature

SOLVED
JB_87049
Alexandrite

How to convert a driven dimension into an annotation feature

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?

1 ACCEPTED SOLUTION

Accepted Solutions

Re: How to convert a driven dimension into an annotation feature

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.

View solution in original post

6 REPLIES 6

Re: How to convert a driven dimension into an annotation feature

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?

Re: How to convert a driven dimension into an annotation feature

Yes, I'm referring to a driven dimension (e.g. a linear dimension) that is created by referencing two surfaces of a solid.

Re: How to convert a driven dimension into an annotation feature

FV_0-1595598537409.png

 

Re: How to convert a driven dimension into an annotation feature

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.

Re: How to convert a driven dimension into an annotation feature

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(...) 

 

Re: How to convert a driven dimension into an annotation feature

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.

View solution in original post

Announcements