Trusted Windows (PC) download AutoCAD 2012 VBA Enabler 18.2.51. Virus-free and 100% clean download. Get AutoCAD 2012 VBA Enabler alternative downloads. About Press Copyright Contact us Creators Advertise Developers Terms Privacy Policy & Safety How YouTube works Test new features Press Copyright Contact us Creators.
Please feel free to be inspired, cut&paste or if you have any feedback or questions go here. If you want some customization, VBA conversion to .NET or anything else that you can come up with that we might help you with you're welcome to contact us.
UPDATE: As of January 31, 2014, Autodesk is no longer authorized to distribute VBA 6 or earlier versions of VBA for use with Autodesk AutoCAD and other Autodesk products. This change affects the availability to download and install VBA for Autodesk AutoCAD 2013 or earlier.
When you load a DVB file that is already loaded you can get this message: File already loaded: C:yourproject.dvb
To avoid this us vl-vbaload instead of VBALOAD. This way you don't need to bother to know if the DVB file is loaded or not. In the same way vl-vbarun can be used instead of VBARUN. In some AutoCAD versions this is a way to avoid the load macro warning dialog box.
AutoCAD Focus Control for VBA Type Library (AcFocusCtrl16.dll or AcFocusCtrl.dll) found in C:Program FilesCommon FilesAutodesk Shared is useful if you have a modeless form in the VBA project. Without it the focus does not remain at a modeless form (ShowModal property set to false, available in AutoCAD 2002 and newer versions). Use the Tools menu and add a reference to the AcFocusCtrl16.dll file and then add the AcFocusCtrl by right-clicking for additional controls in the VBAIDE toolbox when you have the form in edit mode. In some cases it can be needed to register the dll file using regsvr32.
Sample to write and read Xrecord values in a Dictionary:
Save the code below to a file and load it at startup
Example: (vl-vbaload 'r:cadr15gcodeline.dvb')
The result will be that when drawing a LINE command you don't get the unnessesary shortcut menu popping up.
I use this one for AutoCAD 2004 instead of the Express tools command Revert since it has a limit of 127 characters for the length of the path and file name.
This code is handy if you want to notify the user when a drawing is saved in 2004 format even though the format in Options>Open and Save>Save as is set to anything other than 2004. Command that are found are all commands making a save of the drawing (like SAVE, QSAVE, SAVEAS, COPYCLIP, WBLOCK). Example when using WBLOCK the following might be showed on the command line:
Command: w
WBLOCK
C:tempAec ISO A0.dwg Saved in 2004 format
You can put this in any existing code you have autoloaded or make sure you you have SavedTo2004.dvb autoloaded.
If you don't have any acad.dvb file you can rename WblockTo2000.dvb to acad.dvb and place it at a path that is in the Support File Search Path.
You cannot load VBA until an AutoCAD VBA command is issued. If you want to load VBA automatically every time you start AutoCAD include the line acvba.arx in the acad.rx file.
Have you been irritated because you have set AutoCAD 2004 to save the drawings down to version 2000?
This code is handy if you want to notify the user when a block is saved using WBLOCK or -WBLOCK in 2004 format even though the format in Options>Open and Save>Save as is set to 2000 DWG.
You will get this question after creating a wblock.
The wblock is opened if you answer yes and then you can QSAVE and CLOSE it.
You can put this in any existing code you have autoloaded or make sure you you have WblockTo2000.dvb autoloaded.
If you don't have any acad.dvb file you can rename WblockTo2000.dvb to acad.dvb and place it at a path that is in the Support File Search Path.
You cannot load VBA until an AutoCAD VBA command is issued. If you want to load VBA automatically every time you start AutoCAD include the line acvba.arx in the acad.rx file.
XREF_test.dvb sample code determine if an Xref is Attached or Overlay