Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

replacement for VBA statement

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
guillermomonter6691
266 Views, 3 Replies

replacement for VBA statement

We have been using VBA for 1 command in our CUI for a long time. Now that VBA requires a separate install and it also slows down AutoCAD we are looking for an equivalent command to eliminate the need for VBA or any other installs. I'm also not looking forward to learning a programming language...

This is our command to open a new file from the templates folder.

 

^C^C._vbastmt;ThisDrawing.Application.Documents.Add ("filename.dwt");

 

 

 

Anything that replicates the command above through the CUI would be welcome.

Thanks

3 REPLIES 3
Message 2 of 4

One way,

 

if not on MAC, try

 

^C^C(vl-load-com);(vla-activate (vla-add (vla-get-documents (vlax-get-acad-object))"filename.dwt"));

 

 

Henrique

EESignature

Message 3 of 4

Works like a charm and fast as lighting.  Thank you very much!!

Message 4 of 4

You're welcome!
Glad I could help

Henrique

EESignature

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost