Attaching External Data - Intergraph Smart Review - Help

Intergraph Smart Review Help

PPMProduct
Intergraph Smart Review
PPMCategory_custom
Help
SPFVersion_custom
2018 R1 (7.1)
Version_SPR
13.x(2018)

Smart Review can display virtually any data attached to an object, including documents, spreadsheets, text files, 2D drawings, MicroStation files, sounds, and animation. The Get External Data commands allow you to create an attachment by associating objects in a project to external information based on PDS label data. The Get External Data feature is similar to Tools > Data Annotation. However, unlike data annotations that display icons in the Main view, associated Get External Data applications result in entries on the Get External Data menu. You can add, edit, or delete these menu entries. Any changes that you make are written to the database file for your project.

  • Attaching a file to a property value of one object automatically attaches the file to every object with the same property value.

  • Deleting a file that is attached to a property value of one object automatically deletes that attachment from every object containing that property.

About the External Database

The Get External Data functionality queries tables in a Microsoft Access database (.mdb file extension) to manage the files and their associated applications that display as menu entries in the Get External Data menu. If the database cannot be found, Get External Data functionality allows you to browse for an existing file, or it can create a new one for you. You can also tell Get External Data to look for the database in another location by creating a text file named GetData.txt in the project folder and setting the second line to the path and filename of the database. The path can be a UNC path.

  • Your Get External Data database must contain the following three tables: CriteriaList, MenuList, and DataTable.

  • You must name these tables exactly as shown.

  • For each of these tables, the column names can be changed, but must remain in the order specified below.

CriteriaList

Use the Edit Attachments dialog box to add or edit entries in this table. The table must contain the following two columns:

ID - Contains a unique number that links the attribute names in the Criteria column of this table to the attribute values in the DataKey column of the DataTable.

Criteria - Contains the attributes names. These names populate the Match Criteria column on the Edit Attachments dialog box. Attribute names must be no longer than 50 characters.

MenuList

Use the Edit Types dialog box to add or edit entries in this table. The table must contain the following four columns:

DataType - Contains a unique number that links the FileName column of this table with the FileName column of the DataTable.

FileName - Specifies the type of data that is externally attached to an attribute value. The ExecuteStr column in this table uniquely associates these types with the program. These types populate the Type column in the Edit Attachment dialog box and appear as entries in the Get External Data popup menu. There is a 50 character maximum limit for this field.

ExecuteStr - Specifies the name and, optionally, the location of the executables for each type of data in the FileName column of this table. ExecuteStr can contain any executable file type (for example, .exe, .com, or .bat). These program names populate the Executable column on the Edit Type dialog box. If the path to the program is not specified, the software searches using the following sequence:

1. Project folder

2. Current folder

3. Windows folder

4. Windows System folder

5. All of the paths set in the Path environment variable

DefaultDir (optional) - Specifies the folder to search for the external data file if there is no folder specified in the Directory column in the Data Table.

DataTable

Use the Edit Attachments dialog box to add or edit entries in this table. The table must contain the following six columns:

ID - Contains a unique number used to index the entries in this table.

Criteria - Contains a unique number that links the attribute values in the DataKey column in this table with the attribute names in the Criteria column of the CriteriaList table.

DataKey - Contains the attribute values that have external data attached to them. These values populate the Match Criteria column on the Edit Attachments dialog box. This field has a 255-character limit.

DataType - Contains a unique number that links the FileName column in this table with the FileName column (containing the data type) of the MenuList table.

FileName - Specifies the name of the external data file and serves as the argument to the program specified in the ExecuteStr column in the MenuList table. These external data files names populate the Filename column on the Edit Attachments dialog box and display on the Get External Data popup menu.

If ExecuteStr specifies an executable (such as .exe, .com, or .bat), that executable is launched with FileName as its argument. If ExecuteStr is set to Default (which is an empty string) or does not point to a valid executable, Smart Review calls ShellExecute, which finds the association for the extension of FileName in the registry and launches the Open command for that file association. For example: if ExecuteStr contained Default and FileName contained a TXT file, the text file would be opened using any text editor because the registry entry ".txt" is associated with the registry entry "txtfile" that has a shell open command specifying notepad.exe as the executable.

Directory - Specifies the location that Get External Data first searches for the external data file specified in FileName. If Directory is empty, then Get External Data searches the specified folder for that external file's data type in the DefaultDir column in the MenuList table. If that text box is also empty, the current working folder is used for the search. If the file is still not found, a message displays.

upgrade_version

This table cannot be edited through the Smart Review user interface and should not be edited by the user. It must contain the following columns:

schema_upgrade_version - Tracks the version of the database schema.

schema_upgrade_date - Tracks the date of the database schema.

What do you want to do?