.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Clear Selection on screen OR Select none

4 REPLIES 4
Reply
Message 1 of 5
foruma000256
2990 Views, 4 Replies

Clear Selection on screen OR Select none

--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
4 REPLIES 4
Message 2 of 5
SRSDS
in reply to: foruma000256

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)

 

Message 3 of 5
Alfred.NESWADBA
in reply to: SRSDS

Hi,

 

use this: 😉

 

tAcadDocED.SetImpliedSelection(New ObjectId() {})

 

HTH, - alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)
Message 4 of 5
SRSDS
in reply to: Alfred.NESWADBA

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!!

Message 5 of 5
Alfred.NESWADBA
in reply to: SRSDS

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
Ingenieur Studio HOLLAUS ... www.hollaus.at ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost