Lisp -> VBA -> VBA

Discussion in 'AutoCAD' started by cesi2d, Jun 14, 2004.

  1. cesi2d

    cesi2d Guest

    Hello

    We have a problem for executing lisp defuns from vba module , itself from
    lisp defun
    the second defun is not used.

    Lisp Defun1
    ... some lines
    ... (VL-VBRUN MyMacro)
    ... some other lines
    end of defun1

    VBA MyMacro
    ... some instructions
    ... SendCommand DEFUN2
    ... other instructions
    end of macro

    Lisp DEFUN2
    ... do everythink
    end of defun2

    but then executing the SENDCOMMAND instruction , the defun2 lisp isn't
    executed, but the end
    of the Defun1 is , and the macro is always running

    THAT APPEND ????

    thanks for help

    --
    Cesi2d
    Luc Vallot
    Chemin du Bassard
    38121 Chonas l ' amballan
    France


    Tel: 04 74 58 95 68
     
    cesi2d, Jun 14, 2004
    #1
  2. cesi2d

    Ed Jobe Guest

    The SendCommand function is not a direct replacement for the lisp (command) function. SendCommand is "asyncronous", which means it usually runs after your vba finishes. Which means you have a timing problem. You probably will have to resort to executing lisp directly throught the visual lisp interface. Search this ng. Frank Oquendo recently posted his vlax.cls for doing this.

    --
    ----
    Ed
    ----
    Hello

    We have a problem for executing lisp defuns from vba module , itself from
    lisp defun
    the second defun is not used.

    Lisp Defun1
    ... some lines
    ... (VL-VBRUN MyMacro)
    ... some other lines
    end of defun1

    VBA MyMacro
    ... some instructions
    ... SendCommand DEFUN2
    ... other instructions
    end of macro

    Lisp DEFUN2
    ... do everythink
    end of defun2

    but then executing the SENDCOMMAND instruction , the defun2 lisp isn't
    executed, but the end
    of the Defun1 is , and the macro is always running

    THAT APPEND ????

    thanks for help

    --
    Cesi2d
    Luc Vallot
    Chemin du Bassard
    38121 Chonas l ' amballan
    France


    Tel: 04 74 58 95 68
     
    Ed Jobe, Jun 14, 2004
    #2
  3. cesi2d

    cesi2d Guest

    but problem , vlax.cls don't work in OEM development
    "Ed Jobe" <> a écrit dans le message de The SendCommand function is not a direct replacement for the lisp (command) function. SendCommand is "asyncronous", which means it usually runs after your vba finishes. Which means you have a timing problem. You probably will have to resort to executing lisp directly throught the visual lisp interface. Search this ng. Frank Oquendo recently posted his vlax.cls for doing this.

    --
    ----
    Ed
    ----
    Hello

    We have a problem for executing lisp defuns from vba module , itself from
    lisp defun
    the second defun is not used.

    Lisp Defun1
    ... some lines
    ... (VL-VBRUN MyMacro)
    ... some other lines
    end of defun1

    VBA MyMacro
    ... some instructions
    ... SendCommand DEFUN2
    ... other instructions
    end of macro

    Lisp DEFUN2
    ... do everythink
    end of defun2

    but then executing the SENDCOMMAND instruction , the defun2 lisp isn't
    executed, but the end
    of the Defun1 is , and the macro is always running

    THAT APPEND ????

    thanks for help

    --
    Cesi2d
    Luc Vallot
    Chemin du Bassard
    38121 Chonas l ' amballan
    France


    Tel: 04 74 58 95 68
     
    cesi2d, Jun 15, 2004
    #3
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.