<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Automatically run a macro in VBA Forum</title>
    <link>https://forums.autodesk.com/t5/vba-forum/automatically-run-a-macro/m-p/2217420#M20373</link>
    <description>hi,&lt;BR /&gt;
fisrt&lt;BR /&gt;
Have a look at how use  acad.lsp or acaddoc.lsp in help of acad&lt;BR /&gt;
in acad.lsp you can add:&lt;BR /&gt;
&lt;BR /&gt;
(defun S::STARTUP()&lt;BR /&gt;
	(vl-vbarun "ACADStartup") ; &lt;BR /&gt;
) ; fin S::STARTUP&lt;BR /&gt;
&lt;BR /&gt;
By this way you can run in lisp starup a vba routine !&lt;BR /&gt;
&lt;BR /&gt;
and in acad.dvb Thisdrawwing&lt;BR /&gt;
&lt;BR /&gt;
Option Explicit&lt;BR /&gt;
Public WithEvents acadApp As AcadApplication&lt;BR /&gt;
Sub ACADStartup()&lt;BR /&gt;
 ' your commands&lt;BR /&gt;
end sub&lt;BR /&gt;
&lt;BR /&gt;
Private Sub ACADApp_AppActivate()&lt;BR /&gt;
    ' first activation of acad&lt;BR /&gt;
End Sub&lt;BR /&gt;
&lt;BR /&gt;
Did you have put :&lt;BR /&gt;
&lt;BR /&gt;
acad.rx file with files acad.dvb, acad.lsp &lt;BR /&gt;
&lt;BR /&gt;
and define file path in support path ?&lt;BR /&gt;
&lt;BR /&gt;
Daniel OLIVES</description>
    <pubDate>Wed, 02 Apr 2008 19:47:17 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2008-04-02T19:47:17Z</dc:date>
    <item>
      <title>Automatically run a macro</title>
      <link>https://forums.autodesk.com/t5/vba-forum/automatically-run-a-macro/m-p/2217417#M20370</link>
      <description>Hi!&lt;BR /&gt;
I have created super-program:&lt;BR /&gt;
;;;;;;;;;;;;;;;;;;;;;;;;&lt;BR /&gt;
Sub Hello()&lt;BR /&gt;
msgbox "Hello_World"&lt;BR /&gt;
end sub&lt;BR /&gt;
;;;;;;;;;;;;;;;;;;;;;;;;;&lt;BR /&gt;
Then saved this file as Hello.dvb in D:\\, then added line in the end of file acad2008doc.lsp  this line:&lt;BR /&gt;
(vl-vbarun "D:\\Hello.dvb!Hello")&lt;BR /&gt;
Now, when i try open multiple files from SheetSet, Autocad hanging (in command line "macro name:").&lt;BR /&gt;
Any solution?</description>
      <pubDate>Sat, 29 Mar 2008 09:13:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/automatically-run-a-macro/m-p/2217417#M20370</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-03-29T09:13:45Z</dc:date>
    </item>
    <item>
      <title>Re: Automatically run a macro</title>
      <link>https://forums.autodesk.com/t5/vba-forum/automatically-run-a-macro/m-p/2217418#M20371</link>
      <description>Hi,&lt;BR /&gt;
