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

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

How to get GTOL View in drawing.

ngothankar
1-Newbie

How to get GTOL View in drawing.

Hi,

I have 1 drawing with GTOL. solid 3d model is used as reference while creating GTOL. I want to get the view in which GTOL is attached.

If i select drawing as reference  model, i am able to get the view information but for solid model i am not able to get attached view using leader.

i am using

status=ProGtoldataPlacementGet(data, &plcType, &dimension,&leaders, scn_point, &pgtol);

// for loop of leader count

{

status = ProGtolleaderGet(leaders[j], &lead_type, &attachment);

status=ProSelectionViewGet(attachment, &view);

status=ProSelectionModelitemGet(attachment,&p_mdl_item);

status=ProDrawingViewIdGet(drawing, view, &viewId);

}

for me ProDrawingViewIdGet is returning -2 as status;ProSelectionViewGet retunring 0 as status value.

p_mdl_item is return the ref. of edge or surface used in GTOL.

I understand the since GTOL linked with 3D Model, the ProSelectionViewGet might returning view object of 3d model not 2d drawing view object.

Any suggestions.

Thanks

Nikhil Gothankar


This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.
3 REPLIES 3

Hello Nikhil,

I used API ProDrawingViewNameGet way back to get name of the drawing view without fail after I got view using API ProSelectionViewGet.

Regards

Ketan

Hello Ketan,

i am getting view name and id if the GTOL, is created using drawing as reference object. but if i am using 3d model as reference then i am not getting view name or id and getting ProError status as -2

Regards

Nikhil

mender
6-Contributor
(To:ngothankar)

I think the problem here is that you are interrogating the gtol itself in the solid, where there is no drawing view, and the placement data is for the gtol in the solid's mode.  What you want to do, I believe, is to get the cosmetic item which is 'the gtol as shown in this drawing', and the function for that is ProGtolDtlnoteGet.  (Then use the note functions to get details like view, location on the screen, etc.)

Top Tags