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

How to get GTOL View in drawing.

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

3 REPLIES 3

Re: How to get GTOL View in drawing.

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

Re: How to get GTOL View in drawing.

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

Re: How to get GTOL View in drawing.

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

Announcements
LiveWorx Call For Papers Happening Now!