- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello world and Mr. Yuan
Im trying to use Getentity method to create a selection set.
I have put the Getentity method in some sort of loop which will take entities till the user clicks on a command button in the userform (vbmodeless) or presses escape which will go to another userform.
my problem is, I can see the picked item in getentity but my code wont assign it to the selection set
dim keepsset as acadselectionset
dim entity as acadentity
i = 0
GetEntityObject:
On Error Resume Next
ThisDrawing.Utility.GetEntity Entity, bp, vbNewLine & "Select Items to keep in Plan"
Do While Entity Is Nothing
If CheckKey(VK_ESCAPE) = True Then
me.hide
initialform.show
Else
MsgBox "Emtpy area selected" & vbNewLine & "Select an Object or Press ESC to go to previous Form"
GoTo GetEntityObject
End If
Loop
Set KeepSSet(i) = Entity
Entity.Highlight True
i = i + 1
GoTo GetEntityObject
the reason why Im using getentity instead of KeepSSet.SelectOnScreen is so I can use the prompt in getentity.
any ideas if i can do the same if i use .SelectOnScreen?
Solved! Go to Solution.