Skip to main content
1-Visitor
March 6, 2019
Question

Model view name and orientation name from View

  • March 6, 2019
  • 2 replies
  • 1547 views

Hello

 

We have view created into drawing file. We know we can set model view name and orientation name for drawing view using API ProDrawingViewOrientationFromNameSet().

 

Is there a way we can get model view name and orientation name for a view? We need to achieve this through Toolkit. We have Creo 4.0 M030.

 

Thanks and Regards

Ketan

2 replies

March 7, 2019

Hi all,

Ketan,

The API is missing and it was missing for the last 25 years.

The most useful workarounds:

1. create a set of ProParameters in a drawing where a parameter name is a drawing view name and the value is model view name. This works for use cases when the app would need to set up a drawing view and later on to see if a parent model view orientation had been changed.

2. this is just an educated guess approach - get a drawing view transformation matrix, normalize, remove shift and scale, map to model coordinates (drw_to_model_trf). In a model, visit named views, for each view get a view transformation, remove shift, scale, normalize and calculate dot products between drw_to_model_trf's vectors and view's transformation vectors - the resulting dot product values should be double-equal to 1.0 with some fuzz factor. The result of this should be one or more co-oriented model views and your app would have to make a decision which one to use...

HIH.

FV. 


@Ketan_Lalcheta wrote:

Hello

 

We have view created into drawing file. We know we can set model view name and orientation name for drawing view using API ProDrawingViewOrientationFromNameSet().

 

Is there a way we can get model view name and orientation name for a view? We need to achieve this through Toolkit. We have Creo 4.0 M030.

 

Thanks and Regards

Ketan


 

RPN
18-Opal
March 9, 2019

I guess I don't understand your request but 

 

  • tk_status = ProViewNameToView (model,pro_view_name,&view);
  • tk_status = ProViewMatrixGet  (model,view,matrix);
 
is not what you need?
 
Drawing Views and Model Views are not linked.