Subject: Using VBA



CADdirect can be customized using Visual Basic for Applications (VBA) through an integrated interface, available from the CADdirect Tools menu. CADdirect features a broad range of objects, giving you the power to write your own custom applications that can run within CADdirect.

To load a VBA project

Advanced experience level

   1   Do one of the following:

   On the ribbon, choose Tools > Load VBA Project (in Applications).

   On the menu, choose Tools > Visual Basic > Load VBA Project.

   Type vbiload and then press Enter.

   2   Locate and select the Visual Basic project file (.vbi file) to load, then click Open.

To run a VBA macro        

Advanced experience level

   1   Do one of the following:

   On the ribbon, choose Tools > Macros (in Applications).

   On the menu, choose Tools > Visual Basic > Macros.

   Type vbarun and then press Enter.

   2   In the Run CADdirect VBA Macro dialog box, enter the name of an existing VBA macro, and then click Run.

You can also create, delete, and edit VBA macros from this dialog box.

To edit a VBA macro    

Advanced experience level

   1   Do one of the following:

   On the ribbon, choose Tools > Visual Basic Editor (in Applications).

   On the menu, choose Tools > Visual Basic > Visual Basic Editor.

   Type vba and then press Enter.

   2   Use the Visual Basic Editor to write or debug VBA macros.

For more information

   Read the online documentation for VBA, available from the editor Help menu and from the CADdirect Help menu.

   Many publications are available that explain how to program in VBA.

Using_VBA
© Copyright 2022. BackToCAD Technologies LLC. All rights reserved. Kazmierczak® is a registered trademark of Kazmierczak Software GmbH. Print2CAD, CADdirect, CAD.direct, CAD Direct, CAD.bot, CAD Bot, are Trademarks of BackToCAD Technologies LLC. DWG is the name of Autodesk’s proprietary file format and technology used in AutoCAD® software and related products. Autodesk, the Autodesk logo, AutoCAD, DWG are registered trademarks or trademarks of Autodesk, Inc. All other brand names, product names, or trademarks belong to their respective holders. This website is independent of Autodesk, Inc., and is not authorized by, endorsed by, sponsored by, affiliated with, or otherwise approved by Autodesk, Inc. The material and software have been placed on this Internet site under the authority of the copyright owner for the sole purpose of viewing of the materials by users of this site. Users, press or journalists are not authorized to reproduce any of the materials in any form or by any means, electronic or mechanical, including data storage and retrieval systems, recording, printing or photocopying.