Complete list of variables ($PRP:) for use in annotations and custom properties

Here we have answers to common questions about SolidWorks. If you want to request or contribute answers, just flag down a moderator.
User avatar
Tom G
Posts: 355
Joined: Tue Mar 09, 2021 9:26 am
Answers: 0
Location: Philadelphia, PA area
x 989
x 466

Complete list of variables ($PRP:) for use in annotations and custom properties

Unread post by Tom G »

I know this one has been asked multiple times before because I have done so. Trying to find this information in the Help file or site is as joyous as pulling my own teeth. That is, I have never successfully done so.

Is there a list of ALL the $PRP: variables you can include in annotations?
Yes. I finally found one.

All available variables for custom properties (and cut lists)
2019-11-02 / by Peter Brinkhuis


Content below has been copied from link above, without the pleasant table formatting. Included here for search term contents to help people find this if they have some of it already.
All variables
File properties
Author: SW-Author
BOM part number / name: SW-BOM Part Number
Comments: SW-Comments
Configuration name: SW-Configuration Name
Date created: SW-Created Date
Date modified: SW-Last Saved Date
Date today – long: SW-Long date
Date today – short: SW-Short date
Filename: SW-File Name
Folder name: SW-Folder Name
Keywords: SW-Keywords
Last saved by: SW-Last Saved By
Subject: SW-Subject
Title: SW-Title
Drawings
Current sheet name: SW-Sheet Name
Current sheet format size: SW-Sheet Format Size
Current sheet number: SW-Current Sheet
Current sheet scale: SW-Sheet Scale
Drawing template size: SW-Template size
Sheet count: SW-Total Sheets
View name: SW-View Name
View scale: SW-View Scale
Physical properties
Axes of inertia: SW-ix , SW-iy , SW-iz
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
Center of mass: SW-CenterOfMassX , SW-CenterOfMassY , SW-CenterOfMassZ
Density: SW-Density
Mass: SW-Mass
Material: SW-Material
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
Principal moments of inertia: SW-Px , SW-Py , SW-Pz
Surface area: SW-SurfaceArea
Volume: SW-Volume
Weldment & sheet metal
Description Is filled automatically (e.g. sheet, pipe)
Cut list item name: SW-CutListItemName
Quantity: Quantity
Weldment
Length: Length
Angle: Angle1 , Angle2
Angle description between two cut ends (–, Same, Opposite or Out Of Plane): Angle Direction
Angle along the longitudinal axis between two cut ends(0-180 degrees): Angle Rotation
Total length: Total length
Unit of measure (= usually length): Unit_of_measure
Sheet metal
Bend allowance: SW-Bend Allowance
Bend radius: SW-Bend Radius
Bounding box: SW-Bounding Box Length , SW-Bounding Box Width , SW-Bounding Box Area , SW-Bounding Box Area-Blank
Cutting length: SW-Cutting Length-Outer , SW-Cutting Length-Inner
Flattened mass: SW-FlattenedMass
Number of bends: SW-Bends
Number of cut outs: SW-Cut Outs
Surface treatment: SW-Surface Treatment
Thickness: SW-Sheet Metal Thickness
DimXpert block tolerances
Angular block tolerance: SW-AngBlockTol
Angular general block tolerance: SW-AngGeneralBlockTol
Linear block tolerance 1, 2 and 3: SW-LinBlockTol1 , SW-LinBlockTol2 , SW-LinBlockTol3
Linear block tolerance decimals: SW-LinBlockTol1Decimal , SW-LinBlockTol2Decimal , SW-LinBlockTol3Decimal
Linear general block tolerance: SW-LinGeneralBlockTol
Multibody costing
For entire part

Manufacturing cost: SW-Cost-ManufacturingCost
Material cost: SW-Cost-MaterialCost
Template name: SW-Cost-TemplateName
Total cost: SW-Cost-TotalCost
Per body
Cost calculation time: SW-Cost-CostCalculationTime
Material name: SW-Cost-MaterialName
Stock type: SW-Cost-StockType
Stock size: SW-Cost-StockSize
Routing
Part number: SWbompartno
Pipe length: SWPipeLength

And, to wrap up, a link to the less helpful helpfile for basic instruction on how to implement these.
berg_lauritz
Posts: 423
Joined: Tue Mar 09, 2021 10:11 am
Answers: 6
x 439
x 233

Re: Complete list of variables ($PRP:) for use in annotations and custom properties

Unread post by berg_lauritz »

same author also published how to work with custom properties.

Thank you, @peterbrinkhuis for that reference!
MJuric
Posts: 1070
Joined: Mon Mar 08, 2021 3:21 pm
Answers: 1
x 31
x 874

Re: Complete list of variables ($PRP:) for use in annotations and custom properties

Unread post by MJuric »

berg_lauritz wrote: Thu Aug 05, 2021 1:44 pm same author also published how to work with custom properties.

Thank you, @peterbrinkhuis for that reference!
The list on the web site even shows where the call backs work and don't work and what they work with, very nice.
JustinP
Posts: 14
Joined: Tue Apr 20, 2021 10:25 am
Answers: 0
x 13
x 3

Re: Complete list of variables ($PRP:) for use in annotations and custom properties

Unread post by JustinP »

This is GOLD!
DOOM-DOOM-DOOM-DOOM-DOOM-DOOM-DOOM-DOOM-DOOOOM
Merovingien

Re: Complete list of variables ($PRP:) for use in annotations and custom properties

Unread post by Merovingien »

beware, this list is not complete, there are missing some...
Post Reply