If I have a list of handles for Autocad Entities, how would I go about selecting these entities on screen so that the user could add to this selection or remove objects from the selection? I could go with objectids as well if needed.
I have been searching and searching and coming up empty handed or at least coming up with information that doesnt seem to dowhat I want.
I am not sure where to head with this. I attempted but just not sure what to do. Do I need to build a selection set within code? Can you do that without prompting a user for selections? I guess I am a bit lost now.
Thanks for your help! Greatly appreciated!
In addition, I have tried using:
but when I use an objectId in that line I get a message that :
Value of type 'System.Collections.Generic.List(Of Autodesk.AutoCAD.DatabaseServices.ObjectId)' cannot be converted to '1-dimensional array of Autodesk.AutoCAD.DatabaseServices.ObjectId'
Nevermind. I finally got the code to work I think. it is as follows:
Dim ids(0) As ObjectId ids(0) = ObjectIdFromHandle(myDocDB, "1D6") Autodesk.AutoCAD.Internal.Utils.SelectObjects(ids)
Thanks for your help!
Okay, I think I got some of this to work. My only issue is that how do I stop and allow the user to add or remove from the current on screen selection. This is what I have so far but i never get prompted to revise the selection.
Dim ids(1) As ObjectId ids(0) = ObjectIdFromHandle(myDocDB, "1D6") ids(1) = ObjectIdFromHandle(myDocDB, "1DE") Autodesk.AutoCAD.Internal.Utils.SelectObjects(ids) Dim prObjectSelectionOptions As PromptSelectionOptions = New PromptSelectionOptions() prObjectSelectionOptions.MessageForAdding = vbCrLf & "Please revise polyline selection:" ' Prompt for selections Dim prObjectSelectionRes As PromptSelectionResult = ed.SelectImplied() ' I am then trying to allow the user to add additional selections, or remove here prObjectSelectionRes = ed.GetSelection(prObjectSelectionOptions)