SOLIDWORKS Drawings - Utilizing $PRP for Linking Properties

Article by Adam Smith on Sep 06, 2024

In SOLIDWORKS drawings, it's possible to link properties from either the drawing or the model to populate title blocks or annotations within specific drawing views. But wouldn't it be nice if you could specify which properties to display by simply pasting a bit of code into the text boxes? 

Note: If you are unfamiliar with linking properties to title blocks or texts within a SOLIDWORKS drawing, follow this blog: Easy Way to Link Properties to a SOLIDWORKS Drawing.

In the following examples, we'll use properties from a SOLIDWORKS drawing, an assembly model used for said drawing, and one of its components.

SOLIDWORKS Drawing Sheet Property

SOLIDWORKS Drawing Model Property

SOLIDWORKS Drawing Component Property

When linking a custom property into a text or annotation within a drawing, SOLIDWORKS will create a string that automatically indicates where to look and what custom property to show.

To find out what string SOLIDWORKS uses to link custom properties, right-click on the text box containing a linked property and select Edit Text in Window. This window will pop up, showing you a string that looks like this:

SOLIDWORKS Edit Text in Window Option

SOLIDWORKS $PRP Sheet Property

When a property is linked, the string will be "$PRP:" and then the custom property within straight quotation marks. The $PRP string will also change depending on whether the text is out in space or being pointed to a part or component along with where the custom properties are located. In total, there are 4 different $PRP strings: 

  • $PRP, which comes from using properties within the drawing file.
  • $PRPSHEET, which comes from using properties within the model.
  • $PRPVIEW, which comes from using properties within the model view the text is indicating.
  • $PRPMODEL, which comes from using properties within a component the text is indicating.

Types of $PRP Strings for SOLIDWORKS Drawings

A few items to note here: $PRPVIEW and $PRPMODEL will only show up if the text indicates the model or the component with linked properties.

Additionally, $PRPVIEW and $PRPSHEET use the same list of properties as they both come from the assembly model, with the only difference being annotated or not. When linking a custom property to an annotated text, the drop-down menu will show you a couple more options for custom properties, this uses the $PRPVIEW and $PRPMODEL.

$PRP Linking Properties in SOLIDWORKS Drawings

Creating Text to Copy and Paste Into a Drawing

Suppose some specific text is needed for this drawing along with custom properties. By utilizing $PRP and which ones to use along with the properties, the next step is to copy and paste into the right text boxes.

$PRP Text Copy

Edit Text Window for $PRP String in SOLIDWORKS

SOLIDWORKS Drawing with $PRP Edit Text Window

If done correctly, the string will pick up the custom property and place it within the text box. If not, it will show the string as an actual text. To avoid this, ensure that the custom property label is spelled correctly and that there are no spaces in between the string.

SOLIDWORKS Custom Property $PRP String

In most document creation programs, such as Microsoft Word or Google Docs, "Smart quotes" are used, which curve the quotation marks to open and close any quote. If these curved quotation marks are used, SOLIDWORKS will not read those as PRP strings and treat the curved quotation marks as actual text.

Smart Quotes in Microsoft Word

Smart Quotes Copied in Microsoft and Pasted into SOLIDWORKS

To resolve this, uncheck the smart quotes option (this varies within each program).

In Microsoft Word, go to File > Options > Proofing > Autocorrect Options, and under Autoformat as you type, uncheck Straight quotes with Smart quotes.

How to Turn of Smart Quotes in Microsoft

Straight Quotes with Smart Quotes Option in Microsoft

In Google Docs, go to Tools > Preferences and then uncheck Smart Quotes.

How to Turn of Smart Quotes in Google Docs

Additionally, the font of the text within each program doesn't matter, as SOLIDWORKS will read those as text and strings in the drawing's assigned font.  

Overall, utilizing $PRP into sheet drawings provides a full range of potential that enables collaboration between word programs like Microsoft and SOLIDWORKS. It removes the hassle of manually clicking each text to link a property and provides easy maintenance for mass texts within drawings.  By simply containing all the codes with any word program, linking custom properties to drawings can be as easy as copying and pasting.

I hope you found this article explaining $PRP for linking properties in SOLIDWORKS drawings helpful. Check out more tips and tricks listed below. Additionally, join the GoEngineer Community to participate in the conversation, create forum posts, and answer questions from other SOLIDWORKS users. 

SOLIDWORKS CAD Cheat Sheet

SOLIDWORKS CAD Cheat Sheet

SHORTCUTS ⋅ MOUSE GESTURES ⋅ HOT KEYS

Our SOLIDWORKS CAD Cheat Sheet, featuring over 90 tips and tricks, will help speed up your process.


Take your SOLIDWORKS skills to the next level by enrolling in the official SOLIDWORKS Drawings training course. This course teaches designers how to create drawings of parts & assemblies by expanding on drawing topics introduced in Essentials. Both online and in-person classes are available. 

More SOLIDWORKS Tutorials

How to Create Flex Features in SOLIDWORKS

SOLIDWORKS Convert to Bodies Command Explained

SOLIDWORKS Limit Angle Mate Tutorial

SOLIDWORKS Drawings – Unable to Dimension Sheet Metal Bend Lines

Misaligned Concentric Mates in SOLIDWORKS Explained

VIEW ALL SOLIDWORKS TUTORIALS

 

About Adam Smith

Adam Smith is a SOLIDWORKS Technical Support Engineer at GoEngineer.

View all posts by Adam Smith