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

Removing objects from selection set

2 REPLIES 2
Reply
Message 1 of 3
vedamurthy.gurumurthy
447 Views, 2 Replies

Removing objects from selection set

I am trying to remove one of the object from the selection set.
I am ending in an exception. Can anybody tell me where am I going wrong? A help on this is appreciated.


object[] tempObject = new object[1];
tempObject[0] = (object) acadSelect.Item(objectNumber);
acadSelect.RemoveItems(tempObject);

Where
acadSelect is AcadSelectionSet
objectNumber is static int (care is taken so that this int lies between 0 to acadSelect.Count -1)
2 REPLIES 2
Message 2 of 3

Veda...

I wish to use the RemoveItems method to remove some entities from a selections set...very much as you describe here in your message.

Were you able to find a solution?
Message 3 of 3
kbarnettza
in reply to: pellacad

use an array of acad entities ...

like this..

 

AcadEntity[] oset1 = new AcadEntity[] { (AcadEntity)set1.Item(index) };

otherset.removeitems(oset1);

 

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