Custom properties are extra data fields for your models.
They let you add text like a description, who created the model and the last revision number.
And if you use them right, they can give you superpowers.
A custom property is a piece of text that is stored within your model file. It’s what we call metadata.
You can use custom properties to store the model mass, the person that created the file, the revision number.
The possibilities are endless.
That’s why PDM and CustomTools use them everywhere.
You can access the metadata here:
When you open that window, you see it has three tabs:
Drawings have no configurations, so the last tab is not present for drawings.
The BOM quantity is a special extra field that we previously wrote about here.
There are four data types available:
To add one, click the last row with <Type a new property> and create a name. You can also pick one from the dropdown list. You can edit this list, we’ll show you how in the next section
After that, pick a type, fill in a value and press enter again to store everything.
If you add a property in the Configuration Specific tab, the property will only be added for the selected configuration.
When you want to add a custom property to a part or assembly, there is a list of pre-defined options. These are just proposed names. You can select one of these or enter a custom name.
You can change these options though. In two ways:
Open the text file in a text editor of your choice, et voila. Just add a custom property per line to add your own.
This error just means that the file from the image above cannot be found. You can copy one from the internet or create your own.
Javelin wrote a blog post on how to fix this error as well.
The SOLIDWORKS help page says the following:
When you define a custom property that includes a single or double quotation mark (‘ or “), type an @ sign in front of the quotation mark to ensure that the expression evaluates correctly. For example: [email protected]" X [email protected]" X 1/[email protected]".
When you make a derived part, for example a mirrored version, you could enable linking custom properties between the parts.
This link could not be changed or removed in older SOLIDWORKS versions.
SOLIDWORKS 2018 and newer allow you to specify which custom properties remain linked:
According to this article in the SOLIDWORKS What’s new from 2018, you can customize the name of cut list bodies and sheet metal bodies.
You can use custom properties like SW-Thickness, SW-Length, and SW-Width and enter your own prefix and suffix. The result should be something like “Plate, 20x30x300”
We have tried it, but so far it did not work for weldment bodies, only for sheet metal bodies.
Now that we have explained the basics, let’s start using some more advanced stuff.
Because custom properties become way more powerful when you use variables.
When entering the value of a property, notice that you can pick a pre-defined variable like the model mass:
Mass will be converted to a cryptic text: “[email protected]<model-name.SLDPRT”.
Don’t forget the quotes.
This is how SOLIDWORKS stores a variable. This variable is then evaluated when the value is requested.
We also created a list of all the available variables because we could not find a good overview.
I never knew this was possible. You can actually use custom property values in equations. And store the result back in a custom property!
First, create a custom property. It can even be a text property, doesn’t have to be a number!
Then use it in an equation. Simple as that. I multiplied it by two before I took this screenshot.
You can store the result of global variables into a custom property as well.
You cannot link custom properties between a part/assembly and the drawing, unfortunately.
The best method is to have all custom properties in the part or assembly, then link to those in the drawing.
Because what you can do, is to use properties from the model in drawing notes.
That means you can create notes, blocks (a block contains one or multiple notes) and smart title blocks (which are also just a few notes).
To add a note that is linked to a custom property:
You can even create a note with multiple properties.
You can also type the note yourself and SOLIDWORKS will replace the text with the custom property value.
Get a sneak preview by hovering over existing notes:
We created a separate blog post with a list of all available variables for custom properties. Check it out and don’t forget to bookmark the post.
Nope, they are not. “LENGTH” and “length” will both work.
Although, in very rare cases, SOLIDWORKS seemed to be case sensitive. It’s very annoying, and I haven’t been able to reproduce it.
When you want to use a variable, you need one of these prefixes, followed by the variable name.
These prefixes tell SOLIDWORKS where to gets its data from. $PRPVIEW uses the model that is in the view, for example.
The best way to practice these is in notepad because some of these are very hard to get right. Then copy and paste them into SOLIDWORKS.
If you have created one correctly, SOLIDWORKS will directly replace the variable with the value. The result might be empty, that’s when you see your input code disappear.
There are multiple levels. Fortunately, you can recognize them by the number of @-signs.
You can use all properties from a cut list in drawing notes.
The easiest way is to add a note, click the button Link to property, select Model found here, then Component to which the annotation is attached. Now you can select Length for example.
To do this manually, use $PRPWLD:”property name” and add “of” and the file name at the end.
Barbara Jerin recently wrote a nice article on LinkedIn about one property that’s more special than the rest.
It’s the Description property.
You can use it as a column in Windows Explorer, for example.
Check out the article here.
I could not find the item number as a variable, but I really want to so I’ll keep looking.
If you have found a way to use the item number from a BOM or Cut List, please let me know.
SOLIDWORKS created the Property Tab so you can quickly enter relevant model information and store it in custom properties.
(The tab below that is for our drawing automation add-in Drew)
You can create four different kinds of templates for the contents of this tab:
These templates are actually just XML files with a fancy extension. They are stored in the same folder as properties.txt.
Because the templates are XML files, you can edit them in any text editor you like.
But it might be simpler to use the Property Tab Builder that SOLIDWORKS supplies with its software.
It’s a separate program.
You can start it via Start > SOLIDWORKS 20xx > SOLIDWORKS Tools > Property Tab Builder 20xx
To create a new template, follow these steps:
If you want a more in-depth article, check out this one.
There are three different (but slightly confusing) methods to get to the model properties.
SOLIDWORKS has the Custom Property Manager to work with these custom properties. You get this object from the model itself or from the cut list feature.
The wonderful people at ATR Soft created CUSTOMTOOLS, a powerful suite of productivity tools.
CUSTOMTOOLS uses custom properties for many of its automations. You can check it out here.