设置和返回系统变量 (.NET)
Application 对象提供了用于设置和检索 AutoCAD 系统变量的 and 方法。例如,若要将整数分配给 MAXSORT 系统变量,请使用以下代码:SetSystemVariableGetSystemVariable VB.NET'' Get the current value from a system variable Dim nMaxSort as Integer = Application.GetSystemVariable("MAXSORT") '' Set system variable to new value Application.SetSystemVariable("MAXSORT", 100) C#// Get the current value from a system variable int nMaxSort = System.Convert.ToInt32(Application.GetSystemVariable("MAXSORT")); // Set system variable to new value Application.SetSystemVariable("MAXSORT", 100); VBA/ActiveX 代码参考'' Get the current value from a system variable Dim nMaxSort as Integer nMaxSort = ThisDrawing.GetVariable("MAXSORT") '' Set system variable to new value ThisDrawing.SetVariable "MAXSORT", 100 相关概念父主题: |
|Archiver|CAD开发者社区 ( 苏ICP备2022047690号-1 苏公网安备32011402011833)
GMT+8, 2024-12-15 13:07
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.