Wouldn't you have to tell AutoCAD where to find the macro? Something along the lines of -vbarun"C:\Macros\mycustom_macro".

Registered forum members do not see this ad.
Hello there ,
I was searching all over the forum but i didnt find, how tu run load macro from command line automaticly.
if i use :
-vbarun
ask me for a name of macro when i tiped in its all Ok then RUn my macro.
but how can i use -vbarun in one line because i want to have shortcut in my button.
itried;:
-vbarun;macro_name didnt work
i hope u understend my problem.
I want to tipe command that execute macro in on line in command line. My macro it loaded in stratup suit.
thx
Wouldn't you have to tell AutoCAD where to find the macro? Something along the lines of -vbarun"C:\Macros\mycustom_macro".
"I have only come here seeking knowledge. Things they wouldn't teach me of in college." The Police
Eat brains...gain more knowledge!
defun it to Lisp Command
(vl-load-com)
(defun c:ttx() (vla-runmacro (vlax-get-acad-object) "D:\Project.dvb!ThisDrawing.tt"))

I use the following syntax
I must note, however; that I put the above into a script file; and then create a toolbar button to open the script file.Code:-vbaload;"C:/AutoCAD/VBA/filename.dvb;-vbarun;"C:/AutoCAD/VBA/filename.dvb!macroname"
Life's constantly changing - keep up or get left behind

ok i tried i have acad 2009 map:
my file is located on :and i do this shortcut but dont work:HTML Code:C:\Program Files\AutoCAD Map 3D 2009\Iztok nastavitve\IzrNiv.dvb
-vbaload;"C:\Program Files\AutoCAD Map 3D 2009\Iztok nastavitve\IzrNiv.dvb;-vbarun;"C:\Program Files\AutoCAD Map 3D 2009\Iztok nastavitve\IzrNiv.dvb!izrniv"
macro is run with "izrniv"
where have i misted?
I have my routines in the ACAD.DVB file, and in that is a short module like this.....
then on my button I use this syntaxCode:Public Sub Cloud() Set myObject = New frm_Cloud myObject.Show Set myObject = Nothing End Sub
and all the code is embeded in frm_CloudCode:^C^Cvbastmt;cloud;
"That's it. It's one thing for a ghost to terrorize my children, but quite another for him to play my Theremin." Homer Simpson
Dave

Registered forum members do not see this ad.
Thank u very much, i cant belive this actually works. I change direction of slash & works perfect, I new that is a simple solution for this.Code:Try changing the direction of the slashes e.g. from \ to /
thx to every one.
![]()
Bookmarks