Parse model data

Data Transformation Operations (DTOs) provide flexible and repeatable processes to parse model data. An example is if your project systems are concatenated into other metadata, you can parse it to its own tag. In the following example you will see how you can parse model data using DTOs.

If your project systems are concatenated into other metadata, you should parse it to its own tag to easily access the model by systems.

Parse system information

  1. Add a DTO, and then name it Systems – Piping.

  2. In the Selector tab use the following criteria:

    Rule Type Tag
    Tag / OP Name Pipeline
    Operator not null
  3. Add a DTO, and then name it Systems – Piping.

  4. In the Selector tab use the following criteria:

  5. Use the and/or group toggle at the top right to select and.

  6. Click the Add group icon at the top right, and then include the following group criteria:

    Rule Type Tag
    Tag / OP Name Model
    Operator

    =

    Value Mec AG Yard Piping.nwd
  7. Click the Add row icon below the row to add another row, and then use the following criteria:

    Rule Type Tag
    Tag / OP Name Model
    Operator

    =

    Value Mec UG Yard Piping_rev1.nwd
  8. Use the and/or row toggle above the grouped rows on the top left and select or.

    The selected criteria will find all objects with a Pipeline value. When you use the and group toggle, it will select the objects from the listed model tag values.

  9. Click the Test button to review and validate your selection criteria in the Selection Information panel. Results should include AQ-00074001and CWR-00064101.

  10. In the Actions tab select Calculated for Action.

  11. Click the Add icon next to Action to add a new function, and then use the following criteria:

    Function substr()
    Tag Pipeline
    Index of

    -

    Offset 1
    Length -3

    The substr() function lets you parse out your selected characters within a string of characters.

    The Index of field can be blank, or you can enter any character from where you want to start indexing. This example starts at the dash value in this string of characters for AQ-00074001.

  12. Add another function with the following criteria:

    Function tag()
    Tag IN8_System
  13. Click on the Run selected button to execute the DTO, and then create the new tag according to your selection criteria.