![solidworks toolbox adding custom parts solidworks toolbox adding custom parts](https://www.javelin-tech.com/blog/wp-content/uploads/2010/07/12-Save.jpg)
![solidworks toolbox adding custom parts solidworks toolbox adding custom parts](https://i0.wp.com/dezignstuff.com/wp-content/uploads/2018/11/solidworks-toolbox-missing-part.jpg)
In other words, if the file is renamed, it has to be opened in SOLIDWORKS and saved for the update to happen.ģ. Generate a new SOLIDWORKS file: part, assembly, or drawing.Ĥ. Ensure custom and/or configuration property(s) are linked to $PRP:”SW-File Name” and associated value is shown.ĭefault configuration has no property for file name therefore, the control on the data card is empty for this configuration. IMPORTANT: The key to making this work is saving the file. Again, if the “Updates all configurations” edit box property is checked, this will not work as expected. The red box highlights the configuration and the blue box focuses on the property itself. See image below.ĩ. Optional: For each configuration, set the property in the file or SOLIDWORKS template. The last step is to configure the custom property in the file or SOLIDWORKS template. Notice the default value is “$PRP:’Sw-File Name.’” This was set with the notion that the SOLIDWORKS template file did not have a preconfigured custom property for “Filename.” This too does not perform as expected for this purpose therefore, leave the value blank.Ĩ. This region of the edit box properties is for setting the default value for this control when the associated file is added to the vault. This setting is supposed to update all configurations within the file but does not perform as expected for this purpose.ħ. Updates all configurations” checkbox is selected. See green box (2) shown in figure above.Ħ. The business rule for this exercise states the SOLIDWORKS file will drive the value into the edit box for “FileName.” Hence the property for “Read only” is checked. In this example, the “FileName” variable is assigned to an edit box control. Remember, the variable and attribute names are not required to match.Ĥ. Map variable to control on the file data card. In this example, the variable is mapped to “Filename” custom property. In this case, “FileName” is the chosen name for the variable.ģ. Add attribute linked to the custom property for SOLIDWORKS files. Open SOLIDWORKS PDM administration utility.Ģ. Create variable through Variable Editor in SOLIDWORKS PDM administration utility. The process is very similar to linking model properties to the drawing file data card written in previous blog.ġ. The solution to overcome these hurdles is to read the SOLIDWORKS system defined property (SW-File Name) using variable attributes. The default value only gets assigned to the data card when the file is added to the vault for the first time. The main considerations to keep in mind here are as follows:ġ. The file gets renamed during its lifetime.Ģ. A customer with many years of both SOLIDWORKS and SOLIDWORKS PDM experience asked “How do I get the file name into the associated file data card?” You might think, like I did, simply set the default value in the card editor tool for an edit box on the file data card to one of two special values: file name or file name without extension.