API Instructions: Rename with Custom Property

Instructions: GoRename

This macro can be used to quickly rename the active file in SOLIDWORKS with the value from a Custom Property. By default, the macro is setup to rename the file using the custom property “PartNo”. The macro can be modified to change this to any desired custom property.

Installation/Setup

  • Save the GoRename.swp file to any location you desire.
  • You can edit the macro for code review from within SOLIDWORKS by selecting Tools> Macro>Edit. Browse to the location where you placed the macro file.
  • To change the custom property that the file is renamed with, edit the macro and repleace “PartNo” with the name of the custom property that you want to rename the file with.
GoRename - properyName = "PartNo"

Directions

1. With a file open in SOLIDWORKS, select Tools>Macro>Run.
2. In the “Open” dialog box make sure the macro type is set as highlighted below

SW VBA Macros

3. Browse to the location where you placed the macro file and open it.
4. You will get a message box asking if you want to rename the file. The message box will display the file path and the new name.
5. Click ‘Yes’ to rename the file or click ‘No’ to cancel the macro.

Rename

Usage Agreement

The software/macro/customization is supplied “as is” and all use is at your own risk. GoEngineer disclaims all warranties of any kind, either express or implied, as to the features and functionality. Neither this agreement nor any documentation furnished under it is intended to neither express or imply any warranty that the operation of the software will be error‐free nor cause undesirable results on files that it is ran against. Under no circumstances shall GoEngineer be liable to any user for direct, indirect, incidental, consequential, special, or exemplary damages, arising from or relating to this agreement, the software, or users use or misuse of the software or any other services provided by GoEngineer. Such limitation of liability shall apply whether the damages arise from the use or misuse of the software or any other services supplied by GoEngineer (including such damages incurred by third parties), or errors of the software. Use of the software/macro/customization constitutes acceptance to this agreement.