Format codes to modify reference and property text output


You can modify the resulting value of a property text string by appending a format code, /xx, as defined in the table below. You can apply these format codes by typing them directly in a property text string, %{PropertyText/xx/xx/xx}, or by inserting them using the Format Values dialog box. To learn how to use the dialog box, see the help topic, Format property text values.

Note:

You can type the /ST format code to specify superscript and subscript formatting for plain text or numbers. Refer to the example in the following table. You cannot apply superscript and subscript using the dialog box.

Format codes

Syntax

Description

Example input

Example output

Format code /NU

Note:

Not /nu

Syntax %{PhysicalPropertyName/NU}

No units

%{Density/NU|G}

Note:

|G =The source of the property text value. Select Property Text dialog box

2712.000

Format code /CP

Syntax %{CustomPropertyName/CP}

Custom file property

Fetches the current value and type for any user-defined properties specified on the Custom page of the File Properties dialog box. This value overrides any previously defined value in QY CAD.

To display a user-defined %{Title}:

%{Title/CP} 

Document AB (approved)

Format code /OP

Syntax %{CustomOccurrencePropertyName/OP|G}

Custom occurrence property

Fetches the values for the custom properties defined in the Occurrence Properties dialog box in an assembly.

To display the different maintenance requirements for a part.

%{Maintenance/OP|G}

When used in a In a parts list column, shows the union of all values for a custom occurrence property in a single cell.

Item Number

File Name

Maintenance

5

shift_cap.par

Bi-Weekly, Monthly, Weekly

Format code /EV

Syntax %{VariableTableExposedName/EV}

Exposed variable

Fetches the real value of a variable exposed in the Variable Table.

Note:

You can apply number formatting to the exposed variable value when you use the /EV format code.

To display the precise value (with delimiter) for the height of a part:

%{Height/EV}=

150.345 mm

Format code /CM

Syntax %{CustomMaterialName/CM}

Custom material property

Fetches the current value from any user-defined material property that you add to the Material Properties tab in the QY CAD Material Table.

%{Material ID/CM|GP} 

Note:

|GP =The source of the property text value. Select Property Text dialog box.

1000

Format code /@n

Round-off

Where integer n specifies the number of decimals of round-off for a property text value that starts with a number.

%{%HS/@2}

12,12

Format code /du

Dual units

Applies only to fields that evaluate to a single united value.

Secondary unit displays ( ) or [ ] based on dimension style.

Dual units only
%DI%{%HS/DU}

Format code /@

Syntax  %{propertyName/@DateTimeFormat|link}

Date and time

Some year, month, day format options are:

YYYY→2010

yy→10

MMMM→March

MM→03

dddd→Monday

ddd→Mon

dd→date (1–31)

%{Created/@yyyy MMMM}

Date and time format of property text.

2010 July

/STSuperscript^Subscript

Example:

/ST used to format plain text.

Applies Superscript and Subscript format to plain text or numbers typed in either or both of these fields.

Plain numbers
%{/ST1^2}

Plain text
%{/STYes^No}

/ST±upper^±lower

/st±.001^±.002

Text height is defined by the active dimension style.

Example:

/ST used to define stack tolerance value.

Stack tolerance, upper and/or lower.

The ^ separates upper tolerance±.001 from lower tolerance ±.002.

When ^ is not specified→upper tolerance only.

Upper tolerance only
%{%HS/ST+.02}

Lower tolerance only
%{%HS/ST^+.02}

Upper and lower tolerance
%{%HS/ST+.02^-.03}

/LT±upper^±lower

/lt±.001^±.002

Text height is defined by the active dimension style.

Limit tolerance, upper and/or lower.

The ^ separates the upper limit ±.001 from the lower limit ±.002.

Lower limit only
%DI %{%HS/LT^-.25}. Nominal HS=5.28


Upper and lower limit
%DI %{%HS/LT+.05^+.01} Nominal HS=12.12


Limit tolerance with precision
%DI %{%HS/@4/LT+.05^+.01}. Nominal HS=12.123245


/TCn

where n designates a predefined capitalization format.

Property text string format.

TC1→UPPERCASE

TC2→lowercase

TC3→Sentence case

TC4→Title Case

UPPERCASE

%{File name/TC1}

FILE NAME

lowercase

%{File name/TC2}

file name

Sentence case

%{File name/TC3}

File name

Title Case

%{File name/TC4}

File Name