|
我写的
static void Baotest1test(void)
{
// Add your code for command Baotest1.test here
struct resbuf cmd, os, os1 , os2;
ads_real radius , dist;
ads_point pt1 , pt2 , pt3 ;
//acedGetVar("osmode", & os);
cmd.restype = RTREAL;
cmd.resval.rreal = 0;
os.restype = RTREAL;
os.resval.rreal = 0;
acedSetVar("cmdecho", &cmd);//(SETVAR "CMDECHO" 0)
//acadErrorStatusTEXT;
acedGetVar("osmode", &os1);
os.resval.rreal = os1.resval.rreal + 16384;
acedSetVar("osmode", &os);//(setvar "osmode" 0)
acedCommand(RTSTR , "undo" , RTSTR , "_group" , 0);//(vl-cmdf "_.undo" "_group")
acedGetPoint(NULL , "\nGet Center Point :" , pt1);
acedGetDist(NULL ,"\n请输入圆的半径啦靓仔:", &radius);
acedGetDist(NULL ,"\n请输入圆的的圆心距:", &dist);
acutPolar(pt1 , 0 , dist , pt2);
acutPolar(pt1 , 3.14159 , dist , pt3);
acedCommand(RTSTR , "circle" , RT3DPOINT , pt1 , RTREAL, radius , 0);
acedCommand(RTSTR , "circle" , RT3DPOINT , pt2 , RTREAL, radius , 0);
acedCommand(RTSTR , "circle" , RT3DPOINT , pt3 , RTREAL, radius , 0);
acedSetVar("osmode", &os1);
acedCommand(RTSTR , "undo" , RTSTR , "_end" , 0);
//acutPrintf(&os);
acutPrintf("\n可以画圆的ARX写成功了! 呵呵,加油!!!");
}
// ----- ads_setdefun001 symbol (do not rename)
|
|