SSGET with "WP"

Discussion in 'AutoCAD' started by Adesu, Dec 9, 2004.

  1. Adesu

    Adesu Guest

    On area p3 there are 6 line with color 1 to 6.

    _$ (setq p3 '((0 0)(10 0)(10 10)(0 10)))

    ((0 0) (10 0) (10 10) (0 10))

    _$ (setq ss (ssget "_WP" p3 '((0 . "LINE")(62 . 5))))

    nil

    I've tested a ssget with filter "wp",but result is "nil"
     
    Adesu, Dec 9, 2004
    #1
  2. Adesu

    LUCAS Guest

    Are you sure the lines color not bylayer!
     
    LUCAS, Dec 9, 2004
    #2
  3. Adesu

    Adesu Guest

    Hi LUCAS,it is OK,and we set by layer,thanks

    _$ (setq p3 '((0 0)(10 0)(10 10)(0 10)))
    ((0 0) (10 0) (10 10) (0 10))
    _$ (setq ss (ssget "_WP" p3 '((0 . "LINE")(62 . 5))))
    <Selection set: 2>
    _$
    _$ (setq e (sslength ss))
    1
    _$ (setq en (ssname ss 0))
    <Entity name: 14755c0>
    _$ (setq ent (entget en))
    ((-1 . <Entity name: 14755c0>) (0 . "LINE") (330 . <Entity name: 14754f8>)
    (5 . "78") (100 . "AcDbEntity") (67 . 0) (410 . "Model") (8 . "0") (62 . 5)
    (100 . "AcDbLine") (10 1.0 8.0 0.0) (11 6.0 8.0 0.0) (210 0.0 0.0 1.0))
    _$ (setq colorname (cdr (assoc 62 ent)))
    5
    _$
     
    Adesu, Dec 9, 2004
    #3
  4. Adesu

    T.Willey Guest

    With the "wp" option I think that the whole entity has to be within the window. Maybe try the "cp" option and see if you pick up the objects.

    Tim
     
    T.Willey, Dec 9, 2004
    #4
  5. Adesu

    liftedaxis Guest

    also note, that the WP selection cannot select anything outside the visible viewport. so it's always best to preface your selection line of code with a Zoom Extents, then select, then Zoom Previous.

    --Jeremiah
     
    liftedaxis, Dec 9, 2004
    #5
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.