- 积分
- 282
- 明经币
- 个
- 注册时间
- 2003-9-30
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
发表于 2003-11-14 21:02:00
|
显示全部楼层
R14下用vba开发和2000下有很大不同的
你应该用obj.erase命令的,还有ZoomAll应该这样用ThisDrawing.ActiveViewport.ZoomAll
Sub Example_Erase()
' This example creates a line and then erases it.
Dim lineObj As AcadLine
Dim startPoint(0 To 2) As Double
Dim endPoint(0 To 2) As Double
' Create the Line object in model space
startPoint(0) = 2#: startPoint(1) = 2#: startPoint(2) = 0#
endPoint(0) = 4#: endPoint(1) = 4#: endPoint(2) = 0#
Set lineObj = ThisDrawing.ModelSpace.AddLine(startPoint, endPoint)
ThisDrawing.Regen True
MsgBox "The Line is created.", , "Erase Example"
' Erase the line
lineObj.Erase
ThisDrawing.Regen True
MsgBox "The Line is erased.", , "Erase Example"
End Sub |
|