Jump to content

Recommended Posts

Posted

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

Posted

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

Posted

defun it to Lisp Command

 

(vl-load-com)

(defun c:ttx() (vla-runmacro (vlax-get-acad-object) "D:\Project.dvb!ThisDrawing.tt"))

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

 

no this dont work, i tried .

 

i cant belive that its no simple solution in command line.?

Posted

I use the following syntax

-vbaload;"C:/AutoCAD/VBA/filename.dvb;-vbarun;"C:/AutoCAD/VBA/filename.dvb!macroname"

 

I must note, however; that I put the above into a script file; and then create a toolbar button to open the script file.

Posted
I use the following syntax

-vbaload;"C:/AutoCAD/VBA/filename.dvb;-vbarun;"C:/AutoCAD/VBA/filename.dvb!macroname"

I must note, however; that I put the above into a script file; and then create a toolbar button to open the script file.

 

ok i tried i have acad 2009 map:

my file is located on :

C:\Program Files\AutoCAD Map 3D 2009\Iztok nastavitve\IzrNiv.dvb

and i do this shortcut but dont work:

-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?

Posted
ok i tried i have acad 2009 map:

my file is located on :

C:\Program Files\AutoCAD Map 3D 2009\Iztok nastavitve\IzrNiv.dvb

 

and i do this shortcut but dont work:

-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"

 

where have i misted?

Try changing the direction of the slashes e.g. from \ to /

Posted

I have my routines in the ACAD.DVB file, and in that is a short module like this.....

 

Public Sub Cloud()
Set myObject = New frm_Cloud
myObject.Show
Set myObject = Nothing
End Sub

 

then on my button I use this syntax

^C^Cvbastmt;cloud; 

 

and all the code is embeded in frm_Cloud

Posted

Try changing the direction of the slashes e.g. from \ to /

 

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.

 

thx to every one.

 

:wink:

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...