Creo™ Schematics 4.0 Help Center > Design Basics > Labels > Label Format Strings > About Label Format Functions
  
About Label Format Functions
To see a list of functions for use in label formats, click [fn(x)] in the Create Label or Edit Label dialog box. The Select a function dialog box opens. The table below describes the functions for label format strings:
Entry in Select a function dialog box
Function inserted in format string
Description
Cross reference (column character{-}, location set character{/})
[dg_xref(-,/)]
Default
Displays the locations of other shapes of the same artifact for a cross-reference between shapes. The resulting label can show a variety of results.
If more than one shape exists, the location of each shape is returned, separated by commas.
Examples of what the function can return are:
*—If there are no other shapes to reference.
4—The referenced shape is in column 4 of the location set for this sheet.
Sheet_1-4—The other shape is located on Sheet1, which is in the same location set as the current sheet and the location set has sequential sheet numbering set to false.
Default/Sheet1-4—The other shape is located on Sheet1, which is in a different location set named Default.
Default/4—The other shape is located in a different location set named Default, in column 4. This situation arises if the location set has sequential column numbering set to true.
* 
If the location set is set to use row and column numbering, the returned cross-reference is of the form [column, row]. For example, [2,8].
The parameters are:
column character{-}-: The first parameter to the call (default = –) is used to separate the sheet name from the column number. For example, Sheet1-4.
location set character{/}-/ :The second parameter to the call (default = /) is used to separate the location set name from the sheet name. For example, Default/Sheet1-4.
Master cross reference (column character{-}, location set character{/})
[dg_xref_master(-,/)]
Displays the location of shapes of the master of the group using the same output format as for the cross reference (dg_xref).
Name of child ({logical name})
[dg_child_name(1)]
Displays the name of the child component at the specified  logical name. The default logical name is 1. If the component is a variable group, the logical name is specified as a pair of numbers, separated by a comma.
Property of child ({property name}, {logical name})
[dg_child_property(name,1)]
Displays the value of the specified parameter for the component at the specified logical name. The default parameter name is name. The default logical name is 1. If the component is a variable group, the logical name is specified as a pair of numbers, separated by a comma.
Full name of artifact (separator character{/})
[dg_full_name(/)]
Displays the full name of the artifact, separated by the separator character. The default separator character is /. For example, the name could be Conn1/Motor/1.
Name of container if present
[dg_container_name_if_present()]
Displays the name of the parent, if the artifact has a parent.
Sequence number for sheet
[dg_get_sheet_info(seq_num)]
Displays the position of the sheet within the location set.
Number of sheets in location set
[dg_get_sheet_info(num_sheets)]
Returns the number of sheets in the location set.
* 
As there may be gaps in the location set sequence, the number of sheets does not have to be the same as the highest sequence number in the location set.
Highest sequence number in location set
[dg_get_sheet_info(end_seq_num)]
Displays the highest sheet sequence number within the location set.
Name of diagram type
[get_diagram_type_info(name)]
Displays the name of the diagram type. (Set by the system)
Description of diagram type
[get_diagram_type_info(description)]
Displays the description of the diagram type. (Set by the system)
Logical name of artifact
[dg_get_logical_name()]
Displays the logical name of the artifact as an integer.
* 
If the artifact is a member of a variable group, the logical name is returned as a pair. For example, [1,1].
Number of ancestors
[dg_get_num_ancestors()]
Displays the number of ancestors for an artifact. For example, if a port is a member of a block that is in turn a member of a group, then the port has two ancestors.
Get 'to' component({to}, {propname}, {both|port|component})
and
Get 'from' component({from}, {propname}, {both|port|component})
[report_from_to(from,name,both)]
Displays details about the objects connected to the fiber. It can return details about the connected port, the parent of the connected port, or both.
* 
This function is for fibers only.
The parameters are:
{From|To}—Indicates whether to obtain the first (from) or second (to) port on the wire.
{propname}—Indicates the name of the parameter to obtain from the connected object.
{both|port|component}—Indicates whether to return information about the connected port, its parent, or both. If both is specified, the two values are separated by a space.
For example, a wire is connected to a block named B1 at one end and is not connected at the other end. If the function asks for parameter name, the from is B1 and the to is NC (for not connected).