CAD VBA 选取所有对象 20
2个回答
展开全部
AutoVBA获取基本图元对象,以LINE为例,代码如下。
Public Sub animatedline()
Dim mylineobject As AcadLine
Dim startmovevector(0 To 2) As Double
Dim endmovevector(0 To 2) As Double
Dim count As Integer, start As Single
Set mylineobject = ThisDrawing.ModelSpace.Item(0)
For count = 1 To 10
startmovevector(0) = count
startmovevector(1) = count
startmovevector(2) = count
endmovevector(0) = count + 1
endmovevector(1) = count + 1
endmovevector(2) = count + 1
mylineobject.Move startmovevector, endmovevector
start = Timer
While Timer < start + 0.05
Wend
ZoomAll
mylineobject.Update
Next
End Sub
代码完。
Public Sub animatedline()
Dim mylineobject As AcadLine
Dim startmovevector(0 To 2) As Double
Dim endmovevector(0 To 2) As Double
Dim count As Integer, start As Single
Set mylineobject = ThisDrawing.ModelSpace.Item(0)
For count = 1 To 10
startmovevector(0) = count
startmovevector(1) = count
startmovevector(2) = count
endmovevector(0) = count + 1
endmovevector(1) = count + 1
endmovevector(2) = count + 1
mylineobject.Move startmovevector, endmovevector
start = Timer
While Timer < start + 0.05
Wend
ZoomAll
mylineobject.Update
Next
End Sub
代码完。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询