Selection subsets

Discussion in 'AutoCAD' started by TCEBob, Apr 4, 2004.

  1. TCEBob

    TCEBob Guest

    Can a selection set include another selection set? I want to handle
    multiple groups of text items.

    rs
     
    TCEBob, Apr 4, 2004
    #1
  2. TCEBob

    David Bethel Guest

    In short... No.

    Long winded... I selection may contain all of the member of another
    selection, but not a the actual selection set name.
    -David
     
    David Bethel, Apr 4, 2004
    #2
  3. TCEBob

    TCEBob Guest

    Shoot. Then maybe I have to make a bunch of ssets and step through one
    at a time.

    rs
     
    TCEBob, Apr 4, 2004
    #3
  4. TCEBob

    David Bethel Guest

    Here's a non destructive selection set merge:

    (defun mergess (ss_list / e tmp)
    (setq tmp (ssadd))
    (foreach s ss_list
    (setq s (eval s)
    i (sslength s))
    (while (not (minusp (setq i (1- i))))
    (setq e (ssname s i))
    (if (not (ssmemb e tmp))
    (ssadd e tmp))))
    tmp)


    (setq ss5 (mergess '(ss1 ss2 ss3 ss4)))

    There are probably a lot of derivatives around for that 1. -David
     
    David Bethel, Apr 4, 2004
    #4
  5. TCEBob

    Joe Burke Guest

    David,

    Not meaning to nit-pick but, ssadd doesn't add duplicate enames. So I guess the
    ssmemb check isn't needed.

    Joe Burke
     
    Joe Burke, Apr 4, 2004
    #5
  6. Good point, especially since (ssadd) is doing the
    equivalent (ssmemb) check anyway, to determine if
    the entity name already exists.



    AcadX for AutoCAD 2004 Beta 1
    http://mysite.verizon.net/~vze2vjds/acadx/AcadX16.zip
     
    Tony Tanzillo, Apr 4, 2004
    #6
  7. TCEBob

    TCEBob Guest

    Thanks for the routine, David. In this case I actually don't want to
    merge them, I want to deal separately with each sset. So the plan is to
    stack the sset names in a list and peel them out one at a time. I'm
    selecting items one at a time or in groups (especially text) to be
    rotated in one command but around each set's default point. So each time
    the user selects another set it keeps its identity. As to the rotation
    point, I haven't decided, easy for single items and I suppose the insert
    of the first item of a set. How to cope with overlapping selections?
    Ignore 'em. Why is the user selecting the same item twice? Presumably
    the double pick will rotate twice. Be fun to watch.

    rs
     
    TCEBob, Apr 5, 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.