Basic reference and property text rules
A property text string begins with %{ and ends with }. The contents inside the curly bracket define what data to extract, where to get the data, and how to display the data.
Shown below is the basic syntax for property text and reference text. You can use format codes to modify the resulting value.
-
The general form of property text is:
%{<data item>/<display modifier>|<data source>}
Example:The simplest example of general property text is %{MyProp}, where:
-
MyProp is a custom property in the current document.
-
|<data source> is implied to be the current document.
Example:%{Density/NU|R1} displays the “Density” property, without units (/NU), from the first linked model (|R1) to the draft file.
-
-
Reference text is a subset of property text. It references an annotation or drawing view, and displays the result in another annotation. All of the referenced elements are within the same file. Reference text uses the general form of property text:
%{<data item>/<display modifier>|<data source>}
Example:%{Balloon Upper|Ref:A669}
-
Property text codes insert symbols and values from a predefined set of font-based characters. Property text codes use the form, %XX, where %XX is defined in property text codes. Property text codes do not use curly brackets.
-
You can modify the resulting value of a property text string by appending a format code, /xx, as defined in format control codes to modify property text.
-
You can specify multiple formatting modifiers for a single text value:
%{PropText/xx/xx/xx}
Example:The following example strings together three modifiers—precision, stacked tolerance, dual units—of the hole size value:
%DI %{%HS/@2/st+.001^-.002/du}
This property text string displays the diameter symbol with [(Hole Size with 2 decimal places) (stacked tolerances +.001,-.002)] and dual units applied to all.
-
White space in property text is ignored.
-
A back slash \ specifies do not evaluate the next character.
-
Format codes /xx can be applied only to property text that resolves to a single united value.
Example:-
A format code cannot be applied to the following hole callout, because %HC is expanded to more than one united value:
%HC=%DI%HS%ZH%RT C'BORE %DI%BS-%BD DEEP
-
However, you can modify the string with brackets to apply a format code to an individual property:
%HC=%DI%{%HS/DU}%ZH%RT C'BORE %DI%BS-%BD DEEP
-
© 2021 UDS