GTData contains over 40 utilities for performing a variety of Data related tasks. Many of these utilities are for the conversion to or creation of data in the GTViewer format; however, one of these utilities is provided to make configuration easier. The topic of this posting is GTConfig. GTConfig is actually a multipurpose tool that can be used for several different tasks (including data conversion), but this posting is only going to cover using GTConfig for configuration.
The simplest way to describe GTConfig is to say that it is simply a GUI for editing and manipulating GTViewer Table Definition Files (.TAB). A .TAB file is used by every GTViewer dataset that contains tabular data and it defines the Tables, Columns, and other metadata properties including:
- Tables that are to be displayed
- Table Display Order
- Alternate Table Names
- Attributes that are to be displayed
- Attribute Display Order
- Alternate Attribute Names
- Table and Attributes that are omitted from Extracts
As you can see, these setting are things that you would most likely want to modify to make your data more friendly for your users. While the table structure is generally fixed and should not be changed, the display characteristics can be very important in making data more usable.
The .TAB file and its format are comprehensively described in the GTVConfig.doc (not to be confused with GTConfig.exe) and anything you can do with GTConfig to configure this file can also be done manually. The benefits of using GTConfig lie in its GUI to edit the file and not using Notepad or some other text editor. GTConfig also provides some Macro-like functionality for performing the same operation to all tables and all attributes. It also provides some template based functionality to modify all table and attributes to a commonly used configuration. So, while GTConfig cannot do anything that is not already achievable by manually editing the .TAB file, it does provide an easier way to perform the same task with much greater efficiency and is less prone to mistakes.
GTConfig is a simple tool to use. You can run it from the command-line without or without a .tab file specified:
If you do not specify the .TAB file on the Command-line, you can use the Open button to select any .TAB file you like. Once GTConfig is running with an open .TAB file, you get something that looks like this:
You will see a list of Tables defines in the .TAB file along with their current settings. Selecting a table from the list will populate the Table Properties section showing which values can be modified:
Generally, for Tables, you will only modify the Display Name, Display Flag, and Display Priority. The Name, Number, and Reference Table setting can be modify if you uncheck the Lock Standard Properties checkbox, but these changes are not recommended.
The Display Name is the name used for the Table on the Attribute Info dialog’s Tab for the particular table. The Display Flag can be set to Show, Hide, or Omit. When set to Hide, the table will not display on the Attribute Info dialog, but the data will still be present for applications to use. If set to Omit, the Table will be omitted from any extraction of the data (either by GTViewer or GTExtract). If set to Omit, the data will not only be hidden, it will be removed from the extract making it unavailable for applications to use. The Display Priority determines the order of the Tabs in the Attribute Info dialog. Lower values are displayed first. In the following Attribute Info dialog, Pole was set to 500, Work Order was set to 800, and Elect Connectivity was set to 900. The Element tab is always last.
If Display Priorities are not set, the tables will displayed in the order they are found which usually appears somewhat random. In practice, it is usually good to set tables that are part of every feature (like a Common table or Connectivity table) to a high value, so they will always appear after the feature’s main table. From the Attribute Info Dialog box above, you can also see that the Display Names were also set: POLE = Pole, WORK_ORDER = Work Order, and ELECT_CONNECTIVITY = Elect Connectivity.
Once your Tables have been configured, you can configure the columns for each table. Double-clicking on a table in the list will take you to the Table Attribute page:
This dialog is very similar to the initial dialog only it pertains only to the selected table. It shows all of the columns define for the selected table along with the display settings.
The settings for Attributes are very similar to those of tables. You can set the Display Name, Display Flag, and Display Priority. Name, Type, Size, Decimals, and Key are locked by default and should not be modified.
The Display Name will be the name seen in the Attribute Info dialog. Display Flag can be set to Show, Hide, or Omit (same actions as the Display Flag for Tables). The lower Display Priority values are displayed first. Unlike the tables, if a Display Priority is not specified (or they are all the same), the attributes will be displayed in the order they appear in the .TAB file (instead of a random order).
The Table Attribute page also provides 3 buttons for setting the Display Flags of all attributes in the table with one click of a button: Show All, Hide All, Omit All. If you need to only show a few attributes, it may be quicker to Hide All then set the ones you want to see to Show.
GTConfig also provides some commands to affect the configuration on a grander scale than one table or attribute at a time. Back on the Main Page, the Global Operations section can be used to perform a variety of tasks.
These Global Operations deal with all of the attributes of each table. You can specify a list of attributes in the Attributes prompt (more than one can be specified if you separate them by a space), then the Show, Hide, Omit, and Priority Set button can be used. If the Show button is pressed, each table will be searched for the Attributes specified and their Display Flag will be set to Show. The Hide and Omit buttons can be used in the same way. The Priority value can be set and the Set button can be used to apply this priority to all attributes that are specified (regardless of the table they are in). The Optional Framme button is a quick way to list Framme attributes that are generally optional (RB_LOCK, RB_VERSION, RB_COMPONENT, RB_STATE, MSLINK, RB_OCCURRENCE). These attribute generally have little meaning for GTViewer data, so you can press the Optional Framme button, then Hide or Omit and get rid of all them at once. The Required Framme button populates the Attributes prompt with the required Framme attributes (RB_PRMRY, RB_SCNDRY, RB_FSC). In general, you must keep these attributes, but it is common to Hide them since they are generally of little use to users.
The last 4 buttons in the Global Operations section are: Pretty 0, Pretty 1, Pretty 2, and Clear. These button will apply a template to all of the tables and attributes to “Pretty” up the display using a standard method:
- Pretty 0 – sets all of the Display Names for tables and attributes to be the same as the actual name.
- Pretty 1 – sets all of the Display Names for the tables and attributes to be the same as the actual name. All underscore characters ( _ ) are converted to spaces.
- Pretty 2- sets all of the Display Names for the tables and attributes to be the same as the actual name. All underscore characters ( _ ) are converted to spaces, the first letter of each word is capitalized, and the remainder of the character in the word are set to lower case.
- Clear – sets all of the Display names for the tables and attributes to blank (meaning that no alternate value is provided).
Once your are finished configuring your data display, you can press the Save button to store the new configuration information. GTConfig provides two of feature that are worthy of mentioning. The Report button will generate a .csv file that contains all of the information in the .TAB file in a easier to use format. You can open the .CSV file up in Excel and view the information in a report format. The Import button is a powerful feature for importing Display settings from other .TAB file. If you import a .TAB it will apply any Display Name, Display Flag, or Display Priority setting for both tables and attribute for any tables and attributes that are found in both the current .TAB file and the one being imported.
One thing that many users forget is that you can have multiple .GTM files define pointing to the same data but can view the data differently with different .TAB files. It is usually a good idea to target the data for its users so that they can get the most out of it.
GTConfig is a powerful tool. It can save a great deal of time and can help improve the usability of the data.
Post a Comment