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

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

How to convert a driven dimension into an annotation feature

JB_87049
15-Moonstone

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
JB_87049
15-Moonstone
(To:FV)

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
FV
17-Peridot
17-Peridot
(To:JB_87049)

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?

JB_87049
15-Moonstone
(To:FV)

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

FV
17-Peridot
17-Peridot
(To:JB_87049)

FV_0-1595598537409.png

 

JB_87049
15-Moonstone
(To:FV)

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.

FV
17-Peridot
17-Peridot
(To:JB_87049)

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

 

JB_87049
15-Moonstone
(To:FV)

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.

Top Tags