• Skip to content
  • Skip to primary sidebar
  • Skip to footer

CadOasis

Ease Your CAD Software Experience !

Main navigation

  • Home
  • Training
  • Solutions
  • Services
  • Support
  • My Account
  • Log In
Home » How to Run VBA Macro in DraftSight ?

November 20, 2014 By CadOasis 1 Comment

How to Run VBA Macro in DraftSight ?

If you don’t know how to record new Macro then check Macro Toolbar in DraftSight  tutorial & record new VBA Macro for this tutorial.

If you already have recorded VBA Macro in DraftSight then use that file here.


Open any Software which consist of  VBA Macro embedded such as Word, Excel,.. etc these will work as VBA Editor for DraftSight VBA Macro also you can run your macro from this.

A. Open Macro file:

  • Lets say we open Microsoft Word document.
  • Go to View Menu > Macros  > View Macros.
  • Now Give your macro name as  ‘coLine’ for Create line macro, then Click on ‘Create’ tab

  • Now that you have empty Macro Go to File > Import file. (Or you can copy paste macro program .)
  • Change file of type to All files and Locate saved Macro (.swb) file and open.
  • A new Module is added under ‘Modules’ on left corner project , double click on it to see our recorded macro !

B. Add reference to DraftSight:

  • Now add a reference to the DraftSight type library, Go to Tools Menu > Click on ‘References ‘ Browse dsautomation.dll file from Install dir “C:\Program Files\Dassault Systemes\DraftSight\bin” \ dsAutomation.dll.

 C. Run Macro:

  • After adding Reference as above Start DraftSight and open a document..
  • Now click on Run tab in Word macro file.

Line will be created in DraftSight from this recorded Macro.


Next Understand DraftSight VBA Macro code >>

🙂

 

Filed Under: DraftSight Tagged With: DraftSight VBA, Macro



Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

Current User Progress




Categories

Tags

Annotation API AutoLISP Blocks BOM Table Commands Customization Dimension DraftSight DraftSight 2015 DraftSight 2017 DraftSight API DraftSight C# DraftSight LISP DraftSight Script DraftSight V1R5.0 DraftSight VB.Net DraftSight VBA Draw Excel VBA file Format General Guest Author LISP Macro Modify News Options Print Productivity Revision Table script Sketching SolidWorks API SolidWorks Macro SolidWorks VBA Standards Table Toolbox Tools Troubleshooting User interface view Whats New

Footer

  • About Us
  • CAD Software
  • CadOasis Store
  • Contact Us
  • Advertise
  • Links
  • Disclaimer
  • Privacy Policy
  • Terms and Services
Creative Commons License
CadOasis.com is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.

© Copyright 2014-2018 CadOasis Solutions · All Rights Reserved ·