Just put in AcadDoc.lsp or Acad.lsp this :&lt;BR /&gt;
&lt;BR /&gt;
(defun c:vbRUNRoutine () &lt;BR /&gt;
	(vl-load-com)&lt;BR /&gt;
	(vl-vbarun  "Acad.dvb!ModuleName.RoutineNAme")&lt;BR /&gt;
)&lt;BR /&gt;
&lt;BR /&gt;
And put &lt;BR /&gt;
&lt;BR /&gt;
acvba.arx in a file text name :&lt;BR /&gt;
&lt;BR /&gt;
acad.rx&lt;BR /&gt;
&lt;BR /&gt;
This run automaticaly Acad.dvb&lt;BR /&gt;
&lt;BR /&gt;
Now command line:&lt;BR /&gt;
vbRUNRoutine&lt;BR /&gt;
&lt;BR /&gt;
Run VBA routine !&lt;BR /&gt;
&lt;BR /&gt;
A french user&lt;BR /&gt;
Daniel OLIVES</description>
      <pubDate>Mon, 31 Mar 2008 19:36:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/automatically-run-a-macro/m-p/2217418#M20371</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-03-31T19:36:37Z</dc:date>
    </item>
    <item>
      <title>Re: Automatically run a macro</title>
      <link>https://forums.autodesk.com/t5/vba-forum/automatically-run-a-macro/m-p/2217419#M20372</link>
      <description>It does not work. I want to execute automatically my macro each time by starting a new drawing or opening an existing one. Try to open multiple files from SheetSet Manager</description>
      <pubDate>Tue, 01 Apr 2008 09:33:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/automatically-run-a-macro/m-p/2217419#M20372</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-04-01T09:33:28Z</dc:date>
    </item>
    <item>
      <title>Re: Automatically run a macro</title>
      <link>https://forums.autodesk.com/t5/vba-forum/automatically-run-a-macro/m-p/2217420#M20373</link>
      <description>hi,&lt;BR /&gt;
fisrt&lt;BR /&gt;
Have a look at how use  acad.lsp or acaddoc.lsp in help of acad&lt;BR /&gt;
in acad.lsp you can add:&lt;BR /&gt;
&lt;BR /&gt;
(defun S::STARTUP()&lt;BR /&gt;
	(vl-vbarun "ACADStartup") ; &lt;BR /&gt;
) ; fin S::STARTUP&lt;BR /&gt;
&lt;BR /&gt;
By this way you can run in lisp starup a vba routine !&lt;BR /&gt;
&lt;BR /&gt;
and in acad.dvb Thisdrawwing&lt;BR /&gt;
&lt;BR /&gt;
Option Explicit&lt;BR /&gt;
Public WithEvents acadApp As AcadApplication&lt;BR /&gt;
Sub ACADStartup()&lt;BR /&gt;
 ' your commands&lt;BR /&gt;
end sub&lt;BR /&gt;
&lt;BR /&gt;
Private Sub ACADApp_AppActivate()&lt;BR /&gt;
    ' first activation of acad&lt;BR /&gt;
End Sub&lt;BR /&gt;
&lt;BR /&gt;
Did you have put :&lt;BR /&gt;
&lt;BR /&gt;
acad.rx file with files acad.dvb, acad.lsp &lt;BR /&gt;
&lt;BR /&gt;
and define file path in support path ?&lt;BR /&gt;
&lt;BR /&gt;
Daniel OLIVES</description>
      <pubDate>Wed, 02 Apr 2008 19:47:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/automatically-run-a-macro/m-p/2217420#M20373</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-04-02T19:47:17Z</dc:date>
    </item>
    <item>
      <title>Re: Automatically run a macro</title>
      <link>https://forums.autodesk.com/t5/vba-forum/automatically-run-a-macro/m-p/2217421#M20374</link>
      <description>Thanks Daniel!&lt;BR /&gt;
BUT: this is NOT working when i  simultaneously open multiple layouts from SheetSet Manager. Try it yourself</description>
      <pubDate>Thu, 03 Apr 2008 06:11:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/automatically-run-a-macro/m-p/2217421#M20374</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-04-03T06:11:02Z</dc:date>
    </item>
    <item>
      <title>Re: Automatically run a macro</title>
      <link>https://forums.autodesk.com/t5/vba-forum/automatically-run-a-macro/m-p/2217422#M20375</link>
      <description>Open the System tab of the Options GUI and check "Load acad.lsp with every drawing"</description>
      <pubDate>Thu, 03 Apr 2008 16:53:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/automatically-run-a-macro/m-p/2217422#M20375</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-04-03T16:53:30Z</dc:date>
    </item>
  </channel>
</rss>

