判断当前的空间
struct resbuf rb;acedGetVar(TEXT("TILEMODE"), &rb);//指定TILEMODE为AutoCAD为系统变量
//TILEMODE:Accesses the current TILEMODE value for the database. The value of false is 0. The value of true is 1.
if (rb.resval.rint == 1)//当前工作空间是模型空间
{
acedCommandS(RTSTR, TEXT(".-VPORTS"),
RTSTR, TEXT("R"),
RTSTR, TEXT("4VPorts"),
RTNONE);
}
else//当前工作空间是图纸空间
{
acedCommandS(RTSTR, TEXT(".-VPORTS"),
RTSTR, TEXT("R"),
RTSTR, TEXT("4VPorts"),
RTSTR, TEXT(""), RTNONE);
}
页:
[1]