获取当前所有系统变量
获取当前所有系统变量ACAD2014以上版本
static void AcRxPyApp采用doit(void)
{
std::unique采用ptr<AcEdSysVarIterator> vars(new AcEdSysVarIterator());
for (vars->reset(); !vars->done(); vars->step())
{
resbuf buf;
buf.restype = 0;
buf.resval.rint = 0;
const AcRxVariable* var = vars->getSysVar();
if (auto es = acedGetVar(var->name(), &buf); es != RTNORM)
{
acutPrintf(采用T("\nName = %ls, value = NULL"), var->name());
continue;
}
switch (buf.restype)
{
case RTSTR:
{
acutPrintf(采用T("\nName = %ls, value = %ls"), var->name(), buf.resval.rstring);
acutDelString(buf.resval.rstring);
break;
}
case RTLONG:
case RTSHORT:
case RTINT64:
{
acutPrintf(采用T("\nName = %ls, value = %ld"), var->name(), buf.resval.rlong);
break;
}
case RTREAL:
{
acutPrintf(采用T("\nName = %ls, value = %f"), var->name(), buf.resval.rreal);
break;
}
case RTPOINT:
case RT3DPOINT:
{
acutPrintf(采用T("\nName = %ls, value = (%f,%f,%f"), var->name(), buf.resval.rpoint, buf.resval.rpoint, buf.resval.rpoint);
break;
}
}
}
}
Name = VSAZEBRADIRECTION, value = 90
Name = VSAZEBRASIZE, value = 45
Name = VSAZEBRATYPE, value = 1
Name = WBDEFAULTBROWSER, value = 2
Name = WBHELPONLINE, value = 0
Name = WBHELPTYPE, value = 1
Name = WBLOCKCREATEMODE, value = 1
Name = WINDOWAREACOLOR, value = 150
Name = WIPEOUTFRAME, value = 1
Name = WORKSPACELABEL, value = 0
Name = WSAUTOSAVE, value = 0
Name = WSCURRENT, value =
Name = XCOMPAREBAKPATH, value = C:\Users\Administrator\AppData\Local\Autodesk\AutoCAD 2024\R24.3\chs\XCompareBackup
Name = XCOMPAREBAKSIZE, value = 500
Name = XCOMPARECOLORMODE, value = 1
Name = XCOMPAREENABLE, value = 1
Name = XREFLAYER, value = .
Name = XREFOVERRIDE, value = 0
Name = XREFREGAPPCTL, value = 0
页:
[1]