+ Reply to Thread
Page 1 of 3 1 2 3 LastLast
Results 1 to 10 of 23
  1. #1
    Junior Member
    Using
    AutoCAD 2008
    Join Date
    Jun 2012
    Posts
    21

    Default how to join selection sets

    Registered forum members do not see this ad.

    I have a list with multiple selection sets, i want to join them into a single selection set, ho?

  2. #2
    Forum Deity MSasu's Avatar
    Discipline
    Construction
    MSasu's Discipline Details
    Occupation
    engineer
    Discipline
    Construction
    Details
    AutoLISP programmer
    Using
    AutoCAD 2013
    Join Date
    Mar 2009
    Location
    Brasov, Romania
    Posts
    3,000

    Default

    Parse them with SSNAME, first item had index 0, and add to the first one using SSADD function. To get the size of a selection set use SSLENGTH.
    Regards,
    Mircea

    AutoCAD's happy user equation: FILEDIA + PICKADD² + PICKFIRST = 3

  3. #3
    Forum Deity Tharwat's Avatar
    Discipline
    Mechanical
    Tharwat's Discipline Details
    Occupation
    MEP AutoCAD Draftsman
    Discipline
    Mechanical
    Using
    AutoCAD 2014
    Join Date
    Oct 2009
    Location
    Lives in Abu Dhabi
    Posts
    2,627

    Default

    maybe something like this would work ..... Try it ...

    Code:
    (setq s (ssget))
    
    (setq ss (ssget))
    
    (repeat (setq i (sslength s))
      (ssadd (ssname s (setq i (1- i))) ss)
    )
    - When aim is being settled in my mind , I have to reach it and get it in hand whatever it costs and wherever it is and will never give up . Tharwat said

  4. #4
    Senior Member marko_ribar's Avatar
    Computer Details
    marko_ribar's Computer Details
    Operating System:
    Windows 7 Ultimate X64
    Computer:
    Intel quad core CPU 4x2.66GHz, 8GB RAM
    Motherboard:
    INTEL compatibile
    CPU:
    quad core 4x2.66GHz
    RAM:
    8GB
    Graphics:
    NVIDIA GeForce 6600 GT
    Primary Storage:
    250 GB
    Secondary Storage:
    500 GB
    Monitor:
    Samsung 17''
    Discipline
    Architectural
    marko_ribar's Discipline Details
    Occupation
    Architecture, project designer, project visualisation
    Discipline
    Architectural
    Details
    space design - modeling and animations
    Using
    AutoCAD 2012
    Join Date
    Feb 2010
    Location
    Belgrade, Serbia, Europe
    Posts
    331

    Default

    You can use ACET functions for Selection sets :

    Code:
    (setq sss (acet-ss-union (list ss1 ss2 ss3 ... ssn)))
    M.R.

    Marko Ribar, d.i.a. (graduated engineer of architecture)
    M.R. on YouTube

  5. #5
    Junior Member
    Using
    AutoCAD 2008
    Join Date
    Jun 2012
    Posts
    21

    Default

    Only with express tools... nobody has a function similar to acet-ss-union?

  6. #6
    Forum Deity MSasu's Avatar
    Discipline
    Construction
    MSasu's Discipline Details
    Occupation
    engineer
    Discipline
    Construction
    Details
    AutoLISP programmer
    Using
    AutoCAD 2013
    Join Date
    Mar 2009
    Location
    Brasov, Romania
    Posts
    3,000

    Default

    It is a mater of minutes to write one by yourself using the info above. If you got stuck, then post your attempt here for debug support.
    Regards,
    Mircea

    AutoCAD's happy user equation: FILEDIA + PICKADD² + PICKFIRST = 3

  7. #7
    Forum Deity pBe's Avatar
    Computer Details
    pBe's Computer Details
    Operating System:
    Windows XP
    Discipline
    Construction
    pBe's Discipline Details
    Discipline
    Construction
    Details
    Camp Construction planning and details
    Using
    AutoCAD 2009
    Join Date
    Apr 2010
    Posts
    2,106

    Default

    Quote Originally Posted by drafter007 View Post
    Only with express tools... nobody has a function similar to acet-ss-union?
    What exactly do you have in mind drafter007? It appears that tharwats snippet will accomplish what you need.

  8. #8
    Forum Deity MSasu's Avatar
    Discipline
    Construction
    MSasu's Discipline Details
    Occupation
    engineer
    Discipline
    Construction
    Details
    AutoLISP programmer
    Using
    AutoCAD 2013
    Join Date
    Mar 2009
    Location
    Brasov, Romania
    Posts
    3,000

    Default

    The Express function work with any number of selection sets, while Tharwat's example is limited to only two. I think that this is the reason of OP's complain. But said example code can be used effectively as a starting point to a dedicated function similar with the one from Express pack. This should be easy taking into consideration that OP had already some experience playing with selection sets.
    Regards,
    Mircea

    AutoCAD's happy user equation: FILEDIA + PICKADD² + PICKFIRST = 3

  9. #9
    Forum Deity pBe's Avatar
    Computer Details
    pBe's Computer Details
    Operating System:
    Windows XP
    Discipline
    Construction
    pBe's Discipline Details
    Discipline
    Construction
    Details
    Camp Construction planning and details
    Using
    AutoCAD 2009
    Join Date
    Apr 2010
    Posts
    2,106

    Default

    Quote Originally Posted by MSasu View Post
    ..... But said example code can be used effectively as a starting point to a dedicated function....
    That is correct , I meant to say exactly that

  10. #10
    Junior Member
    Using
    AutoCAD 2008
    Join Date
    Jun 2012
    Posts
    21

    Default

    Registered forum members do not see this ad.

    But i still want to see a function made by some guys with more experience ...please...

Similar Threads

  1. Selection sets in vb.net
    By Jozi68 in forum .NET, ObjectARX & VBA
    Replies: 8
    Last Post: 14th Feb 2012, 07:33 pm
  2. VBA - Selection Sets
    By -KarL- in forum AutoLISP, Visual LISP & DCL
    Replies: 17
    Last Post: 3rd Mar 2009, 10:54 am
  3. VBA - Using IF and selection sets
    By wannabe in forum AutoLISP, Visual LISP & DCL
    Replies: 4
    Last Post: 23rd Oct 2008, 02:09 pm
  4. Little help on selection sets please
    By Galingula in forum AutoCAD Drawing Management & Output
    Replies: 2
    Last Post: 17th Apr 2006, 03:39 pm
  5. selection sets..........
    By rajanikrishna in forum AutoLISP, Visual LISP & DCL
    Replies: 1
    Last Post: 14th Nov 2005, 11:32 am

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts