Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi;
I want to create a SelectionSet "SS1" and select only Polyline on the screen. Then I want to be able to connect to the specified polyline. How to do it ? I indicate the name SelectionSet "SS1" and the Item position, in this case Item 1. I need to get to Polyline and pull out the Handle property and the Lenght property. I don't know why it doesn't work, please help...
Sub Example_SelectOnScreen()
' This example adds objects to a selection set by prompting the user
' to select ones to add.
Dim ssetObj As AcadSelectionSet
Dim oPolyline As Variant
Dim Lenght As String
Dim Handle As String
AppActivate ThisDrawing.Application.Caption
' Create the selection set
Set ssetObj = ThisDrawing.SelectionSets.Add("SS1")
' Add objects to a selection set by prompting user to select on the screen
ssetObj.SelectOnScreen
ssetObj.Highlight True
MsgBox ssetObj.Name
ssetObj.Highlight False
Set oPolyline = ThisDrawing.SelectionSets("SS1").Item(1)
Lenght = oPolyline.Lenght
Handle = oPolyline.Handle
MsgBox "Lenght is: " & Lenght
MsgBox "Handle is: " & Handle
ThisDrawing.SelectionSets("SS1").Delete
End Sub
Solved! Go to Solution.