How to Link Model Properties to Drawing File Data Card

The administrator will learn how to link property values from the SOLIDWORKS model to the controls on the SOLIDWORKS drawing file data card. The details apply only to clients with PDM CAD Editor License types.

This SOLIDWORKS PDM blog is the second in a three part series. The first posting (Part I) laid the groundwork for understanding different types of SOLIDWORKS drawing file property links ($PRP, $PRPSHEET, $PRPMODEL, and $PRPVIEW). Part I was written with the notion it would benefit both SOLIDWORKS users and SOLIDWORKS PDM administrators. This article, on the other hand, is directed towards SOLIDWORKS PDM administrators solely.

The administrator will learn how to link property values from the SOLIDWORKS model to the controls on the SOLIDWORKS drawing file data card. This blog posting comes from the following SOLIDWORKS knowledge base solution: S-010321. The details contained within apply only to clients with SOLIDWORKS PDM CAD Editor License type. This requirement is reinforced below under “Important Notes” section.

 

Summary

Companies purchase SOLIDWORKS PDM to help them control how documents are managed based on a clearly defined set of business rules. SOLIDWORKS PDM also helps automate elements of the documentation process. Therefore, this stands to reason why customers frequently ask: “How do I link the SOLIDWORKS model custom properties to the SOLIDWORKS PDM data card associated with a SOLIDWORKS drawing?” Setting this up according to the instructions below eliminates the need to fill out identical fields on both the model and drawing file data cards.

Important Notes

Unlike the knowledge base article, this is going to start with the two most important notes first. If these are not heeded, then any setup performed per the information contained within is useless. This statement comes from a customer troubleshooting experience many years ago. If the two critical notes weren’t overlooked by the seemingly blind author of this blog, then it would have taken minutes to get functioning instead of over an hour.

The two notes are as follows:

1. The SOLIDWORKS PDM add-in must be activated through SOLIDWORKS: Tools>>Addins.

2. The model properties will be copied to the SOLIDWORKS drawing file data card each time the drawing is saved within SOLIDWORKS.

 Setup

1. Create a variable through the Variable Editor within the SOLIDWORKS PDM administration tool. For this example, the name will be “Part Number” because this value will be pulled/copied from the SOLIDWORKS part file to the SOLIDWORKS drawing file data card.

 Edit Variables

2. Add an attribute to the “Part Number” variable and choose “CustomProperty” for the block name. This variable attribute will be assigned to SOLIDWORKS parts, assemblies, and drawings. Notice extensions listed in figure below.

 Edit Variables

Remember, attributes create a bi-directional communication link between the file custom property and the variable assigned to the associated file data card control. If you update the value on the data card, then it gets copied to the custom property assigned through the attribute in the variable. Vice-versa, if the value gets changed in the custom property and it’s mapped to a variable attribute, then the file data card will be updated.

3. Add another attribute to the “Part Number” variable. Instead of using “CustomProperty” for the block name, type the following exactly: “$PRPSHEET”. This block name must be capitalized as shown in the figure below. The attribute name will be identical to the custom property found in the SOLIDWORKS part file. In this example, “PartNo” is the custom property/attribute name.

 Edit Variables

Recall from Part I of this blog series, that the $PRPSHEET property link copies the value from the model shown in the drawing view selected through the sheet properties.

4. Choose only one extension: slddrw.

 Edit Variables

5. Link the “Part Number” variable to an Edit box control on both the SOLIDWORKS drawing and part file data cards.

 SOLIDWORKS Drawing Card

6.  Setup is complete.

Test Case

Add “PartNo” custom property to a part file. In the figure below, notice the value is “PN14513.” The property can also be filled out through the file data card for the “Ratchet Body_&.sldprt.” Filling out the edit box on the data card will automatically generate the custom property.

 Ratchet

Create/open a drawing. The drawing must be in the vault with a view containing, in this case, the “Ratchet Body_&.sldprt” model. The view referred to is the one set up under sheet properties. The setting is “Use custom property values from the model shown in.” Please refer to the previous blog post for additional details about the $PRPSHEET property link: Part I - Drawing Property Links.

Notice the drawing does not contain the custom property for “PartNo.”

PartNo

With the SOLIDWORKS PDM add-in activated in SOLIDWORKS and the drawing is open from the vault, save the file. Notice the custom properties for the drawing now contain the custom property for “PartNo.”

Property Name

In addition, the file data card for the drawing includes the value for “PartNo.”

Ratchet

Conclusion

Reading this post has taught you how to link the model custom properties to the controls on the associated drawing file data card within SOLIDWORKS PDM. This benefits the users by not having to insert the same data in both the SOLIDWORKS part file data card, for example, and its drawing file data card. Setting this up also streamlines your process, preserves business rules, and standardizes information input. If you want to learn more about SOLIDWORKS drawing property links in general, then please read Part I. Part III of this series is about linking SOLIDWORKS system-defined properties to a SOLIDWORKS PDM file data card. Part III is a slight twist to what you learned in this blog and includes an example exercise to follow.