Autocad VBA方面的问题 ( 积分: 70 )

  • 主题发起人 主题发起人 boylafong
  • 开始时间 开始时间
B

boylafong

Unregistered / Unconfirmed
GUEST, unregistred user!
在AutoCAD VBA 中
Sub Ch5_CreateLeader()
Dim leaderObj As AcadLeader
Dim points(0 To 8) As Double
Dim leaderType As Integer
Dim annotationObject As AcadObject

points(0) = 0: points(1) = 0: points(2) = 0
points(3) = 4: points(4) = 4: points(5) = 0
points(6) = 4: points(7) = 5: points(8) = 0
leaderType = acLineWithArrow
Set annotationObject = Nothing

' 在模型空间中创建引线对象
Set leaderObj = ThisDrawing.ModelSpace. _
AddLeader(points, annotationObject, leaderType)
ZoomAll
End Sub


那么在Delphi中,
怎么执行
主要是 Set annotationObject = Nothing 怎么执行
Freenill(), null,nil 都没用
 
在AutoCAD VBA 中
Sub Ch5_CreateLeader()
Dim leaderObj As AcadLeader
Dim points(0 To 8) As Double
Dim leaderType As Integer
Dim annotationObject As AcadObject

points(0) = 0: points(1) = 0: points(2) = 0
points(3) = 4: points(4) = 4: points(5) = 0
points(6) = 4: points(7) = 5: points(8) = 0
leaderType = acLineWithArrow
Set annotationObject = Nothing

' 在模型空间中创建引线对象
Set leaderObj = ThisDrawing.ModelSpace. _
AddLeader(points, annotationObject, leaderType)
ZoomAll
End Sub


那么在Delphi中,
怎么执行
主要是 Set annotationObject = Nothing 怎么执行
Freenill(), null,nil 都没用
 
先将annotationObject定义为IacadEntity
然后annotationObject:=nil
 
xixi_zh解决了我的问题
 
后退
顶部