Exceeded Maximum Selection Sets in a .Net / Lisp Combo

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
First of all, I know what I am doing is not practical, but it is necessary
Scenario
I have a production lisp routine that uses .Net API's to bolster its functionality. During some tasks (primarily large models), I may use these routines a LOT. Eventually it starts spitting out "maximum number of selection sets" errors. A Close/Save on the drawing and re-opening it does resolve the issue just fine, but these are frequently very large drawings that take some time to save/close/open. Ultimately I really just want to squash the bug moving forward!
LISP
Within the lisp routines I am localizing the SelectionSet variables and for good measure I am setting those variables to Nil when I am done with them. In addition to that I am calling the (GC) function directly after nulling those variables. Couple more things to note are the Document/SelectionSets VLA object has a Count of zero and the manual act of (setq ss (ssget)) would actually put a SelectionSet into the ss variable. So, at this point I don't think the problem technically has anything to do with lisp....
.NET
The SelectionSet is typically provided by lisp in a ResultsBuffer to the .Net functions. From there I convert those TypedValues to actual Selection Sets. Once I have completely finished working with that .Net SelectionSet I immediately call the Dispose() method on it; every time..... I didn't find any kind of SelectionSet Manager while using the search features of the Visual Studio Object Browser. So, at this point I really don't know how to clean house more than I currently am.
Anybody have any ideas?
FYI: I did already see the other Maximum SS thread