13
Linking Notes to Document Properties To automatically insert information in a drawing, you can link note text in the drawing sheet or drawing sheet format to document properties. For the procedure to add a link in a note, see Link to Property. All SolidWorks documents have system-defined properties, including the following: Property Name Value SW-Author Author field in Summary Information dialog box SW-Comments Comments field in Summary Information dialog box SW-Configuration Name Configuration name in ConfigurationManager of part or assembly SW-Created Date * Created field in Summary Information dialog box SW-File Name document name, no extension SW-Folder Name document folder with backslash at the end SW-Keywords Keywords field in Summary Information dialog box SW-Last Saved By Last Saved By field in Summary Information dialog box SW-Last Saved Date * Last Saved field in Summary Information dialog box SW-Long Date * current date in long format SW-Short Date * current date in short format SW-Subject Subject field in Summary Information dialog box SW-Title Title field in Summary Information dialog box * Properties that include date formats are language and region dependent. For details, see the Control Panel settings on your computer. Additionally, drawings have the following system-defined properties: Property Name Value SW-Current Sheet sheet number of the active sheet SW-Sheet Format Size sheet size of the active sheet format SW-Sheet Name name of the active sheet SW-Sheet Scale scale of the active sheet SW-Template Size template size of the drawing template SW-Total Sheets total number of sheets in the active drawing document SW-View Name name of the active drawing view SW-View Scale scale of the active drawing view You can link a note to the properties of the model shown in the drawing (the SW- File Name property, for example, or a user-defined custom property in the model document). If the property value cannot be found, the note displays ERROR!<variable name>. To show or hide the error message, click View, Annotation Link Errors.

Linking Notes to Document Properties

  • Upload
    816623

  • View
    187

  • Download
    3

Embed Size (px)

DESCRIPTION

Linking Notes to Document Properties

Citation preview

Page 1: Linking Notes to Document Properties

Linking Notes to Document Properties

To automatically insert information in a drawing, you can link note text in the drawing sheet or drawing sheet format to document properties. For the procedure to add a link in a note, see Link to Property.

All SolidWorks documents have system-defined properties, including the following:

Property Name ValueSW-Author Author field in Summary Information dialog boxSW-Comments Comments field in Summary Information dialog boxSW-Configuration Name

Configuration name in ConfigurationManager of part or assembly

SW-Created Date * Created field in Summary Information dialog boxSW-File Name document name, no extensionSW-Folder Name document folder with backslash at the endSW-Keywords Keywords field in Summary Information dialog boxSW-Last Saved By Last Saved By field in Summary Information dialog boxSW-Last Saved Date *

Last Saved field in Summary Information dialog box

SW-Long Date * current date in long formatSW-Short Date * current date in short formatSW-Subject Subject field in Summary Information dialog boxSW-Title Title field in Summary Information dialog box

* Properties that include date formats are language and region dependent. For details, see the Control Panel settings on your computer.

Additionally, drawings have the following system-defined properties:

Property Name ValueSW-Current Sheet sheet number of the active sheetSW-Sheet Format Size

sheet size of the active sheet format

SW-Sheet Name name of the active sheetSW-Sheet Scale scale of the active sheetSW-Template Size template size of the drawing templateSW-Total Sheets total number of sheets in the active drawing documentSW-View Name name of the active drawing viewSW-View Scale scale of the active drawing view

You can link a note to the properties of the model shown in the drawing (the SW-File Name property, for example, or a user-defined custom property in the model document).

If the property value cannot be found, the note displays ERROR!<variable name>. To show or hide the error message, click View, Annotation Link Errors.

A linked note can include additional text, and it can include links to more than one property. For example, to display the current sheet number and the total number of sheets, you can add this note:

SHEET $PRP:"SW-Current Sheet" OF $PRP:"SW-Total Sheets"

On the sheet, the property values are displayed:

SHEET 1 OF 2 (on the first sheet of a two-sheet drawing)

Page 2: Linking Notes to Document Properties

Link to Property

You can link the value of a document property, a custom property, or a configuration-specific property to the text of a note. You can also link a property to rows of a table or BOM. If the value of the property changes, the linked text changes automatically.

To link text to a property:

1. Click Link to Property in the Note Formatting toolbar.2. Select the place to link from:

Current document. A property relating to the actual drawing document. Model in view to which the annotation is attached (drawings only). A particular

view of a part or assembly in the drawing sheet where the note is attached. Model in view specified in sheet properties (drawings only). A part or assembly

that is shown in a view. In the Sheet Properties dialog box, in Use custom property values from model shown in, select a view.

