All available variables for custom properties (and cut lists)

Below is every single variable that you can use within SOLIDWORKS custom properties and notes.

Most can be used with parts and assemblies.

Some can only be used for sheet metal or weldment bodies.

Only a few can be used for drawings.

1. How to work with custom properties and variables

For more background information, please read How to work with custom properties (and cut lists) first. These two articles go hand in hand.

2. Notes

These notes appear in the table below, in the See note column.

  1. Not all variables are in every dropdown menu. Sometimes they still work, though.
  2. SOLIDWORKS makes regular improvements, so please let us know if you found a missing property.
  3. The variable names are sometimes case-sensitive.
    1. Usually “LENGTH” and “length” both work fine.
    2. Check other capitalizations if you cannot get your property to work. Select the variable from a dropdown or check official SOLIDWORKS documentation for its spelling.
    3. Please let us know when you found a place where capitalization is important. We’ll add it to this post and ask SOLIDWORKS to fix it.
  4. To use file properties:
    1. You may need to write the variable name a second time between brackets. Example: $PRP:”SW-Author(Author)”
    2. Sometimes it works without the second name in brackets, sometimes it does not.
  5. The bounding box introduced in SOLIDWORKS 2018 uses properties from the bounding box feature.
    1. It syntax is <property>@@@<feature>@@<configuration>@<file name>
    2. Example: “SW-Total Bounding Box Length@@@Bounding Box@@Default<As Machined>@Strongback.SLDPRT”
  6. Requires at least SOLIDWORKS 2023
  7. These routing properties are not really variables. SOLIDWORKS uses custom properties with this name in routing BOMs.

3. All variables

 See noteModelCut list
PartAssemblyDrawingWeldment Sheet metal
File properties
AuthorSW-Author*4xxx
BOM part number / nameSW-BOM Part Numberxxx
CommentsSW-Commentsxxx
Configuration name *3SW-Configuration Namexxx
Date createdSW-Created Datexxx
Date modifiedSW-Last Saved Datexxx
Date today – longSW-Long datexxx
Date today – shortSW-Short datexxx
FilenameSW-File Namexxx
Folder nameSW-Folder Namexxx
KeywordsSW-Keywordsxxx
Last saved bySW-Last Saved Byxxx
SubjectSW-Subjectxxx
TitleSW-Titlexxx
Drawings
Current sheet nameSW-Sheet Namex
Current sheet format sizeSW-Sheet Format Sizex
Current sheet numberSW-Current Sheetx
Current sheet scaleSW-Sheet Scalex
Drawing template sizeSW-Template sizex
Sheet countSW-Total Sheetsx
View nameSW-View Namex
View scaleSW-View Scalex
Physical properties
Axes of inertiaSW-ix
SW-iy
SW-iz
xxxx
Bounding box
(SOLIDWORKS 2018 and newer
Requires bounding box feature)
SW-Total Bounding Box Length
SW-Total Bounding Box Width
SW-Total Bounding Box Thickness
SW-Total Bounding Box Volume
*5xx
Center of massSW-CenterOfMassX
SW-CenterOfMassY
SW-CenterOfMassZ
xxxx
DensitySW-Densityxxxx
MassSW-Massxxxx
MaterialSW-Materialxxxx
Moments of inertia
(Taken at center of mass
Aligned with output coordinate system)
SW-Lxx
SW-Lxy
SW-Lxz
SW-Lyx
SW-Lyy
SW-Lyz
SW-Lzx
SW-Lzy
SW-Lzz
xxxx
Principal moments of inertiaSW-Px
SW-Py
SW-Pz
xxxx
Surface areaSW-SurfaceAreaxxxx
VolumeSW-Volumexxxx
Weldment & sheet metal
DescriptionIs filled automatically
(e.g. sheet, pipe)
xx
Cut list item nameSW-CutListItemNamexx
QuantityQuantityxx
Weldment
AngleAngle1
Angle2
x
Angle description between two cut ends
(–, Same, Opposite or Out Of Plane)
Angle Directionx
Angle along longitudinal axis between two cut ends (0-180 degrees)Angle Rotationx
LengthLengthx
Total lengthTotal lengthx
Unit of measure (= usually length)Unit_of_measurex
Sheet metal
Bend allowanceSW-Bend Allowancex
Bend radiusSW-Bend Radiusx
Bounding boxSW-Bounding Box Length
SW-Bounding Box Width
SW-Bounding Box Area
SW-Bounding Box Area-Blank
x
Cutting lengthSW-Cutting Length-Outer
SW-Cutting Length-Inner
x
Flattened massSW-FlattenedMassx
Gauge tableSW-Sheet Metal Gauge*6x
Number of bendsSW-Bendsx
Number of cut outsSW-Cut Outsx
Surface treatmentSW-Surface Treatmentx
ThicknessSW-Sheet Metal Thicknessx
DimXpert block tolerances
Angular block toleranceSW-AngBlockTolxxx
Angular general block toleranceSW-AngGeneralBlockTolxxx
Linear block tolerance 1, 2 and 3SW-LinBlockTol1
SW-LinBlockTol2
SW-LinBlockTol3
xxx
Linear block tolerance decimalsSW-LinBlockTol1Decimal
SW-LinBlockTol2Decimal
SW-LinBlockTol3Decimal
xxx
Linear general block toleranceSW-LinGeneralBlockTolxxx
Multibody costing
For entire part
Manufacturing costSW-Cost-ManufacturingCostxxxx
Material costSW-Cost-MaterialCostxxxx
Template nameSW-Cost-TemplateNamexxxx
Total costSW-Cost-TotalCostxxxx
Per body
Cost calculation timeSW-Cost-CostCalculationTimexxxx
Material nameSW-Cost-MaterialNamexxxx
Stock typeSW-Cost-StockTypexxxx
Stock sizeSW-Cost-StockSizexxxx
Routing
Part numberSWbompartno*7
Pipe lengthSWPipeLength
See notePartAssemblyDrawingWeldment Sheet metal
ModelCut list

Check out How to work with custom properties (and cut lists) to learn how to use these variables. If you know how to create macros, check out How to use custom properties in the SOLIDWORKS API.

Have you found a variable that’s not in the table? Email us at [email protected] and we’ll add it. Thanks for your help!

4. Missing properties

I regularly get asked if a certain property is available. First of all, the answer is probably No. But I’ll highlight these properties:

  1. The author that first created the file
  2. Cut list item number
  3. Part quantity in assembly (because it’s an assembly property, not a part property)

These properties do not exist.

5. Sources

Many of these properties are not documented at all. I have searched the documentation for every single property, but this is all I could find:

  1. File and drawing properties: Linking Notes to Document Properties
  2. Mass: Adding Mass Properties
  3. Cut list item name: Linking a Cut List Folder to a Cut List Property
  4. Weldments: Custom Properties in Weldment Cut Lists
  5. Sheet metal: Sheet Metal Properties
  6. Routing: Bill of Materials for Routing Assemblies

Don't miss the next post. Get a free add-in.

Subscribe to our newsletter and get our TimeSavers add-in for free.