几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量

几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 (http://www.dimcax.com/hust/index.php)
-   DirectDWG (http://www.dimcax.com/hust/forumdisplay.php?f=89)
-   -   系统变量 (http://www.dimcax.com/hust/showthread.php?t=489)

cad 2007-01-28 04:12 PM

系统变量
 
9、系统变量
Document 对象提供了 SetVariable 和 GetVariable 方法,分别用于设置和检索 AutoCAD 系统变量。例如,要将某个整数指定给 MAXSORT 系统变量,可设置为:acadDoc.SetVariable "MAXSORT", 100。
针对第七个问题,如果想让多段线的起点从上一次绘图的终点开始。那么可以检索 LASTPOINT系统变量。
示例:
Dim moSpace As AcadModelSpace
Set moSpace = acadDoc.ModelSpace
Sub AddLightWeightPolyline()
Dim plineObj As AcadLWPolyline

‘ 返回上一次给图最后输入的点坐标
Dim pt as Variant
Pt=acadDoc.GetVariable(“LASTPOINT”)

Dim points(0 To 5) As Double

' 定义二维多段线的点
points(0) = pt(0): points(1) = pt(1)
points(2) = 4: points(3) = 2
points(4) = 6: points(5) = 4

' 在模型空间中创建一个优化多段线对象
Set plineObj = moSpace.AddLightWeightPolyline(points)


所有的时间均为北京时间。 现在的时间是 02:12 AM.