The PTC Community will be on read only status starting March 23rd in preparation for moving our platform to a new provider. Read more here
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);
