If you don’t know how to record new Macro then check Macro Toolbar in DraftSight tutorial & record new C# Macro for this tutorial.
If you already have recorded C# Macro in DraftSight then use that file here.
To Run DraftSight C# Macro you will need to have Visual Studio installed on your System. If you don’t have Visual Studio then I would recommend to install Visual Studio Community .
I am using Visual Studio Community 2015 for this Tutorial.
[Note: Currently, DraftSight Macros work only till Visual Studio version 2015 ]
So, I have drawn a Circle in DraftSight using Macro Recorder. I will save my Macro on D: driver with name DrawCircle.csproj (you can choose any name you want) .
Now Close the DraftSight Drawing in which we have recorded macro & open new Blank drawing
Open Visual Studio and Go to File > Open
Here, you can Directly select Project/Solution… OR Folder… option
If you choose Project/Solution… option then following Dialog box will pop up.
Click Ok on it.
Your Solution Explorer will look like this :
Double click on DrawCircle.cs You will see Macro code as below:
Note: It may be different if you choose Macro Recording Level to High in DraftSight System options.
No problem, Whole purpose of this tutorial is to Run a DraftSight C# Macro which will create a Circle in DraftSight.
Now Run the Code by clicking on ‘Start’ button and You will see a Circle is created inside DraftSight.