User Defined Component Types
A user defined component type requires two files: an INI file describing the component type and an ICO file containing a picture for the user interface display.
You can use any program capable of editing text files to create an INI file for a new user-defined component type. You will need to use a program capable of editing bitmaps, in particular ICO files, e.g. Windows' Paint, to create the user interface picture for a new user-defined component type.
The files for user defined component types are stored in the MET_IM\USERTYPES or IMP_IM\USERTYPES directories.
The examples supplied are Tank, Line, Valve and Document.
INI Files for User Defined Component Types
The easiest way to create a new type is to copy the INI file for an existing type and rename it then alter the contents with a text editor. The INI file keys are outlined in the following table.
|TYPE_STRING||The value stored in the Component_Type column of the TAGS table as the type for this component.|
The prefix on the front of the name of rating table(s) for this component type.
(e.g. "Line" prefix in the rating table name "Line_Lines")
|DEFAULT_TABLE_NAME||The name for the default rating table used to store the ratings for this component type. (e.g. Line_Lines)|
|NSQ_CLASS||The CLASS used to reference the name sequencer for a name for one of these components.|
|NSQ_NAME_ATTRIBUTE||The ATTRIBUTE used to reference the name sequence for a name for one of these components. This should be TAGNAME by default.|
|TREE_ICON_FILE||The name of the icon file displayed in the IM user interface for this component type. (e.g. Line.ico)|
|TYPE_FOLDER_TEXT||The text displayed in the IM tree view for the root folder for this component type.|
|DATA_FOLDER_TEXT||The text displayed in the IM tree view for the ratings folder for this component type.|
The text displayed in the IM tree view for the generic folder for this component type.
All user defined component types must now have ratings so this setting is no longer used.
The prefix for the name of the field in the TAGS table that is used to store the association of this component type with other component types. Note this must be unique and cannot be used by any other user defined components or the main IM components.
(e.g. "A12" will cause associations to be stored in A12_IDX and A12_TABLE).
|CATALOG_MAP_FILE||The catalog map file used to map catalog fields to rating fields for this component type.|
|CATALOG_FILE_TYPE||A single letter code specifying the type of catalog that contains components of this type. For most user-defined types, the generic catalog type 'G' should be used.|
Set to 1 if this user type is specifically to be used for associating external documents with components in Instrument Manager.
The default value of 0 means the user type represents a user-defined type of component.
The following is the contents of the Line.ini file for the sample user-defined component type: Lines.
TYPE_STRING = Line
TABLE_PREFIX = Line
DEFAULT_TABLE_NAME = Line_Lines
NSQ_CLASS = Line
NSQ_NAME_ATTRIBUTE = Tagname
TREE_ICON_FILE = Line.ico
TYPE_FOLDER_TEXT = Lines
DATA_FOLDER_TEXT = Lines with ratings
ASSOCIATION_COLUMN = A12
CATALOG_MAP_FILE = Line Catalog Map.dbf
CATALOG_FILE_TYPE = G
IS_ASSOCIATED_DOCUMENT = 0