Running VBA Macro in AutoCAD

I am creating a .bundle folder for the plugins that I programmed for AutoCAD. At the root of the folder is the PackageContents.xml package, where all my Lisp plugins are automatically loaded. Since .DVB does not support a type for autoload, I made a Lisp file for autoload using the following code

(defun C:CSC () (vl-vbaload "WindowsDoors.dvb") (vl-vbarun "WindowsDoors.dvb!CAD_STANDARD_CREATOR!CAD_STANDARD_BLOCK!CAD_STANDARD_PATH") ) 

The code launches and puts my plugin, WindowsDoors.dvb in AutoCAD, but when I try to use the plugin, the command line gives me the following

 Command -vbarun Initializing VBA System Macro name: RunMeWindowDoor Execution error 

This usually indicates an error in the code, except when I manually download this plugin using AutoCAD 2014, which is built into the application loader under the control tab, which works fine, leaving me without a clue what is wrong.

+6
source share
1 answer

I get it. I had to change the code to this

 (defun C:LoadDVB () (command "vbaload" "WindowsDoors.dvb") ) 
+2
source

Source: https://habr.com/ru/post/975499/


All Articles