About Pictogram Templates

Pictogram templates are defined in an XML file with separate sections for different content.

This page discusses:

See Also
Authoring Smart Pictogram Templates

<PictogramTemplateDefinition>
   <Title titleNLS ="...">...</Title>
   <Description descriptionNLS ="...">...</Description>
   <Magnitude>...</Magnitude>
   <DisplayUnit>...</DisplayUnit>
   <DisplayUnits>
      <DisplayUnit index="1" magnitude="Volume">mL</DisplayUnit>
      <DisplayUnit index="2" magnitude="Torque">Nxm</DisplayUnit>
   </DisplayUnits>
   <Inputs>
      ...
   </Inputs>
   <TemplateStyle>
      <![CDATA[ 
         ...
      ]]>
   </TemplateStyle>
   <TemplateLayout>
      <![CDATA[ 
         ...
         <td class="Value">
            {{{InputObject.1.nominalValue.value}}} {{{DisplayUnit}}} {{{DisplayUnit.1}}}
         </td>
         ...
         <td class="Value">
                           {{{InputObject.2.Instance.customerAttributes.CustoExtn.TorqueNominal}}} {{{DisplayUnit.2}}} 
         </td>
         ...
      ]]>
   </TemplateLayout>
   </PictogramTemplateDefinition>

Title and Description

The title and description display general information, allowing you to select the right templates to create Pictograms.

The Title is a mandatory field (that you must specify) in the template, while the Description is optional (you do not need to specify).

The values for Title and Description are retrieved from an NLS file using the specified keywords (“titleNLS” and “descriptionNLS”). If you do not specified keywords or NLS values, then the values inside <Title>...</Title> and <Description>...</Description> are used.

The NLS entries need to be specified in the file DELWKIPictogramTemplate.CATNls

<Title titleNLS ="ApplyOilTitle">Apply Oil</Title>
<Description descriptionNLS ="ApplyOilDesc">Apply Oil Instructions</Description>

Magnitude and Display Unit

Specification of what to use when displaying real values

The strings to be used for specifying the magnitude and display unit in the template should be taken from the Preferences

  • For Magnitude: Use the magnitude names as listed in the “Magnitudes” column
  • For Display Unit: Based on the selected magnitude, use the unit symbol as listed in the “Units” combo

IMPORTANT - The spelling and (upper/lower) case of the magnitude names and unit symbols should be entered into the template exactly as they are seen in the preferences. So in the example above, “mL” is correct, while “ml” would be incorrect.

<Magnitude>...</Magnitude>
   <DisplayUnit>...</DisplayUnit>
   <DisplayUnits>
      <DisplayUnit index="1" magnitude="Volume">mL</DisplayUnit>
      <DisplayUnit index="2" magnitude="Torque">Nxm</DisplayUnit>
   </DisplayUnits>

Display Mode

In case of a LeaderObject is defined for Inputs, optionally it is possible to specify which objects are taken into account for display in the Smart Pictogram marker layout.

This can be defined through following syntax: <LinkedItemNamesDisplayMode>all</LinkedItemNamesDisplayMode>

The possible values are first, all, and last. If it is not defined, a default behavior is applied: only the first selected object will be displayed in the Smart Pictogram marker.

Inputs

Information about the objects that will be used to fill out different fields of the Pictogram (see detailed section below)

The inputs define the objects that are used to fill out the different fields/cells of the Pictogram

  • During creation
  • When adding leaders after creation (“Leader Object”)
<Inputs>
     <Input index="1" type="DATACOLLECTROW" role="CreationObject"></Input>
     <Input index="2" type="ITEM" role="LeaderObject"></Input>
</Inputs>

Creation Object

  • The Creation Object can be of type “ITEM” or “REQUIREMENT” or “DATACOLLECTROW”
  • Note: It is not mandatory to specify a Creation Object

Leader Object

  • The Leader Object can only be of type “ITEM”
  • Note: It is not mandatory to specify a Leader Object

Template Layout

The ordering and content to put into the different fields of the Pictogram (see detailed section below)

The layout of the template is in the form of a HTML table, a table row and table data (that represent the different fields/cells)

Important: The layout must be specified inside a CDATA section in the template

<TemplateLayout>
   <![CDATA[ 
      ...
   ]]>
</TemplateLayout>

