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.
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:
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:
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.
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.
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.
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.
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.
In Google Docs, go to Tools > Preferences and then uncheck Smart Quotes.
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.
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.
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
About Adam Smith
Adam Smith is a SOLIDWORKS Technical Support Engineer at GoEngineer.
Get our wide array of technical resources delivered right to your inbox.
Unsubscribe at any time.