call Lisp function from VB6

Discussion in 'AutoCAD' started by kipshas, Apr 4, 2005.

  1. kipshas

    kipshas Guest

    Hi all,
    I need to call lisp function from vb then wait until it finishes then go on
    with VB ...
    I use late-binding so I can't find how to use acad events (in earlier
    version I just waited for _SysVarChanged event (Lisp was changing it after
    everithing ok).
    Please help ...
     
    kipshas, Apr 4, 2005
    #1
  2. Check out the "EndLisp" event in the sample "example_events.DVB"
    In help menu search for "Enabling Document Level Events in Environments
    Other Than VBA" Same idea as App level events within vba.

    May be an eaiser way, don't know. Someone will though.

    gl
    Paul
     
    Paul Richardson, Apr 4, 2005
    #2
  3. kipshas

    Danno Guest

    Kipshas,

    This is a cheap way of running lisp from vb, but for some of the programs we use
    thisdrawing.SendCommand ("SCRIPT C:/somedirectory/somelispprogram" & vbCr)
    Then issue a delay...
    thisdrawing.SendCommand ("delay 1000" & vbCr)

    If you are running vb outside of the autocad environment you can always issue a "sleep", or have lisp add a text file to some directory and have the vb program wait for the text file, when it is created vb deletes the file a proceeds with execution. These are cheap ways of doing these things.. but if you figure out how to do it with events.. please let me know.
    thanks,
    Daniel
     
    Danno, Apr 4, 2005
    #3
  4. kipshas

    kipshas Guest

    My problem is that I have to use late-binding, but with early-binding it's
    simple, cal lisp with sendcommand method that trap event SysVarChanged (at
    the end of lisp function I change the sysvar and thats alll).
     
    kipshas, Apr 5, 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.