Include Object

Discussion in 'AutoCAD' started by Kenny Poong, Jul 17, 2003.

  1. Kenny Poong

    Kenny Poong Guest

    Hi,

    Lisp below allow me to select solid hatch object & bring it to back.
    How can I include the 2D solid object to the selection.

    thanks in advance.



    (defun c:MB ( / a )
    (setq a (ssget "X"
    (list (cons 0 "HATCH")
    (cons 2 "SOLID")
    )
    )
    )
    (command "Draworder" a "" "B")
    (princ)
    )
     
    Kenny Poong, Jul 17, 2003
    #1
  2. Kenny Poong

    Mark Guest

    add "or"s & "and"s to the filter, something like this ...

    (ssget "X" (list (cons -4 "<OR")
    (cons -4 "<AND")(cons 0 "HATCH")(cons 2 "SOLID")(cons -4 "AND>")
    (cons 0 "SOLID")
    (cons -4 "OR>") ) )
     
    Mark, Jul 17, 2003
    #2
  3. Kenny Poong

    JJ Guest

    I think this might be what you are looking for:

    (setq sset (ssget "x"
    '((-4 . "<OR")
    (0 . "HATCH")
    (0 . "SOLID")
    (-4 . "OR>")
    )
    ) ;ssget
    ) ;setq

    or maybe:

    (setq sset (ssget "x"
    '((-4 . "<OR")
    (-4 . "<AND")
    (0 . "HATCH")
    (2 . "SOLID")
    (-4 . ">AND")
    (0 . "SOLID")
    (-4 . "OR>")
    )
    ) ;ssget
    ) ;setq


    JJ
    KJLISP CADD solutions.
     
    JJ, Jul 17, 2003
    #3
  4. Kenny Poong

    Kenny Poong Guest

    Thanks guy, it works great !!
     
    Kenny Poong, Jul 18, 2003
    #4
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.