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=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.
I used API ProDrawingViewNameGet way back to get name of the drawing view without fail after I got view using API ProSelectionViewGet.
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
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.)