02-06 控制AutoCAD环境(六) 设置和返回系统变量

02-06 控制AutoCAD环境(六) 设置和返回系统变量,第1张

概述 Set and Return System Variables 设置返回系统变量 The Application object provides the SetSystemVariable and GetSystemVariable methods for setting and retrieving AutoCAD system variables. For example, to assi

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环境(六) 设置和返回系统变量所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/langs/1292225.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-06-10
下一篇 2022-06-10

发表评论

登录后才能评论

评论列表(0条)

保存