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

Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X

GTOL Creation for hole Dimension in Drawing

sukpi
7-Bedrock

GTOL Creation for hole Dimension in Drawing

The following steps are carried out to create GTOL for hole dimension.

1. When we select dimension using Proselect , able to create GTOL

2. ProError lErr = PRO_TK_NO_ERROR;

  ProGtoldata lGtolData; 

  lErr = ProGtoldataAlloc((ProMdl )xSolid/*model handle*/ , &lGtolData);

  ProGtoldataStatus lStatus;

  lErr = ProGtoldataTypeSet(lGtolData , xGtolType , &lStatus); 

  ProSelection lpSel;

  lErr = ProSelectionAlloc(NULL , &xEdge , &lpSel);

  lErr = ProSelectionViewSet(lView , &lpSel);

  lErr = ProGtoldataReferenceSet(lGtolData , xRefItemType , lpSel , &lStatus); 

  lErr = ProGtoldataPlacementSet(lGtolData , PROGTOLPTYPE_DIMENSION, &xDimension , NULL , NULL , NULL,    &lStatus);

lErr = ProGtolCreate(lGtolData , &xGtoL);

lErr = ProAnnotationShow(&xGtoL , NULL , lView); 

 

lErr = ProGtoldataFree(&lGtolData);

 

Note: ProGtoldataPlacementSet is returning -1. pls help us to solve this issue.

1 REPLY 1
Ketan_Lalcheta
19-Tanzanite
(To:sukpi)

Try using proselectionhighlight once you have set view to selection object..
This highlight would help you to analyze whether selection object is correct or not.
Top Tags