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

how to create a gtol in drawing

SOLVED
Highlighted
xd
Newbie

how to create a gtol in drawing

how to create a gtol in drawing mode?

can anyone help? or share some codes?

i did it with protoolkit, however, it does not work right. Maybe the annotation plane or the placement is set wrong.

1 ACCEPTED SOLUTION

Accepted Solutions

Re: how to create a gtol in drawing

procedure is as follows,

check ProGtoldataStatus step by step,

it's a little complex, the reference , the model, the type and the placement have relations to each other.

ProGtoldataAlloc(drawing,&gtd);

ProGtoldataModelSet(gtd,solid,&gtds);

ProGtoldataTypeSet(gtd,type,&gtds);

ProGtoldataReferenceSet(gtd,rtype,reference,&gtds);

ProGtoldataPlacementSet(gtd,ptype,NULL,NULL,location,NULL,&gtds);

ProGtoldataPlaneSet(gtd,&plane);

ProGtoldataGtoldatumrefSet(gtd,NULL,NULL,NULL,&gtds);

ProGtoldataDiameterSet(gtd,diameter,&gtds);

ProGtoldataValueSet(gtd,b_v,d_v,name,&gtds);

ProGtoldataMatCondSet(gtd,matcond,&gtds);

ProGtolCreate(gtd,&gtol);

ProGtoldataFree(&gtd);

View solution in original post

1 REPLY 1

Re: how to create a gtol in drawing

procedure is as follows,

check ProGtoldataStatus step by step,

it's a little complex, the reference , the model, the type and the placement have relations to each other.

ProGtoldataAlloc(drawing,&gtd);

ProGtoldataModelSet(gtd,solid,&gtds);

ProGtoldataTypeSet(gtd,type,&gtds);

ProGtoldataReferenceSet(gtd,rtype,reference,&gtds);

ProGtoldataPlacementSet(gtd,ptype,NULL,NULL,location,NULL,&gtds);

ProGtoldataPlaneSet(gtd,&plane);

ProGtoldataGtoldatumrefSet(gtd,NULL,NULL,NULL,&gtds);

ProGtoldataDiameterSet(gtd,diameter,&gtds);

ProGtoldataValueSet(gtd,b_v,d_v,name,&gtds);

ProGtoldataMatCondSet(gtd,matcond,&gtds);

ProGtolCreate(gtd,&gtol);

ProGtoldataFree(&gtd);

View solution in original post