Computer Aided Automation
Record a Solidworks macro - SOLIDWORKS VBA - Printable Version

+- Computer Aided Automation (https://computeraidedautomation.com)
+-- Forum: CAA Discussions (https://computeraidedautomation.com/forum-7.html)
+--- Forum: VBA Programming (https://computeraidedautomation.com/forum-1.html)
+---- Forum: Solidworks VBA (https://computeraidedautomation.com/forum-6.html)
+---- Thread: Record a Solidworks macro - SOLIDWORKS VBA (/thread-12.html)



Record a Solidworks macro - SOLIDWORKS VBA - techberth - 23-11-2019

In this example we will discuss about “How to Record a Macro in Solidworks”
Once you open the Solidworks, Go to Tools -> Macro -> Record

1
[Image: 1.JPG]
Then start your project, in this example we will be making a cylinder (Draw circle and extrude it to Cylinder)
Create a New Part Document
2
[Image: 2.JPG]
Then Create a Circle and Extrude it.
3
[Image: 3.JPG]
After creating the Cylinder, Go to Tools -> Macro-> Stop and save your Macro
4.
[Image: 4.JPG]
After saving the macro, close the part document (without saving it)
5.
[Image: 5.JPG]
Now, you have created your macro for creating a cylinder. (Dimensioning will be discussed in next post)
In order to use the macro, go to Tools->Macro->Run

6
[Image: 6.JPG]
And open the newly created macro
7
[Image: 7.JPG]
As you can see that your Part Document is automatically generated
8
[Image: 8.JPG]