Example 1:

	<TemplateLayout>
	 <![CDATA[ 
     <table id="PictogramTable">
      <tr>
         <td class="InstructionSequence"></td>
         <td class="Icon"> <img src='Oil.png' /></td>
         <td class="Value">
            {{{InputObject.1.Instance.quantity.value}}} {{{DisplayUnit.1}}}
         </td>
         <td class="LinkedItemNames" defaultMsgNLS="SelectItems">
            {{{InputObject.2.Reference.title}}}
         </td>
         <td class="LinkedItemCount">
            x {{{InputObject.2.COUNT}}}
         </td>
       </tr>
	 
	  </table>
	 ]]>
</TemplateLayout>

Example 2:

	<TemplateLayout>
	 <![CDATA[ 
     <table id="PictogramTable">
      <tr>
         <td class="InstructionSequence"></td>
         <td class="Icon"> <img src='Torque.png' /></td>
         <td class="Value">
            {{{InputObject.1.minValue.value}}} {{{DisplayUnit.1}}}
         </td>
         <td class="Value">
            {{{InputObject.1.nominalValue.value}}} {{{DisplayUnit.1}}}
         </td>
         <td class="Value">
            {{{InputObject.1.maxValue.value}}} {{{DisplayUnit.1}}}
         </td>
         <td class="LinkedItemCount">
            x {{{InputObject.2.COUNT}}}
         </td>
       </tr>
	  </table>
	 ]]>
	</TemplateLayout>

Example 3:

  <TemplateLayout>
      <![CDATA[ 
	<table id="PictogramTable">
      <tr>
         <td class="InstructionSequence"></td>
         <td class="Icon"> <img src='Oil.png' /></td>
         <td class="Value">
            {{{InputObject.1.Instance.quantity.value}}} {{{DisplayUnit.1}}}
         </td>
         <td class="LinkedItemNamesAndCount" defaultMsgNLS="SelectItems">
            {{{InputObject.2.Reference.title}}} x {{{InputObject.2.COUNT}}}
         </td>
      </tr>
	  </table>
	 ]]>
	</TemplateLayout>

All the class identifiers in the sample templates are reserved keywords and should not be modified.

  • InstructionSequence
  • Icon
  • Value
  • LinkedItemCount
  • LinkedItemNames
  • LinkedItemNamesAndCount
  • etc

Cells / Fields with values retrieved from Input Objects

The content inside the {{{...}}} brackets will be replaced by actual values when the Pictogram is created.

  • For Input Objects of type REQUIREMENT or “DATACOLLECTROW”, the typical syntax to be used is
    {{{InputObject.<InputObjectIndex>.<AttributePathName>}}}
  • For Input Objects of type “ITEM”, it is also required to specify whether the attribute to be retrieved is an Instance attribute or a Reference attribute.
    {{{InputObject.<InputObjectIndex>.Reference.<AttributePathName>}}}
    
  • The AttributePathName to be used for Items, DCP Rows and Requirements can be retrieved from the Web Services “GET” documentation
    • Items Link

      e.g.

      {{{InputObject.1.Instance.quantity.value}}}
      {{{InputObject.2.Reference.title}}}

    • DCP Row Link

      e.g.

      {{{InputObject.1.nominalValue.value}}}
      {{{InputObject.1.label}}}

    • Requirement Link

The {{{DisplayUnit.1}}} string will be replaced by the value of Display Unit specified in the beginning of the template.

Values can be specified for Creation Objects and Leader Objects. At the time of Pictogram creation, since there is no Leader Objects, the Pictogram will be created and displayed without the cells / fields specified for the Leader Objects.

After the Leader(s) are added, then the Pictogram will be refreshed to display the cells / fields of the Leader Objects.

You can specify the icons as a relative path or as an absolute path. e.g.

<img src='Torque.png'/>
<img src='Icons\Torque.png'/>
<img src='C:\MyData\Icons\Torque.png'/>

Template Style

The format to be applied to the different fields of the Pictogram (see detailed section below)

The style of the template can be specified by adding appropriate values for the table and table data (fields/cells)

Important: The layout must be specified inside a CDATA section in the template

Example:

<TemplateStyle>
  <![CDATA[ 
      table {
         background-color: white;
         color: black;
         border-color: black;
         min-width: 50px;
         text-align: center;
         vertical-align: middle;
         border-width: 3px;
         border-radius: 0;
         border-collapse: collapse;
      }
      td {
         border-color: black;
         border-width: 3px;
         border-radius: 0;
         padding: 10px
      }
      .InstructionSequence {
         background-color: blue;
         color: white;
         border-color: black;
         border-width: 3px;
         border-radius: 0;
         padding: 10px
   }
  ]]>
</TemplateStyle>

All cells/fields will have the same styling with the exception of the one which displays the Instruction Sequence. The style values listed in InstructionSequence will be used for this cell/field.