Fifi Riri

Batch Custom Properties Program

Discussion created by Fifi Riri on Feb 23, 2019
Latest reply on May 29, 2019 by Fifi Riri

Here is a stand-alone application to display and edit the custom properties and configuration custom properties of a list of files.

It uses SolidWorks Document Manager library to avoid opening each files and speeding up the process.

If you don’t have one yet, follow this link to request your SwDocManager license key:

https://www.javelin-tech.com/blog/2017/04/solidworks-document-manager-api-key/

Then place it in the text file that will be created in the same folder as the program.

 

img1.jpg

Functions:

- change a custom property value in a file by editing its cell

- change a custom property value in all the files by defining the column’s rule, then apply it by right-clicking the column header

- add or remove a custom property by right-clicking the column header

- save the columns’ name and rules for next use

Rules:

A rule can be defined for each column by editing its cell in the Rules line (3rd line). A rule can contain a mix of text and functions. A menu with some functions appears by right-clicking the Rules line.

Here is a list of available functions:

<FileName> will return the file name

<FilePath> will return the full path of the file. i.e. "C:\myFiles\Project1\Machine1\Part1.sldprt"

<Folder(#)> Given the above path, "<Folder(2)>" will return "myFiles", while "<Folder(-2)>" will return "Machine1")

<CustomPropName;CustomPropType;PartConfig> will copy the value of a different custom property of this file. i.e. in the picture above "<Item;Number;>" would return "5" for Part1. Note: no need to type this, just right-click the Rules line.

<Today> will return today date

<##(7)> will increment a number of minimum 2 characters starting at number 7 (see picture above)

<UserName> will return the user name of the windows session

"SW-Material", "SW-Mass" … will return a dynamic link to the part material, mass… (see Solidworks custom properties drop down menu for complete list)

Notes:

- Columns can be reordered. Saving the columns will save the order.

- Rows can be deleted with the "Delete" key

- "Yes/No" custom properties can be set to "Yes" with "Yes, Y, True, T or 1", to "No" with "No, N, False, F or 0"

Warning:

Please, download the source code (written in VB.NET) and check that it’s legit, or wait for a peer review before using it, and test the program on a copy of your files first.

 

------------------------------------------------------------------------------------------------------

Message was edited on the 28/02/2019

Upload Version 0.2:

- Add support for Cut List Items Custom Properties

- Add support for Drawings Custom Properties

- Update Custom Properties writing function

- Fix some bugs

- Add help file

------------------------------------------------------------------------------------------------------

Message was edited on the 02/03/2019

Upload Version 0.21:

- Add options to remove all columns after selected column

- Fix some bugs

Outcomes