用vba如何才能使用com接口,使用那里面的属性
下面这个只能通过选择集调用,不知还有什么方式可以呢?请指教
Sub test()
Dim sset As AcadSelectionSet
Dim name As String
name = “sset”
Set sset = ThisDrawing.SelectionSets.Add(name)
On Error GoTo ErrorHandler:
sset.SelectOnScreen
Dim ent As CEB_SpotObjectCOM
For Each ent In sset
With ent
.Point.X = 100
.Point.Y = 100
End With
ent.Update
Next ent
ErrorHandler:
sset.Delete
Set sset = Nothing
End Sub |