selection set questions

Discussion in 'AutoCAD' started by RaghuMN, Aug 12, 2004.

  1. RaghuMN

    RaghuMN Guest

    Hi,

    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
     
    RaghuMN, Aug 12, 2004
    #1
  2. RaghuMN

    Jürg Menzi Guest

    Hi RaghuMN

    I don't know the exact mechanism of selection sets, but this are my experiences:
    Using ssget without a variable has AFAIK no limit.
    see above...
    One

    Note:
    You can clean used variables by setting them to nil. This will free up the
    available max count.

    Cheers
     
    Jürg Menzi, Aug 12, 2004
    #2
  3. RaghuMN

    RaghuMN Guest

    Thanks for the reply Jurg.

    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, Aug 12, 2004
    #3
  4. Instead of creating new selection sets, have you tried adding to 1 selection
    set using SSADD?

    set variables, it stops at the same feature count (165 of 1450) mtexts.
    this command to clean all the prior selection sets.
    complete program, that loops with new selections.
    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.
    be working around MTEXTs or is it a general selection set issue?
     
    Alan Henderson @ A'cad Solutions, Aug 12, 2004
    #4
  5. RaghuMN

    Jürg Menzi Guest

    Hi RaghuMN

    Did you tried 'garbage collection' (gc) to free up unused nodes?

    Cheers
     
    Jürg Menzi, Aug 12, 2004
    #5
  6. RaghuMN

    Jürg Menzi Guest

    Hi RaghuMN

    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
    Cheers
     
    Jürg Menzi, Aug 16, 2004
    #6
  7. RaghuMN

    RaghuMN Guest

    Thank you for the help offered Jurg. I highly appreciate your guidelines too.
    I am not very clear on how to apply the statement 'Determine the closest objects by coordinates', due to the following reasons:

    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
     
    RaghuMN, Aug 16, 2004
    #7
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.