Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X
Hi..
I want to create general view for orientation of TOP_VIEW ( drawing solid orientation) but getting difficulty to pass matrix.
i am creating general drawing view by below API.
status = ProDrawingGeneralviewCreate (p_drawing, (ProSolid)comp_mdl, 2, PRO_B_FALSE, pos, 0.2, matrix2, &view);
it gives me error due to matrix, So please can anybody suggest me how to pass matrix from drawing solid orientation ( TOP_VIEW).
If any sample code is there then it is better to create general drawing view from drawing solid view orientation.
Thanks,
Prashant Pandarkar
Hi Prashant -
I have used many of the ProDrawing API functions, but not ProDrawingGeneralviewCreate.
Prashant Pandarkar wrote:
I want to create general view for orientation of TOP_VIEW ( drawing solid orientation) but getting difficulty to pass matrix.
i am creating general drawing view by below API.
status = ProDrawingGeneralviewCreate (p_drawing, (ProSolid)comp_mdl, 2, PRO_B_FALSE, pos, 0.2, matrix2, &view);
Where are you getting the matrix value that you use here? Are you creating it with ProMatrixInit?
it gives me error due to matrix, So please can anybody suggest me how to pass matrix from drawing solid orientation ( TOP_VIEW).
If any sample code is there then it is better to create general drawing view from drawing solid view orientation.
What error value did you get? ProDrawingGeneralviewCreate does not have a specific error code for "bad orientation matrix", so I don't know why you believe the matrix is causing the error.
Another way you could go wrong with ProDrawingGeneralviewCreate is the position argument, which should be in screen coordinates. Mouse picks are, I believe, in screen coordinates. Otherwise, if you know the position in drawing coordinates, you need
This is one of the biggest nuisances of working with Creo Parametric Toolkit.
If any sample code is there then it is better to create general drawing view from drawing solid view orientation.
You should have these two examples for ProDrawingGeneralviewCreate installed with Creo Parametric Toolkit:
Unfortunately, neither of them address transforming points from drawing to screen coordinates.
I hope this helps. It is a lot of work to learn how to use these functions.
|+| M a r k |+|
Hi Marks,
Thanks for your reply.
in this example given some matrix value which i am not able to get where they take this value.
I just want to create general drawing view from model view
e.g. from front end we create general drawing view from RMB on screen and say insert general view then select orientation method as view name from model and select model view name (FRONT /TOP/ RIGHT /LEFT etc.)
Thanks,
Prashant Pandarkar
To place a drawing view using a model view, you will need to get the orientation matrix of that particular view. Take a look at ProView object.
One possible way to do it is to use "ProViewNameToView" function to initialize the model view. Once you have the view handle use "ProViewMatrixGet" to extract the orientation matrix.
You need to work with multiple matrices and, as Mark Stallard already mentioned, this is something that is not documented well enough.
Hi Gabriel,
I tried with given way by extracting orientation by "ProViewMatrixGet" and passing it in to "ProDrawingGeneralviewCreate" but it gives me general error (- 1) after run the application.
Regards,
Prashant Pandarkar