ssget

Discussion in 'AutoCAD' started by StefVdM, Nov 8, 2004.

  1. StefVdM

    StefVdM Guest

    Hi all,

    anybody knows why this is accepted:

    (setq ss (ssget "X" '((0 . "INSERT") (2 . "blockname"))))

    and this isn't:

    (setq ss (ssget "X" '((0 . "INSERT") (cons 2 block))))

    where block is a variable with value "blockname".

    ??

    Thanks

    Stef
     
    StefVdM, Nov 8, 2004
    #1
  2. StefVdM

    Alaspher Guest

    You should do:
    (setq ss (ssget "X" (list '(0 . "INSERT") (cons 2 block))))
    if want to use function "cons", because ' = (quote <expr>) - "Returns an expression without evaluating it" (from help).

    Regards
     
    Alaspher, Nov 8, 2004
    #2
  3. StefVdM

    StefVdM Guest

    Hi Alaspher,

    That did the trick. Thanks a lot!

    Stef
     
    StefVdM, Nov 8, 2004
    #3
  4. StefVdM

    Adesu Guest

    HI StefVdM, maybe it should be

    (setq ss (ssget "X" '((0 . "INSERT") (cons 2 "block"))))

    not this below

    (setq ss (ssget "X" '((0 . "INSERT") (cons 2 block))))
     
    Adesu, Nov 9, 2004
    #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.