AutoLISP and Diesel expressions. Need little help.

Discussion in 'AutoCAD' started by adnan, Nov 1, 2004.

  1. adnan

    adnan Guest

    Hello.
    I'm still new to all this customization mumbo-jumbo.
    My problem is following:
    -Need to set USERS1 variable in AutoLISP to store Diesel expression,
    -for example:
    (setvar “USERS1†“$(getvar, “dwgprefixâ€)â€)

    The problem is how to keep quote signs around dwgprefix variable?
    Has to be saved in this format $(getvar, “dwgprefixâ€).

    Any input appreciated.
     
    adnan, Nov 1, 2004
    #1
    1. Advertisements

  2. adnan

    ECCAD Guest

    Try this - watch for word wrap.
    (setvar "users1" (strcat "$(getvar, " chr(34) (getvar "dwgprefix") chr(34) ")")

    Bob
     
    ECCAD, Nov 1, 2004
    #2
    1. Advertisements

  3. adnan

    adnan Guest

    Thank you for speedy replay.
    I tried it.
    Lisp console returns " error: bad function: 34".
     
    adnan, Nov 1, 2004
    #3
  4. adnan

    DaveS Guest

    (setvar "USERS1" "$(getvar, \"dwgprefix\")")

    Try that. :O)

    Have fun,
    Dave
     
    DaveS, Nov 1, 2004
    #4
  5. adnan

    ECCAD Guest

    My bad, should have been:
    (setvar "users1" (strcat "$(getvar, " (chr 34) (getvar "dwgprefix") (chr 34) ")"))

    Bob
     
    ECCAD, Nov 1, 2004
    #5
  6. adnan

    adnan Guest

    This one works.
    (setvar "users1"
    (strcat "$(getvar, " (chr 34) "dwgprefix" (chr 34) ")")
    )
     
    adnan, Nov 1, 2004
    #6
  7. Hi adnan,

    Slightly misplaced " ( " I think, try this...

    (setvar "users1" (strcat "$(getvar, " (chr 34) (getvar "dwgprefix") (chr 34)
    ")"))

    Arnold Williams
     
    Arnold Williams, Nov 1, 2004
    #7
    1. Advertisements

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.