+ Reply to Thread
Page 2 of 3 FirstFirst 1 2 3 LastLast
Results 11 to 20 of 23
  1. #11
    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

    Registered forum members do not see this ad.

    Quote Originally Posted by drafter007 View Post
    But i still want to see a function made by some guys with more experience ...please...
    You should be thankful for all people whom treated you as a man to help you out with your question and not to be ungrateful .
    - 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

  2. #12
    Quantum Mechanic Lee Mac's Avatar
    Computer Details
    Lee Mac's Computer Details
    Operating System:
    Windows 7 Ultimate (32-bit)
    Discipline
    Multi-disciplinary
    Lee Mac's Discipline Details
    Discipline
    Multi-disciplinary
    Details
    Custom Programming / Software Customisation
    Using
    AutoCAD 2013
    Join Date
    Aug 2008
    Location
    London, England
    Posts
    15,718

    Default

    Here is one way:

    Code:
    ;; Selection Set Union  -  Lee Mac
    ;; Returns the union of a list of Selection Sets
    
    (defun LM:ss-union ( lst / out )
        (setq lst (vl-sort lst '(lambda ( a b ) (> (sslength a) (sslength b))))
              out (car lst)
        )
        (foreach ss (cdr lst)
            (repeat (setq i (sslength ss))
                (ssadd (ssname ss (setq i (1- i))) out)
            )
        )
        out
    )
    Here is a 'cheats' way:

    Code:
    (defun ss-union ( lst )
        (apply 'vl-cmdf (append '("_.select") lst '("")))
        (ssget "_P")
    )
    Lee Mac Programming

    With Mathematics there is the possibility of perfect rigour, so why settle for less?

    Just another Swamper

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

    Default

    Thanks Lee! One more beer i owe you...

  4. #14
    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,097

    Default

    Quote Originally Posted by Lee Mac View Post
    Here is one way:

    Code:
    (defun LM:ss-union ( lst / out ).....
    .....
    )
    There you go

    After looking the linky MSasu posted on his previous post. My thought was the "list with multiple selection sets" you are refering to are a list of enames as elements. but reading further ahead , you change your aapproach to collecting points then
    ssget "_CP"

    But anyhoo, Hope you dont mind me asking, are those selection sets resulted from a single call to a lisp routine?

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

    Default

    Yes, a single call, but i modified the lisp to have multiple selection - multiple points of selection - so i have a list with multiple selection sets...
    Sorry for my way of working and for my bad explanations...

  6. #16
    Quantum Mechanic Lee Mac's Avatar
    Computer Details
    Lee Mac's Computer Details
    Operating System:
    Windows 7 Ultimate (32-bit)
    Discipline
    Multi-disciplinary
    Lee Mac's Discipline Details
    Discipline
    Multi-disciplinary
    Details
    Custom Programming / Software Customisation
    Using
    AutoCAD 2013
    Join Date
    Aug 2008
    Location
    London, England
    Posts
    15,718

    Default

    Quote Originally Posted by drafter007 View Post
    Thanks Lee! One more beer i owe you...
    You're welcome drafter007, though, I would encourage you to attempt to code these tasks yourself before expecting a solution to be provided.
    Lee Mac Programming

    With Mathematics there is the possibility of perfect rigour, so why settle for less?

    Just another Swamper

  7. #17
    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
    328

    Default

    Quote Originally Posted by drafter007 View Post
    Only with express tools... nobody has a function similar to acet-ss-union?
    Every AutoCAD has ACET functions loaded and no need to do anything but use them...

    My solution is fastest as it was made by Autodesk for exactly these purposes...

    You can also check :
    (acet-ss-remove (smaller ss2) (bigger ss1)) - returns ss difference (ss1-ss2)
    (acet-ss-intersection ss1 ss2) - returns ss with objects that are both in ss1 and ss2

    (acet-ss-union (list ss1 ss2 ss3 ... ssn)) - returns ss addition (ss1+ss2+ss3+...+ssn)

    M.R.

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

  8. #18
    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,097

    Default

    I'll go with the OP on this one Marko. I would think its not the just having to use a particular function that interest the OP, but how it was done

    I applaud the forum members who help/assist/advice/suggest and even write the code itself to help others.

    Cheers

  9. #19
    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
    328

    Default

    pBe, I've also tried this once on www.augi.com :
    http://forums.augi.com/showthread.ph...functions&p=#1

    But results were slow if ssets were large, so after a while doing my research on this topic, my conclusion was that the best thing is to use already predefined functions... Maybe, you don't agree with me, but to me they do the job fine and more important I think faster then any of above proposed codes...

    M.R.
    (test it and if you disagree reply...)

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

  10. #20
    Quantum Mechanic Lee Mac's Avatar
    Computer Details
    Lee Mac's Computer Details
    Operating System:
    Windows 7 Ultimate (32-bit)
    Discipline
    Multi-disciplinary
    Lee Mac's Discipline Details
    Discipline
    Multi-disciplinary
    Details
    Custom Programming / Software Customisation
    Using
    AutoCAD 2013
    Join Date
    Aug 2008
    Location
    London, England
    Posts
    15,718

    Default

    Registered forum members do not see this ad.

    Quote Originally Posted by marko_ribar View Post
    Every AutoCAD has ACET functions loaded and no need to do anything but use them...
    Some users don't have Express Tools installed / loaded.
    Lee Mac Programming

    With Mathematics there is the possibility of perfect rigour, so why settle for less?

    Just another Swamper

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