Creo™ Schematics 4.0 Help Center > Design Basics > Labels > Label Format Strings > About Java Label Format Functions
  
About Java Label Format Functions
To see a list of functions for label formats, click [fn(x)] in the Create Label or the Edit Label dialog box. The Select a function dialog box opens. The table below describes the Java functions for label format strings:
Entry in Select a function dialog box
Function inserted in format string
Description
Serial part of artifact name
{ArtifactName.getSerialPart()}
Displays the artifact serial number that was set in the Properties dialog box.
Slice first/last few characters of artifact name
{ArtifactName.slice(1)}
Displays characters from the artifact name. The number of characters displayed is the number in parenthesis. Type a negative number to display characters from the end of the name. Enter (-03) to display the last three characters of the name.
Slice a substring of artifact name
{ArtifactName.slice(1,1)}
Displays characters of the artifact name from the first number to the second number. Enter (2,6) to display the characters from 2-6.
Nth word inside artifact name
{ArtifactName.getNthWord(1,"_- ")}
When a name has separator characters, an underscore or a hyphen, the function displays the text in the specified position. For example, enter (1,-) to display SW-03.
Retrieve value of property “Harness” from connected fiber
{ArtifactName.connectedHarness()}
Displays the name of the specified connected harness in a block diagram.
Display group shapes
{rsdesigner/component/Group.hasShapes()}
BID/WID function that returns a string indicating whether the group has been placed on BID and WID sheets or not. If the given artifact is not a group, returns a translated error message. Applicable only in reports.
Display number of ports on group
{rsdesigner/component/Group.numPorts()}
BID/WID function that returns the number of ports this group has. If the given artifact is not a group, returns a translated error message. Applicable only in reports.