Clear Selection on screen OR Select none

Clear Selection on screen OR Select none

Anonymous
Not applicable
3,478 Views
4 Replies
Message 1 of 5

Clear Selection on screen OR Select none

Anonymous
Not applicable
--Or you can just PInvoke acedSSSetFirst, which is what
the SelectObjects() method does.--

My limited training materials does not tell me how to get the acedsssetfirst selection set, I want to clear it out.

I used:

Autodesk.AutoCAD.Internal.Utils.SelectObjects(ids);

to get some objects for zooming, and now I want to un-select them for the user to move on.

In vba i could get a selection set by name from a group of selection sets in the drawing. Can I do that in .net?

Thanks,

jvj
0 Likes
3,479 Views
4 Replies
Replies (4)
Message 2 of 5

SRSDS
Advisor
Advisor

Hi,

 

Would anyone have a solution for this? I can't find a solution elsewhere.

 

SendingString cancels my current command. And trying to set a selection set with Nothing in it creates an error.

 

Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.SendStringToExecute(Chr(27), False, False, False) 

 

psr = Nothing

ed.SetImpliedSelection(psr.Value)

 

0 Likes
Message 3 of 5

Alfred.NESWADBA
Consultant
Consultant

Hi,

 

use this: 😉

 

tAcadDocED.SetImpliedSelection(New ObjectId() {})

 

HTH, - alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2026
------------------------------------------------------------------------------------

(not an Autodesk consultant)
Message 4 of 5

SRSDS
Advisor
Advisor

I did try something similar but it also didn't work.

 

'Dim arOBJIDS(0) As ObjectId
'arOBJIDS(0) = Nothing
'ed.SetImpliedSelection(arOBJIDS)

 

Thanks once again!!

0 Likes
Message 5 of 5

Alfred.NESWADBA
Consultant
Consultant

HI,

 

>> I did try something similar but it also didn't work.

>> Dim arOBJIDS(0) As ObjectId

you have an array declared with one item, I did declare an array with 0 items, that's the difference.

 

Anyway, good to hear it's working now for you!

 

- alfred -

 

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2026
------------------------------------------------------------------------------------

(not an Autodesk consultant)
0 Likes