- UID
- 5043
- 积分
- 1347
- 精华
- 贡献
-
- 威望
-
- 活跃度
-
- D豆
-
- 在线时间
- 小时
- 注册时间
- 2002-5-13
- 最后登录
- 1970-1-1
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
本帖最后由 LoveArx 于 2023-11-15 02:21 编辑
获取当前所有系统变量
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[0], buf.resval.rpoint[1], buf.resval.rpoint[2]);
- 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
|
|