Ssget Filtet list

Discussion in 'AutoCAD' started by SixFeet6, Dec 17, 2004.

  1. SixFeet6

    SixFeet6 Guest

    how do i select all polylines in layer "X" but excluding those with linetype "DOT", all other have linetype "BYLAYER"
    (ssget "_X" (list (cons 0 "LWPOLYLINE,POLYLINE") (cons 8 "X") (cons -4 "NOT") (cons 6 "DOT") (cons -4 "NOT")))

    does not seem to be excepted.

    thk you
     
    SixFeet6, Dec 17, 2004
    #1
  2. SixFeet6

    Tom Smith Guest

    (ssget "_X" (list (cons 0 "LWPOLYLINE,POLYLINE") (cons 8 "X") (cons -4
    "NOT") (cons 6 "DOT") (cons -4 "NOT")))

    Check the docs -- (cons -4 "<not") and (cons -4 "not>")
     
    Tom Smith, Dec 17, 2004
    #2
  3. SixFeet6

    BillZ Guest

    (ssget "_X" (list (cons 0 "LWPOLYLINE,POLYLINE") (cons 8 "X")(cons 6 "~DOT")))
     
    BillZ, Dec 17, 2004
    #3
  4. SixFeet6

    Tom Smith Guest

    (ssget "_X" (list (cons 0 "LWPOLYLINE,POLYLINE") (cons 8 "X")(cons 6
    "~DOT")))

    Very slick, Bill! In this case there are no variables involved, so the list
    could be quoted...

    (ssget "_X" '((0 . "LWPOLYLINE,POLYLINE") (8 . "X")(6 . "~DOT")))
     
    Tom Smith, Dec 17, 2004
    #4
  5. SixFeet6

    BillZ Guest

    In this case there are no variables involved, so the list
    could be quoted...<<<

    I thought maybe to try that, but.....

    Thanks

    Bill
     
    BillZ, Dec 17, 2004
    #5
  6. SixFeet6

    Tom Smith Guest

    I thought maybe to try that, but.....

    Your suggestion was great because it showed a couple of handy ways to
    abbreviate a filter list -- multiple items separated by commas, and the
    exclusion operator ~ in lieu of the -4 "not" groups. It's easy to overlook
    shortcuts like those.
     
    Tom Smith, Dec 17, 2004
    #6
  7. SixFeet6

    BillZ Guest

    Your suggestion was great because it showed a couple of handy ways to
    abbreviate a filter list -- multiple items separated by commas, and the
    exclusion operator ~ in lieu of the -4 "not" groups. It's easy to overlook
    shortcuts like those.<<<

    It's all stuff I learned hangin' around you guys. :^)

    Bill
     
    BillZ, Dec 17, 2004
    #7
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.