Results 1 to 4 of 4

Thread: macro:

  1. #1
    100 Club
    Join Date
    2004-08
    Location
    Beaverton, Or.
    Posts
    132
    Login to Give a bone
    0

    Default macro:

    I have a VBA macro loaded automatically with every drawing opened or new drawing created.

    (COMMAND "-VBARUN" "timelog.dvb!Module1.login")

    It works fine as long as you are opening one drawing at a time, but if I try opening multiple drawings autocad hangs with "MACRO:" at the command prompt. The only way I can get cad to continue is to use a cancel button I have programed into the menu.(the keyboard is unresponsive)

  2. #2
    Active Member
    Join Date
    2007-12
    Posts
    68
    Login to Give a bone
    0

    Default Re: macro:

    try something like this:

    (vl-vbaload "c:/timelog.dvb")
    (VL-VBARUN "Module1.login")

  3. #3
    The Silent Type RobertB's Avatar
    Join Date
    2000-01
    Location
    Seattle WA USA
    Posts
    5,859
    Login to Give a bone
    0

    Default Re: macro:

    Make sure your macros are executed from with the S::Startup Visual LISP routine.
    R. Robert Bell
    Design Technology Manager
    Stantec
    Opinions expressed are mine alone and do not reflect the views of Stantec.

  4. #4
    I could stop if I wanted to
    Join Date
    2002-02
    Location
    Kansas
    Posts
    487
    Login to Give a bone
    0

    Default Re: macro:

    Try puting your macro in the ACAD.dvb this will auto load with autocad start

    then run you macro by calling it from the Appilcation.EndOpen Event of Autocad

    This way ever Drawing open will call the macro after it is open up.

    or you can make your macro the code for the Appilcation.EndOpen Event of Autocad

Similar Threads

  1. CP222-2: Autodesk Revit VSTA: Writing Your First Macro An Introduction to the Macro Manager
    By Autodesk University in forum Customization and Programming
    Replies: 0
    Last Post: 2014-12-01, 02:12 AM
  2. Run Macro
    By rafael.freitas in forum VBA/COM Interop
    Replies: 1
    Last Post: 2010-05-25, 02:58 PM
  3. 2011: Macro's
    By JLHConsulting in forum AutoCAD General
    Replies: 2
    Last Post: 2010-04-27, 06:02 PM
  4. Challenging Macro to reverse the function of an existing macro
    By parminderkeilah in forum VBA/COM Interop
    Replies: 1
    Last Post: 2008-05-19, 02:50 PM
  5. call script within macro & nested macro
    By wahyudin in forum AutoCAD LT - General
    Replies: 3
    Last Post: 2007-10-22, 01:10 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •