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

Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X

Change Annotation View Direction automatically

zynkana
10-Marble

Change Annotation View Direction automatically

Hi,

 

I have used  "ProAnnotationplaneForcetoplaneflagSet()" and "ProDimensionPlaneSet()" to move an annotation to selected plane. But annotation "View Direction" and "Angle" are not the same, the resultant is rotated. Can you help me to set "ViewDirection" and "Angle" to original "ViewDirection" and "Angle"?

 

Thanks in advance

 

Regards,

NK

2 REPLIES 2
AbySelvaraj
6-Contributor
(To:zynkana)

Hi, @zynkana

When you are trying to execute ProDimensionPlaneSet(), your code could have returned PRO_TK_NOT_VALID. That means the ProAnnotationPlane supplied to ProDimensionPlaneSet() is not frozen.

 

This is kind of native Creo configuration. Even when you are trying to modify plane reference for a dimension, we can't uncheck Freeze annotation plane reference in the Edit Annotation Plane dialog as in the below snap.

 

AbySelvaraj_0-1721661726034.png


So before supply the ProAnnotationPlane, freeze it using ProAnnotationplaneFrozenSet() (refer Sample Code).

Sample code:

 

ProAnnotationPlane cPlane;
status = ProAnnotationplaneFrozenSet(&bPlane, PRO_B_TRUE, &cPlane);
status = ProDimensionPlaneSet((ProDimension*)&pAnnotation, &cPlane);

// where,
// bPlane - deduced annotation plane
// cPlane - annotation plane frozen
// pAnnotation - annotation reference

// *Above code is tested for Creo Parametric 9.0.5.0.

 


Happy coding!!!

Hi @zynkana,

 

I wanted to follow up with you on your post to see if your question has been answered. 
If so, please mark the appropriate reply as the Accepted Solution. 
Of course, if you have more to share on your issue, please let the Community know so that we can continue to help you. 

 

Thanks,
Anurag

Announcements


Top Tags