vba user variable value to lisp does not work

Discussion in 'AutoCAD' started by tombates, May 16, 2007.

  1. tombates

    tombates Guest

    I want to print out the value of a variable obtained in a vba
    routine. A lisp routine will print the value of the variable. That
    which I tried does not work

    Help

    I want to retrieve the value of a variable which I input in a vba
    routine. Below please find the wording from the vba routine and the
    wording from the lisp file. What am I doing wrong
    Mary

    vba wording

    retVal = ThisDrawing.Utility.GetString(1, "Enter your name: ")
    sysVarName1 = "USERS1"
    sysVarData1 = retVal
    ThisDrawing.SetVariable sysVarName1, sysVarData1

    ThisDrawing.SendCommand "(load ""mylisp"")" & vbCr
    ThisDrawing.SendCommand "mylisp users1" & vbCr

    lisp wording


    mylisp.lsp
    (defun c:mylisp()
    (print users1)
    )
     
    tombates, May 16, 2007
    #1
  2. tombates

    tombates Guest

    I answered my own question. use (print (getvar "users1"))

    Mary
     
    tombates, May 17, 2007
    #2
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.