Component to which the annotation is attached (assembly documents and part and assembly drawing documents). One component of many in an assembly view.

3. Select a property from the list of available properties, which depends on your selection in step 2 and where you create the note.

Part or assembly document. The list includes the properties of the model document, including any custom defined properties.

Drawing sheet or sheet format. The list includes the properties of the drawing document, including any custom defined properties.

Drawing view. The list includes the properties of the model document shown in the view. (If a view is selected when you insert the note, or if the note is attached to the model in a view, the note belongs to the view.)

NOTE: All documents have system-defined properties. Drawings have system-defined properties that you can use to customize a sheet format. For more information on document properties in notes, see Linking Notes to Document Properties

4. To add a new custom property or to edit an existing one, click File Properties, and edit the properties on the Summary Information – Custom and Configuration Specific tabs.

5. Select a system-defined or custom property from the list, and click OK.

The linked text is the value assigned to the property to which it is linked.

Prefixes for custom properties linked in notes are used as follows:

Prefix Evaluated from:

$PRP: Current document

$PRPSHEET: Model in the view specified in Sheet Properties.

If the model specified in Sheet Properties for custom properties is Default, then for notes belonging to drawing views, the model in the drawing view to which the note belongs is used.

For sheet and sheet format notes, the first view in the FeatureManager design tree is used.

If a view is selected, the model for that view is used for all cases.

Page 3: Linking Notes to Document Properties

$PRPVIEW: Model in the drawing view to which the note belongs

$PRPMODEL: Component to which the annotation is attached

Links to dimensions are evaluated from the active document.

If you selected View, Annotation Link Variables, and you add or edit a note in the sheet format, a variable for the property name is displayed (in the form $PRP:"property name" or $PRPSHEET). When you return to editing the sheet, the value of the property, if found, is displayed. If the property value cannot be found, the variable for the property name is displayed on the sheet.

If the appropriate document for custom properties cannot be located according to the designations above, the following rules apply:

In edit sheet mode, all sheet format notes are blank. All sheet and drawing view notes show their property names.

In edit sheet format mode, all sheet format notes show their property names.

NOTE: When a note in a drawing is linked to a custom property or a dimension and then the property or dimension is deleted, the note displays ERROR!<variable name>. The parametric text is retained, and you can double-click the note to see the text. As soon as the property or dimension is available, the note updates to the correct value. Other items in the note are not affected.

You can choose whether to display the link error. Select or clear View, Annotation Link Errors.

To access Custom and Configuration Specific properties:

1. Click File, Properties.2. In the dialog box, click the Custom tab for properties that apply to the entire document, or

the Configuration Specific tab for properties that vary from one configuration to another.3. If you define a property on the Configuration Specific tab, select a configuration in

Applies to.4. Add, edit, or delete properties as described in the procedures below. 5. Click OK.

To add custom properties:

1. Click in the first blank cell under Property Name, then type a name or choose one from the list.

2. Select a Type from the list.

To move between cells in the table, press Tab or Enter, or click in the cell you want to move to.

3. Under Value / Text Expression, enter a value for the custom property that is compatible with the selection in the Type cell.

For Value / Text Expression, you can type values, or you can select values from the list, which contains:

SolidWorks parameters (Mass, Density, and so on) Global variables Linked dimension names

If you add a date (for example, DrawnDate), as a custom property, the software does not require you to type a date for Value / Expression. However, if you do not type a date, Microsoft interprets the empty field as 1/1/1800 when you view the document's custom properties in Windows Explorer.

Page 4: Linking Notes to Document Properties

4. Press Tab or Enter.

The value of the property displays under Evaluated Value.

To link a custom property value for a part to the BOM Quantity

1. After adding a custom property, type or select the custom property name under BOM Quantity.

2. Click OK.

To add associative dimensions into custom properties:

1. Open the part and display the dimensions to add to Custom Properties.2. Under Property Name, type a name or choose one from the list.3. Select Text from the Type list.4. Click the dimension in the graphics area.

The <dimension_name>@<feature>@<model_name> is displayed under Value / Text Expression (for example, D1@[email protected]).

5. Place your cursor at the end of the dimension name and add additional text, such as millimeters.

NOTE: Values are cumulative unless you clear the content in the Value / Text Expression cell. Cumulative values enable you to include dimensions, units, and other text. For example: Click one dimension in the graphics area, type x in the Value / Text Expression cell, and click additional dimensions in the graphics area to display <dimension_name>@<feature>@<model_name> x <dimension_name>@<feature>@<model_name>, and so on.

