Discovering tags with the batch SmartConverter - SmartPlant Foundation - IM Update 44 - Customization & Programming - Hexagon

SmartPlant Foundation Customization

Language
English
Product
SmartPlant Foundation
Search by Category
Customization & Programming
SmartPlant Foundation / SDx Version
10

Sometimes it is useful to get a list of tags found in a set of drawings. To determine the tags found in a set of drawings, run the Batch SmartConverter utility (IGRConverter.exe). This utility is located in the SPFSmartConverter subfolder under the SmartPlant Foundation installation folder on the SmartPlant Foundation server.

BatchSmartConverter

The Batch SmartConverter utility monitors one or more folders for drawings that need to be converted with the SmartConverter.

Since the SmartConverter utility is configured to run under the LOCAL SERVICE account, the LOCAL SERVICE user needs to have write permissions to all the folders monitored by this utility.

It looks for drawings with the extensions listed in the Convert Files with These Extensions field. To monitor a new folder, click Add Folder. In the Browse for Folder dialog box, select a folder and click OK. When the Batch SmartConverter finds a drawing in one of the monitored folders with one of the specified extensions, it does the following actions.

  • Looks for a file with the same name, except with an .igr extension. If this file is found, it is assumed that the file has already been converted using SmartConverter.

  • If the corresponding .igr file is not found, the file is processed by the SmartConverter. If successful, a hotspotted corresponding .igr file is created in the same folder along with a graphics map file. The graphics map file will have the same name as the original drawing with an .xml extension. The graphics map file looks like this example:

    <Mappings>

    <Mappings>

    <MapType>GraphicOID</MapType>

    <Maps>

    <Map Name="20VA001" IDef="IObject" GOID="2993" />

    <Map Name="20VA101" IDef="IObject" GOID="7811" />

 

For each tag found, a map element is created with the following attributes.

  • Name – Tag name.

  • IDef – The interface that will be used to find the tag in SmartPlant Foundation.

  • GOID – The ID of the graphic element for the tag.

The converted .igr files and the graphics map files can be used to create SmartPlant Foundation load files to populate the SmartPlant Foundation database with converted drawings. Additionally, the graphics map files can be used to created load files to populate the SmartPlant Foundation with the located tags.

Optionally, if the ListFile option is set to 1 in the SPFSmartConverter.ini file, a corresponding text file will be created for each drawing with the extension .rpt. The content of this file looks like this example:

TAG|20VA001|2993|1

TAG|20VA101|7811|1

Each line of the text file represents a located tag/graphical element combination. The format of each line is:

<Topic>|<Tag Name>|<Graphic ID>|<Graphic ID Index>

where:

Topic – The topic of the rule in the SPFHotspotter.ini file.

Tag Name – The name of the located tag.

Graphic ID – The ID of the graphic element for the tag.

Graphic ID index – The index of the graphic element, if it is part of a group found using scatter text rules. Otherwise, the value will always be 1.