Set and Return System Variables
设置和返回系统变量
The Application object provIDes the SetSystemVariable and GetSystemVariable methods for setting and retrIEving autoCAD system variables. For example,to assign an integer to the MAXSORT system variable,use the following code:
Application对象提供了SetSystemVariable方法和GetSystemVariable方法来设置和提取系统变量。例如,下例代码将一个整数赋值给系统变量MAXSORT:
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 Code Reference
'' 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
总结以上是内存溢出为你收集整理的02-06 控制AutoCAD环境(六) 设置和返回系统变量全部内容,希望文章能够帮你解决02-06 控制AutoCAD环境(六) 设置和返回系统变量所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)