Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! 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);