Events inside events

Discussion in 'AutoCAD' started by Matthew, Feb 16, 2005.

  1. Matthew

    Matthew Guest

    How do I define an event procedure to fire only after another one is fired,
    and then shut itself off after it done?

    I'm trying to come up with the VBA equivalent to the S::Startup function. I
    don't have access to the Acad.lsp file. I found a post here about the
    endopen event and learned that it needs to go in a class module. I would
    like to load a lisp function after it has been opened. but I need to wait
    till the command prompt is active again.

    From inside the App_EndOpen event what other event would you wait for, or
    How would you know if the command prompt is active?

    Thanks
    Matthew
     
    Matthew, Feb 16, 2005
    #1
  2. Matthew

    Oberer Guest

    Sorry I can't offer any help Matthew. However, i'm curious as to the timing of this. Why is this lisp so important to be loaded with such precise timing?
     
    Oberer, Feb 16, 2005
    #2
  3. Matthew

    Matthew Guest

    Timing had nothing to do with it, it was more of a load order. I was trying
    to use the VLAX class to load a lisp function but that will not work till
    after the command prompt is active again. the EndOpen event fires before I
    can Use the VLAX class from Frank Q.
    I get an error message:

    Run-time error '2000':
    no applicable method for (lisplet-set-current nil)

    from this line
    VLObj.EvalLispExpression("(Load ""AC_UTILS.LSP"")")

    or If I do a sendkeys ("(Load ""AC_UTILS.LSP"")") I get a "AutoCAD is Busy"
    alert message.
    I have to wait for something else but I don't know what. I have resorted
    setting a variable in the EndOpen event then checking it's status in the
    other event.


    Thanks
    Matthew

    timing of this. Why is this lisp so important to be loaded with such precise
    timing?
     
    Matthew, Feb 16, 2005
    #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.