|
发表于 2004-6-17 10:27:00
|
显示全部楼层
Public Sub Test()
On Error Resume Next
Dim pnt(2) As Double, dot(2) As Double
Dim xt(3) As Integer, xd(3) As Variant
Dim ft(0) As Integer, fd(0) As Variant
Dim ss As AcadSelectionSet
Dim obj As AcadLine
Set obj = ThisDrawing.ModelSpace.AddLine(pnt, dot)
xt(0) = 1001: xd(0) = "Test"
xt(1) = 1002: xd(1) = "{"
xt(2) = 1001: xd(2) = "Test1"
xt(3) = 1002: xd(3) = "}"
ThisDrawing.RegisteredApplications.Add "Test1"
obj.SetXData xt, xd
Set ss = ThisDrawing.ActiveSelectionSet
ss.Clear
ft(0) = 1001: fd(0) = "Test1"
ss.Select acSelectionSetAll, , , ft, fd
MsgBox ss.Count
End Sub |
|