Message 1 of 7
Selection Set length
Not applicable
08-27-2008
04:04 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
If u do not mind than please tell me in the program below how to calculate the length of selection set.
thanks
Private Sub cmdBt1_Click()
On Error Resume Next
Dim ss As AcadSelectionSet
Dim Pt1 As Variant
Dim Pt2 As Variant
Dim sslength As Integer
Form1.hide
Pt1 = ThisDrawing.Utility.GetPoint(, "Select First Point")
Pt2 = ThisDrawing.Utility.GetPoint(, "Select Second Point")
'create Sset object first
ss.Select acSelectionSetCrossing, Pt1, Pt2
Set ss = ThisDrawing.SelectionSets.Item("MySSet")
If ss Is Nothing Then
Set ss = ThisDrawing.SelectionSets.Add("MySSet")
End If
sslength = AutoCAD.Application.ActiveDocument.SelectionSets.SelectionSet.count
End Sub
If u do not mind than please tell me in the program below how to calculate the length of selection set.
thanks
Private Sub cmdBt1_Click()
On Error Resume Next
Dim ss As AcadSelectionSet
Dim Pt1 As Variant
Dim Pt2 As Variant
Dim sslength As Integer
Form1.hide
Pt1 = ThisDrawing.Utility.GetPoint(, "Select First Point")
Pt2 = ThisDrawing.Utility.GetPoint(, "Select Second Point")
'create Sset object first
ss.Select acSelectionSetCrossing, Pt1, Pt2
Set ss = ThisDrawing.SelectionSets.Item("MySSet")
If ss Is Nothing Then
Set ss = ThisDrawing.SelectionSets.Add("MySSet")
End If
sslength = AutoCAD.Application.ActiveDocument.SelectionSets.SelectionSet.count
End Sub