replacement for VBA statement

replacement for VBA statement

guillermomonter6691
Observer Observer
424 Views
3 Replies
Message 1 of 4

replacement for VBA statement

guillermomonter6691
Observer
Observer

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

0 Likes
Accepted solutions (1)
425 Views
3 Replies
Replies (3)
Message 2 of 4

hmsilva
Mentor
Mentor
Accepted solution

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

0 Likes
Message 3 of 4

guillermomonter6691
Observer
Observer

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

0 Likes
Message 4 of 4

hmsilva
Mentor
Mentor
You're welcome!
Glad I could help

Henrique

EESignature

0 Likes