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]](https://1.bp.blogspot.com/-JGmUdvgIf5A/XdjfDdsOGTI/AAAAAAAAAmc/8wbBKCd3skkbK4AQwoNKg0ZIOavDz5gJwCLcBGAsYHQ/s1600/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]](https://1.bp.blogspot.com/-bGYWsFzD6fI/XdjfDW4tQpI/AAAAAAAAAmg/Cm3gITLL1TIlrxPh0u6G3ixq5D-8sbpEACLcBGAsYHQ/s1600/2.JPG)
Then Create a Circle and Extrude it.
3
![[Image: 3.JPG]](https://1.bp.blogspot.com/-UMdhQ5hzrbE/XdjfDXQeJvI/AAAAAAAAAmY/NIq9LuAH14QyreY_vbevHoWwIbjxnMgpACLcBGAsYHQ/s1600/3.JPG)
After creating the Cylinder, Go to Tools -> Macro-> Stop and save your Macro
4.
![[Image: 4.JPG]](https://1.bp.blogspot.com/-w3PrW5JauTQ/XdjfEItArFI/AAAAAAAAAmk/AJbXueRRcUQecsa3Snivnnvg_5NJVMQAACLcBGAsYHQ/s1600/4.JPG)
After saving the macro, close the part document (without saving it)
5.
![[Image: 5.JPG]](https://1.bp.blogspot.com/-OXrPDSoAxeo/XdjfEbtq4MI/AAAAAAAAAmo/RqZk-tONi88lj88mATzZJlXn1w_11-RNwCLcBGAsYHQ/s1600/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]](https://1.bp.blogspot.com/-FmGj-4MbiJE/XdjfEmmJEiI/AAAAAAAAAms/546pHVe5AF09-GxB8Q-fuoULVIOVomYGwCLcBGAsYHQ/s1600/6.JPG)
And open the newly created macro
7
![[Image: 7.JPG]](https://1.bp.blogspot.com/-SOS7h18-CJM/XdjfFBqwAFI/AAAAAAAAAmw/JGFsm9b9dWAbCv2EskbNDYgGpeKhd_YpgCLcBGAsYHQ/s1600/7.JPG)
As you can see that your Part Document is automatically generated
8
Once you open the Solidworks, Go to Tools -> Macro -> Record
1
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
Then Create a Circle and Extrude it.
3
After creating the Cylinder, Go to Tools -> Macro-> Stop and save your Macro
4.
After saving the macro, close the part document (without saving it)
5.
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
And open the newly created macro
7
As you can see that your Part Document is automatically generated
8