Create a control (.xml) file - SmartPlant Foundation - IM Update 46 - Help - Hexagon

SmartPlant Foundation Help

Language
English
Product
SmartPlant Foundation
Search by Category
Help
SmartPlant Foundation / SDx Version
10
SmartPlant Markup Plus Version
10.0 (2019)
Smart Review Version
2020 (15.0)

The control file is an xml file where you map the controls defined in the template file to specific properties in view definitions in the database.

A sample control file delivered for transmittals is shown in the following image:

Sample control file_new

The following procedure describes how to create and configure a control file:

  1. Open Notepad or any XML editor.

  2. Add the root tag as <Control Mapping>.

  3. Add the <ViewDefs> tag.

    SHARED Tip To include properties from multiple view definitions in the control file, list all the view definitions here. For example:

    <ViewDef Name ="ExternalXmtlReportViewDef"/>

    <ViewDef Name ="ExternalOpenXMLReportViewDef"/>

  4. Create <Controls> tag to define non-tabular data. A Controls tag includes a source and target that link a control in the template file to its matching property in a view definition. For example, the following syntax links a text box with the unique tag txtName to the matching Name property in the ExternalXmtlReportViewDef view definition:

    <Controls source ="ExternalXmtlReportViewDef.Name" target ="txtName"/>

    • Create a separate control tag for each non-tabular control defined in the template file.

    • You can also specify multiple properties in a single control by separating them with a comma. For example:

      <Controls source = "ExternalXmtlReportViewDef.Name,ExternalXmtlReportViewDef.Description" target ="txtName"/>

  5. If the report includes data in a table, add a <Tables> tag.

  6. For each table in the report, specify the view definition name as: <Table ViewDef="View definition name">. For example, <Table ViewDef="ExternalXmtlReportViewDef">.

  7. Beneath each Table tag, map the property for each column using a Column tag. The Column tag includes a source and target that link a column in the table to its matching property in the view definition. For example, the following syntax links a text box with the unique tag txtRevision to the matching Document Revision property in the view definitions defined in the preceding Table tag:

    <Column source = "Document Revision" target="txtRevision"/>

    • Create a separate column tag for each tabular control defined in the template file.

    • Close all the tags.

  8. Save the file as a .xml file when all controls are mapped.