Are entities joined?

Discussion in 'AutoCAD' started by Casey Roberts, Jan 27, 2005.

  1. if it's the last command perform (pedit, join, selection set)
    then your (sslength (ssget "p")) should be 1
    if it's more than 1, they didn't all get joined....

    Casey
    (but I'm just a lisp hack so I may be wrong)
     
    Casey Roberts, Jan 27, 2005
    #1
  2. Nevermind, I was wrong.



     
    Casey Roberts, Jan 27, 2005
    #2
  3. Casey Roberts

    BillZ Guest

    R2005:

    What is a good way to test to see if all entities in a selection set get joined using the pedit command?

    (command "_.pedit" (ssname ss7 0) "J" ss7 "" "X")

    Need to have an alert in case it doesn't finish clean.

    TIA

    Bill
     
    BillZ, Jan 28, 2005
    #3
  4. Just a guess, but maybe you could count the number
    of segments before and after?

    --
    Autodesk Discussion Group Facilitator



    joined using the pedit command?
     
    Jason Piercey, Jan 28, 2005
    #4
  5. Casey Roberts

    James Allen Guest

    Hi Bill, I'm skeptical, but does this work for you? Ssname still returns
    the ename after pedit, but entget returns nil if the ename was joined (i.e.
    no longer exists).
    --
    James Allen, EIT
    Malicoat-Winslow Engineers, P.C.
    Columbia, MO

    Code:
    ; Minimally tested in a2k5
    (defun joined-p (ss / cnt n)
    (setq n   (sslength ss)
    cnt 0
    )
    (repeat n
    (setq n (1- n))
    (if (entget (ssname ss n))
    (setq cnt (1+ cnt))
    )
    )
    (if (= cnt 0) t)
    )
    

    joined using the pedit command?
     
    James Allen, Jan 28, 2005
    #5
  6. Casey Roberts

    BillZ Guest

    Thanks guys,

    I was thinking along these lines.
    Thought maybe there was a standard way.

    Busy day, I'll have to test later.

    Bill
     
    BillZ, Jan 28, 2005
    #6
  7. Casey Roberts

    TCEBob Guest

    About what? I just tried it and it works fine.

    rs
     
    TCEBob, Jan 28, 2005
    #7
  8. Casey Roberts

    BillZ Guest

    Thanks,
    I already tried that. :)

    Bill
     
    BillZ, Jan 31, 2005
    #8
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.