Variable Mapping for SOLIDWORKS Example: Mapping Model Custom Properties ($PRPSHEET Annotations)

For a SOLIDWORKS drawing, you can map a variable to a custom property of the model that the drawing is based on instead of a custom property of the drawing so the property value of the model is copied into the drawing's file card.

When the drawing is saved in SOLIDWORKS, the linked properties are copied from the model and updated in the drawing's file card.

This example describes how to define a Description variable for .slddrw files to display the Description custom property of the model that the drawing is based on.

For this mapping to work, the drawing must be saved in SOLIDWORKS and the SOLIDWORKS PDM add-in must be enabled in SOLIDWORKS. If a value in a model is updated, the drawing data card does not display the updated value until the drawing is opened and resaved.
The $PRPSHEET mapping is read-only. You cannot modify the model property value by modifying the property value in the drawing data card.

To map the custom property of a model to the file card of the drawing based on the model:

  1. Edit or create the variable Description.
  2. Click New Attribute.
  3. Under Selected attribute, specify the attributes for the Description custom property of the drawing:
    1. For Block name, select CustomProperty.
    2. For Attribute name, type Description.
    3. Type the file extensions to use the variable mapping, separated by commas.

      The extension list must include slddrw and can also include other SOLIDWORKS extensions. For example: prt, sldasm, sldprt, slddrw, drw.

  4. Click New Attribute and specify the attributes for the Description custom property of the model:
    1. For Block name, type $PRPSHEET.
      This must be all uppercase.
    2. For Attribute name, type Description or the name of the model's custom property from which you are copying the value.
    3. Type the file extension slddrw.
  5. Click OK.
  6. In the Card Editor, open the SOLIDWORKS Drawing file card.
  7. Add an edit box and select the Description variable as the Variable name.
  8. Save the card and close the Card Editor.
When you create a SOLIDWORKS drawing from a part with the custom property Description, the value in the part's Description property is copied to the Description field on the drawing's file card.