Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X
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.
Solved! Go to Solution.
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,>d);
ProGtoldataModelSet(gtd,solid,>ds);
ProGtoldataTypeSet(gtd,type,>ds);
ProGtoldataReferenceSet(gtd,rtype,reference,>ds);
ProGtoldataPlacementSet(gtd,ptype,NULL,NULL,location,NULL,>ds);
ProGtoldataPlaneSet(gtd,&plane);
ProGtoldataGtoldatumrefSet(gtd,NULL,NULL,NULL,>ds);
ProGtoldataDiameterSet(gtd,diameter,>ds);
ProGtoldataValueSet(gtd,b_v,d_v,name,>ds);
ProGtoldataMatCondSet(gtd,matcond,>ds);
ProGtolCreate(gtd,>ol);
ProGtoldataFree(>d);
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,>d);
ProGtoldataModelSet(gtd,solid,>ds);
ProGtoldataTypeSet(gtd,type,>ds);
ProGtoldataReferenceSet(gtd,rtype,reference,>ds);
ProGtoldataPlacementSet(gtd,ptype,NULL,NULL,location,NULL,>ds);
ProGtoldataPlaneSet(gtd,&plane);
ProGtoldataGtoldatumrefSet(gtd,NULL,NULL,NULL,>ds);
ProGtoldataDiameterSet(gtd,diameter,>ds);
ProGtoldataValueSet(gtd,b_v,d_v,name,>ds);
ProGtoldataMatCondSet(gtd,matcond,>ds);
ProGtolCreate(gtd,>ol);
ProGtoldataFree(>d);