Why error

Discussion in 'AutoCAD' started by Adesu, Jan 4, 2005.

  1. Adesu

    Adesu Guest

    _2$ (setq ss (ssget "x" '((cons 0 ob))))

    ; error: bad SSGET list

    _3$ (setq ss (ssget "x" '((0 . "POINT"))))

    <Selection set: 1c>
     
    Adesu, Jan 4, 2005
    #1
  2. Try

    (setq ss (ssget "x" (list (cons 0 ob))))

    When using CONS, do not QUOTE the list
     
    Jason Piercey, Jan 4, 2005
    #2
  3. Adesu

    Adesu Guest

    _3$ (setq ob (strcase (getstring "\nENTER NAME OBJECT: ")))

    "POINT"

    _3$ (setq ss (ssget "x" (list (cons 0 ob))))

    <Selection set: 10>

    Hi Jason,that right and thanks a lot
     
    Adesu, Jan 4, 2005
    #3
  4. Adesu

    Tom Smith Guest

    It is an easy mistake to make. You can't quote the filter list unless you
    want it to be taken literally, for instance (setq ss (ssget "x" '((0 .
    "POINT")))). If there's anything in the list that needs to be evaluated,
    such as a cons or a variable name, then you have to do it as Jason showed.
     
    Tom Smith, Jan 4, 2005
    #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.