Creating Typeable Commands for VBA Routines?

Creating Typeable Commands for VBA Routines?

Anonymous
Not applicable
288 Views
4 Replies
Message 1 of 5

Creating Typeable Commands for VBA Routines?

Anonymous
Not applicable
Any good ideas for creating "command line" commands to fire up VBA
Macros? I have been trying to use Vlisp commands (defun c:doit ...
because they can load my DVB and fire up the macro like this ...

(vla-LoadDVB acadApp advbFile)
(vla-RunMacro acadApp myMacro)

... but problems have arisen with .SelectOnScreen (above post) as well
as not being able to close the current drawing (because LISP has it
"BUSY").

Thanks in advance,

Terry
0 Likes
289 Views
4 Replies
Replies (4)
Message 2 of 5

Anonymous
Not applicable
Hi Terry,

I use something like this:

(defun c:mycommand()(command "-vbarun" "myproject.dvb!mymacro"))

The macro path has to be in the support files search path to work as shown.

--
Bud Miller
www.BudCAD.com
AutoCAD & LDD apps and more

"Terry W. Dotson" wrote in message
news:3B13BF96.D9E0499C@dotsoft.com...
> Any good ideas for creating "command line" commands to fire up VBA
> Macros? I have been trying to use Vlisp commands (defun c:doit ...
> because they can load my DVB and fire up the macro like this ...
>
> (vla-LoadDVB acadApp advbFile)
> (vla-RunMacro acadApp myMacro)
>
> ... but problems have arisen with .SelectOnScreen (above post) as well
> as not being able to close the current drawing (because LISP has it
> "BUSY").
>
> Thanks in advance,
>
> Terry
0 Likes
Message 3 of 5

Anonymous
Not applicable
Terry

You might want to take a look at this

http://pointa03.autodesk.com/kdn/content/solutions/58357.htm

--
Kent


"Terry W. Dotson" wrote in message
news:3B13BF96.D9E0499C@dotsoft.com...
> Any good ideas for creating "command line" commands to fire up VBA
> Macros? I have been trying to use Vlisp commands (defun c:doit ...
> because they can load my DVB and fire up the macro like this ...
>
> (vla-LoadDVB acadApp advbFile)
> (vla-RunMacro acadApp myMacro)
>
> ... but problems have arisen with .SelectOnScreen (above post) as well
> as not being able to close the current drawing (because LISP has it
> "BUSY").
>
> Thanks in advance,
>
> Terry
0 Likes
Message 4 of 5

Anonymous
Not applicable
Bud Miller wrote:

> (defun c:mycommand()(command "-vbarun" "myproject.dvb!mymacro"))

That fixes my SelectOnScreen problem!

Thanks, Terry
0 Likes
Message 5 of 5

Anonymous
Not applicable
I have been using the following

(vl-vbarun "advbFile.dvb!myMacro")

I overcomes the SelectOnScreen failure without forcing you to use the
"command" function.

The down side is, you can't preselect objects with this method.

Chuck


"Terry W. Dotson" wrote in message
news:3B13BF96.D9E0499C@dotsoft.com...
> Any good ideas for creating "command line" commands to fire up VBA
> Macros? I have been trying to use Vlisp commands (defun c:doit ...
> because they can load my DVB and fire up the macro like this ...
>
> (vla-LoadDVB acadApp advbFile)
> (vla-RunMacro acadApp myMacro)
>
> ... but problems have arisen with .SelectOnScreen (above post) as well
> as not being able to close the current drawing (because LISP has it
> "BUSY").
>
> Thanks in advance,
>
> Terry
0 Likes