SolidWorks: Pack and go renaming macro

Changing the names of all the components used in your design often can be a time-consuming task.

You could either right click the component inside the assembly you’re working on to rename, or use Right Click -> SOLIDWORKS -> Rename to change individual components in your Windows Explorer.

If you need to bulk rename all the components, you’ll have to use the Pack and Go feature with either adding Prefix/Suffix or the Select/Replace button.
Although this is useful for renaming a component it is a lengthy process if you have an assembly with hundreds of components. A solution to this is the use of API. API or Macro in SOLIDWORKS can be written to automate this process, for example, auto assign a unique part number to the list (you can set the initial counter and the counting number). Like shown below in the picture.


There are vast library of API examples that you can use to create your own API. Such as this pack and go API example:

Disclaimer: Please note that this uploaded macro is for reference only and by downloading, you take full responsibility of the macro. N C CADCAM SYSTEMS will not be held liable for any loss caused by this macro.
Video below shows how this macro is used: