Using the TririgaAssociatedRecordFetcher

Liz Sanderson
Liz Sanderson
  • Updated

FME Version

Introduction

Note: This article requires a Tririga database with data to run the provided workspace.

Connecting to IBM's Tririga Database is easy within FME using an AutoCAD Reader and the TririgaAssociatedRecordFetcher custom transformer. The TririgaAssociatedRecordFetcher will fetch all the associated records to record ID supplied. In this example, we will extract the Tririga Space records IDs created by the Tririga CAD Integrator in an AutoCAD DWG file, then use this transformer to request the associated records from Tririga and merge them onto the Space geometry to write to an ArcGIS File Geodatabase.

 

The TririgaAssociatedRecordFetcher is available from the FME Hub. Its user interface requires three parameters:

  • Tririga Server - the name:port of the Tririga Server, including http:// for normal or https:// for SSL connections
  • Tririga ID - the Tririga ID to find the associated records for
  • Web Connection - connection to the Tririga Server through HTTP

For information on setting up Web Connections in FME, please see this documentation.

 

Requirements

A Tririga Database containing a Tririga DWG file.

 

Step-by-step Instructions

The triSpace layer in the DWG file contains the Space outlines:

trispacelayer.png

 

These outlines are linked to an AutoCAD Data Dictionary that contains the Tririga IDs for the Spaces. In order to read the Data Dictionary features, you must enable them in the AutoCAD DWG reader settings:

dictionaryread.png

 

The Dictionary features will be read from Layer 0. We want the records from the TRGA.Attachment Dictionary. These records have the information we need in the list attribute autocad_xrecord_data_list:

dictionaryrecords.png

The first element in the list holds the record name, which is the entity handle of the matching Space feature. The fourth element in the list contains the Tririga record number for that Space. So we need to extract these two values from the list and remove their type prefixes.

 

In the workspace, we use a Tester to keep only the TRGA.Attachment records, then use two AttributeSplitters to extract the entity handle and Space ID from the list. After renaming these values and removing the unneeded attributes, we then merge them by entity handle onto the Space polygons from the triSpace Layer with a FeatureMerger.

mergedictionary.png

 

A copy of the merged Space features is sent through the TririgaAssociatedRecordFetcher to get all the Tririga records for that Space.

querytririga.png

 

Each record is output as a separate feature, with a number of attributes on it. The objectTypeName, moduleName, and associationName attributes are combined to make a unique attribute name for each record, with the associatedRecordName providing the value for that attribute.

screen-shot-2020-02-25-at-84752-am.png

 

The Tririga record features are merged onto the Space features using a 1:M join in a FeatureMerger. The new attribute names are exposed and modified to be compatible with Geodatabase, then the features are written to the File Geodatabase writer.

writegdb.png

 

Viewing the results in ArcGIS Pro, we have all the information for each Space:

arcgispro.png

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.