6. Click any cell in the table.

The value of the property displays under Evaluated Value.

Any dimension included in Custom Properties is updated when you modify the dimension in the part.

To edit custom properties:

1. In the table, click the Property Name, Type, or Value / Text Expression that you want to change.

2. Edit as needed.3. Press Enter.

NOTE: This modifies the custom properties for the current document only. Edit the global custom properties with the Edit List dialog box.

To delete custom properties:

1. Click the number in the leftmost column to highlight the property that you want to delete.2. Click Delete.

NOTE: This deletes the custom properties from the current document only. Delete the global custom properties with the Edit List dialog box.

To add mass properties:

Page 5: Linking Notes to Document Properties

1. Enter a Property Name for the mass property.2. Select Text from the Type list.3. Under Value / Text Expression, select the appropriate mass property from the list.

Mass properties use the following, system-generated format:

SW-<mass_property>@ @ <configuration>@<model_name>

Example: SW-Density@@[email protected]

4. Press Tab or Enter.

The value of the property appears under Evaluated Value.

NOTES:

Mass properties for non-active configurations do not update until you make the configuration active. If you specify a non-active configuration in Applies to, an asterisk (*) appears under Evaluated Value, and a footnote states Calculated the next time the configuration is active.

Units of measure for mass properties are specified in document properties. To access document properties, click Tools, Options, then on the Document Properties tab, click Units. Units of measure for mass properties are specified under Mass property units.

Page 6: Linking Notes to Document Properties

You can customize drawing sheet formats to match your company’s standard format. The sheet formats provided with the SolidWorks software do not conform to any standard. Drawing templates contain notes that link to properties. These properties extract information from the part, assembly, or drawing. System properties are automatically available when you insert a note. You enter custom properties on the Summary Information - Custom tab for drawing, part, or assembly documents as appropriate.

If you create custom sheet formats, avoid overwriting the standard sheet formats that are included with the software. When you install a SolidWorks service pack, the standard formats are overwritten including your customized formats. Store custom sheet formats in a separate directory instead.

System properties linked to fields in the system sheet formats

SW-File Name (in DWG. NO. field)SW-Sheet ScaleSW-Current SheetSW-Total Sheets

Custom properties of drawing documents linked to fields in the system sheet formats

The following properties are populated by the properties.txt file in install_dir/lang/english.

CompanyNameCheckedByCheckedDateDrawnByDrawnDateEngineeringApprovalEngAppDateManufacturingApprovalMfgAppDateQAApprovalQAAppDate

Custom properties of parts or assemblies linked to fields in the system sheet formats

The following properties are populated by the properties.txt file in install_dir/lang/english.

Description (in TITLE field)WeightMaterialFinishRevision

Properties that are populated by the properties.txt file in install_dir/lang/english

Description ManufacturingApprovalPartNo MfgAppDateNumber QAApprovalRevision QAAppDateMaterial VendorWeight VendorNoFinish ClientStockSize ProjectUnitOfMeasure StatusCost DateCompletedMakeOrBuy CompanyNameLeadTime Department

Page 7: Linking Notes to Document Properties

CheckedBy DivisionCheckedDate GroupDrawnBy AuthorDrawnDate OwnerEngineeringApproval SourceEngAppDate IsFastener

SolidWorks special properties

SolidWorks special properties are part of every drawing file:

SW-Author SW-Template SizeSW-Keywords SW-Sheet ScaleSW-Comments SW-Sheet Format SizeSW-Title SW-File NameSW-Subject SW-Folder NameSW-Created Date SW-Long DateSW-Last Saved Date SW-Short DateSW-Last Saved By SW-Current SheetSW-Sheet Name SW-Total Sheets (total sheets in drawing file)

To edit the drawing sheet format:

1. Click Edit, Sheet Format, or right-click any blank area on the drawing sheet, or the sheet icon in the FeatureManager design tree, and select Edit Sheet Format.

2. Edit the sheet format as described below.3. Click Edit, Sheet, or right-click any blank area on the drawing sheet, or the sheet icon in

the FeatureManager design tree, and select Edit Sheet.

To move, delete, or add lines or text:

To delete, click the line or text and press the Delete key. To move, click the line or text and drag to a new location.

To add lines, click Line on the Sketch toolbar, or click Tools, Sketch Entities, Line.

To add text, click Note on the Annotation toolbar, or click Insert, Annotations, Note. Specify the text properties, then click to place the text in the desired location.

