I know that AutoCAD can allow only upto 128 selection sets per time.
I have some doubts on related issues. Can anybody help me?
a. If I select a set of features without assiging a variable name (say, (if (ssget "x") (do something)(do nothing))),
does this add to the count of selection sets, or is it like only the named selection sets adds to the count of selection sets?
b. If unnamed selection sets also add to the count of selection set quantity,how to get a unnamed selection set through atoms-family? I need this to access them and delete them. (or How can I perform this?)
3. If I keep on assigning selection sets to a variable name while working in loop, say 10 times, which number gets added to the selection set counter? 1 or 10?
(FYI: The root of these questions is the error 'exceeded maximum number of selection sets.')
Thanks,
MNRaghu
I don't know the exact mechanism of selection sets, but this are my experiences:
> a. If I select a set of features without assiging a variable name say,
> (if (ssget "x") (do something)(do nothing))),
> does this add to the count of selection sets, or is it like only the named
> selection sets adds to the count of selection sets?
Using ssget without a variable has AFAIK no limit.
> b. If unnamed selection sets also add to the count of selection set
> quantity, how to get a unnamed selection set through atoms-family? I need
> this to access them and delete them. (or How can I perform this?)
see above...
> 3. If I keep on assigning selection sets to a variable name while working in
> loop, say 10 times, which number gets added to the selection set counter?
> 1 or 10?
One
Note:
You can clean used variables by setting them to nil. This will free up the
available max count.
Cheers
--
Juerg Menzi
MENZI ENGINEERING GmbH, Switzerland
http://www.menziengineering.ch
I have some more questions on this issue.
I am basically working on MTEXT. However I try to nullify the selection set variables, it stops at the same feature count (165 of 1450) mtexts.
a. I execute ssclean function of dotsoft.com at the start of execution of this command to clean all the prior selection sets.
b. I clean all the invalid named selection sets at the end of each loop.
c. I have tried using lists to store selection sets.
d. Above all these, I use around 15 selection set variables in the complete program, that loops with new selections.
None of the above are helping me. Either I do these or not, it stops at the same count.
Some times, it also gives me this error:
Error: U:\global\src\coreapps\etlib\utility.h@71 Could not create an new selection set
After I get the error of 'exceeded maximum number of selection sets' though I execute the ssclean command and rerun my program, it fails at the 1st entity itself. The ssclean command does not seem to clear the selection sets.
The program that I am working for deals with only MTEXTs. Could this issue be working around MTEXTs or is it a general selection set issue?
I use 2002 version.
Any ideas please?
Thanks,
MNRaghu
"RaghuMN" <nos...@address.withheld> wrote in message
news:31764200.109231317...@jiveforum1.autodesk.com...
Did you tried 'garbage collection' (gc) to free up unused nodes?
Could any one help me on the above issue by suggesting me to simplify and take out the 'selection set' error causing instances?
With simplify, I mean that, a better method to find a overlapping mtext on another mtext, avoid too many selection sets, etc.
Program and drawing to test are attached above.
Any help much appreciated.
Thanks,
MNRaghu
I've take a look to your program over the weekend. My suggestion:
- Select all Mtext
- Get the bounding box of each
- Determine the closest objects by coordinates
- Check for points inside/outside each other
- Determine the direction from inside to outside points
- Perform move... etc.
Good luck
Complexity 1:
Mtexts are justified in 2 ways: Bottom Left Justified or Top Left Justified depending on the angle of the label pointer to which they are attached to.
Complexity 2:
Width and Height of Mtexts vary depending on the feature from which they arise from. Hence, to determine the span of search, we need to take a large extent. This brings in many mtexts to verify which again pulls time.
Complexity 3:
Taking only the insertion point and testing for in and out is not correct. Taking 4 corner points of each mtext and checking for in and out into the focus mtext is confusing since determining which corner of mtext falls into the current mtext needs to be got first.
Complexity 4:
Determining the free space after the overlapping mtext to move the focus mtext will be again linked to complexity 2. This, I am currently doing with graphic determination.
I have faced many more hurdles when thinking on this line before adapting the method that I have gone for. I have forgot as of now to list them here.
I would accept that this may be a easy concept, but only until I understand it, which I am unable to, so far.
Please have a look at it as you have mentioned. If you can give me some guidelines on how to improve the program later, would be too grateful to you.
Thanks,
MNRaghu
Excellent. You have helped me a lot. This job had taken almost 2 weeks of my time and yet troubling me.
Your help is very much appreciated.
Thank You Thank You....
MNRaghu
Glad to help you...ヲ-)