How do I run a macro from inside a lisp routine?

Discussion in 'AutoCAD' started by ajtruckle, Mar 3, 2005.

  1. ajtruckle

    ajtruckle Guest

    I know how to run a macro from the command line and attach it to a menu or toolbar, but how can I run it inside a lisp routine so that it is part of an overall process held in a lisp?

    I know you run them by doing -vbarun project.macro

    But I am not sure how to call it in a lisp.

    Thanks.
     
    ajtruckle, Mar 3, 2005
    #1
  2. ajtruckle

    James Allen Guest

    Given:
    <dvbname>
    <projectname>
    <macroname>
    and
    (setq Acad-Object (vlax-get-Acad-Object)
    ActiveDocument (vlax-get Acad-Object 'ActiveDocument)
    )
    I use one of these two:
    (vla-SendCommand
    ActiveDocument
    "-vbarun <dvbname>.dvb!<projectname>.Module1.<macroname> "
    )
    or
    (vla-RunMacro Acad-Object "<dvbname>.dvb!Module1.<macroname>")

    --
    James Allen, EIT
    Malicoat-Winslow Engineers, P.C.
    Columbia, MO


    toolbar, but how can I run it inside a lisp routine so that it is part of an
    overall process held in a lisp?
     
    James Allen, Mar 3, 2005
    #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.