Table Anchor Points The standard sheet formats supplied with the software include anchor points for placing the tables in specific locations on the sheet. To set the anchor points, expand Sheet Format for the sheet in the FeatureManager design tree. Right-click one of the anchors, select Set Anchor, then click where you want the anchor point on the sheet.

When you set the anchor point from the FeatureManager design tree, you are automatically in Edit Sheet Format mode. When you finish, you are no longer in Edit Sheet Format mode.

You can also right-click a sketch point in the sheet format, and select Set as Anchor, one of the table anchors. The anchor point is highlighted, and its visibility toggles when you click the icon.

OLE Objects

To add objects from other applications, such as bitmaps of your company logo, standard note text from a file, and so on, click Insert, Object.

Page 8: Linking Notes to Document Properties

You can either create a new object or insert one from a file. Objects can be linked or embedded in drawing sheet files.

Page 9: Linking Notes to Document Properties

NOTES:

When you use design tables in the SolidWorks software, it is important to format the tables properly.

The parameter syntax (header cells) are not case sensitive.

Parameter Syntax(header cell)

Legal Values(body cell)

Default if Value is Left Blank

Parts only

$configuration @part_name configuration name not evaluated$configuration @feature_name configuration name not evaluatedParts and Assemblies

$comment any text string empty$description any text string configuration name$partnumber any text string configuration name$state @feature_name Suppressed, S

Unsuppressed, UUnsuppressed

dimension @feature_name- or -dimension@sketch_name

any legal decimal value for the dimension

not evaluated

$hw-size any value listed in Size in the Hole Wizard PropertyManager

smallest hole size available

$parent parent configuration name property is undefined$prp @property any text string property is undefined$state @equation_number@equations

Suppressed, SUnsuppressed, U

Unsuppressed

$state @lighting_name Suppressed, SUnsuppressed, U

Unsuppressed

$state @sketch_relation@sketch_name

Suppressed, SUnsuppressed, U

Unsuppressed

$user_notes any text string not evaluated$color 32-bit integer specifying

RGB (red, green, blue) colorzero (black)

$sw-mass any legal decimal value for the mass

The calculated value of mass in the Mass Properties dialog box.

$sw-cog any legal decimal value for the coordinates of the center of gravity, in the format x, y, z

The calculated value of mass in the Mass Properties dialog box.

$tolerance @dimension_name See Tolerance Keywords and Syntax in Design Tables.

NONE, or for a derived configuration, the tolerance value of its parent.

Assemblies only

$displaystate display state name For new configurations, Display State-1. For existing configurations, the name of that configuration's most recently active display state.

$fixed Yes (or Y) for fixedNo (or N) for not fixed

Not fixed (floating)

Page 10: Linking Notes to Document Properties

(floating)$state @component_name<instance> Resolved, R

Suppressed, SResolved

$configuration @component_name<instance>

configuration name The name of the configuration that is active when you create the cell.

NOTE: If the component uses a derived configuration, and the value is left blank, the configuration used is linked to its parent.

$never_expand_in_BOM Yes (never expand)No (allow to expand)

No

Obsolete parameters

$show@component_name<instance> $SHOW is obsolete. See Visibility of Components in Design Tables.

Page 11: Linking Notes to Document Properties

The following table lists the functions and operators that you can use in parameter expressions.

Symbol Description Example+ Add 3+4=7- Subtract 9-4=5* Multiply by 3*6=18/ Divide by 9/2=4.5^ raise to power of 4^5=1024\ Integer divide by 9\2=4SQR square root SQR(64)=8() prioritizes evaluation of

an expression5*(1+2)=15

! Factorial 5!=120

Fact(5)=5x4x3x2x1=120

% Percentage 25%=0.25MIN Minimum value MIN(1,2,4,5,7)=1MAX Maximum value MAX(3,8)=8SIN Sine SIN(pi)=0COS Cosine COS(pi)=-1TAN Tangent TAN(pi)=0ASIN Arc Sine ASIN(1)=1.570796ACOS Arc Cosine ACOS(-1)=3.141593ATAN Arc Tangent ATAN(0)=0SEC Secant SEC(0)=1CSC Cosecant CSC(1)=1.188395COT Cotangent COT(1)=0.642093ABS Absolute value ABS(-8)=8EXP e to the power of EXP(3)=20.0855EXP2 2 to the power of EXP2(3)=8EXP10 10 to the power of EXP10(3)=1000LOG Natural logarithm LOG(16)=2.77259LOG2 Log base 2 LOG2(8)=3LOG10 Log base 10 LOG10(1000)=3

NOTES:

The trigonometric examples in the above table assume that "pi" has been defined as a parameter.

Functions and operators are not case sensitive.