*Expert Elite*
Posts: 1,569
Registered: ‎10-08-2008
Message 11 of 12 (136 Views)

Re: No 'SelectionSets' in VB.net

11-17-2012 12:26 AM in reply to: NirantarVidyarthee

Simply use List (Of Selectionset) but you did not extend

the number of SelectionSet more than 255

Valued Mentor
Posts: 370
Registered: ‎05-06-2012
Message 12 of 12 (115 Views)

Re: No 'SelectionSets' in VB.net

11-19-2012 12:08 AM in reply to: NirantarVidyarthee

NirantarVidyarthee wrote:

Thankyou but my question is not about how we can use COM API for getting SelectionSets collection. My question is why .NET API does not provide this and is there any other way in .NET API, other than probably creating my own collection.

There is no need for a collection of SelectionSet in the .NET.  API.


SelectionSets are things you get friom calling editor methods to select objects, and after you get them and do what you need with the objects they contain, you discard them. 


Unlike ActiveX SelectionSets, managed SelectionSets are not re-usable. There is no Clear() method to empty them and there is no way to re-use them. Unlike ActiveX selection sets, managed selection sets do not have methods to select objects.The Editor class has those methods, and they return a new managed SelectionSet each time you call them, so there's really no point or purpose to having a collection of managed SelectionSets.


The ActiveX and managed APIs are not remotely similar, and I think that's the underlying problem here. You can't approach programming with the .NET API as if it were just a managed equivalent of the ActiveX API, because it is not. It is very different and more difficult to use, but more powerful at the same time.







Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.