Menu: P&ID Accessory Loop Diagrams Create Table Command line: CREATETABLE
This function scans a chosen prototype or template drawing for specially formatted keywords and creates columns for each keyword in a user-specified table in the current or chosen database project. The drawing does not have to be opened for this command to find all the keywords. It scans the drawing and then creates a table based on that drawing. The user-specified table will be pre-populated with a unique identification, loop number, and drawing template name and will be linked back to the instrumentation table within the project database. The other columns created within the table will be derived from the keywords found in the prototype drawing. The tag and function will not be located in the table since it exists in the original project database instrument table.
A LOOP column already exists in the instrument table. This command scans this column for the various loop numbers in the project database. If the template drawing has a FI, FT, and FV, it searches the instrument table within the project database for all loop numbers that have this series of instruments. Once it finds the loop numbers in the database, it creates the remaining columns from the prototype by drawing keywords and finishes by generating the user-specified loop table.
Once the loop table has been generated, the tag, function, and loop number are left in the instrument table in the project database. In the user-specified loop table, the row is given a unique identification that is linked back to the instrument table.
Note: The CADWorx configuration variable LoopTemplateDirectory (see page 34) can be used to pre-specify a location for this command to start searching for template drawings.
The prototype drawings, which can be collected in a central location, contain all these keywords needed to create a complete loop drawing. When used with the
GENERATELOOP command, these keywords are used to populate the drawing with the data from the table located in the loop tables.
Keywords can be an attribute, an attribute definition, plain text, or Mtext. The keywords must be in uppercase. The keywords can be located in a simple string or can be in a complete sentence of strings.
Examples of keywords, which could be located in the prototype drawings, are listed below.
Note: The keywords need the greater than and less than brackets for automatic detection (”<>”).
The sequence below places a tag in the drawing from the selected loop.
<TAG>
This tag could be part of a string.
This is a keyword <TAG> located in a string.
This is to indicate which tag goes with which particular function.
<TAG,LAL> and <TAG,LAH>
Chapter 4 Accessory 163
Two identical functions could have different tags such as FE-101A and FE-101B.
<TAG,FE,*A> and <TAG,FE,*B>
This is to search for the other keywords such as FUNC, WIRE, or TERMINAL.
<FUNC>, <WIRE> or <TERMINAL>
Provided with CADWorx P&ID are several prototype drawings located in the <INSTALL-DIR>\Tutorial directory.
The following command executes this function. It can also be accessed from the pulldown menu P&ID>Accessory>Loop Diagrams. The following series of dialogs will appear.
Command: CREATETABLE
If the user is not in a project database environment (has not opened a drawing with an external database), the following dialog appears requesting the desired database type.
After this dialog the user, will then have to select the actual database that contains the loop tables. If the user is in a current project environment, it bypasses the database type and file selection dialog and proceeds on automatically.
The dialog below requests the selection of a loop template drawing file. At this point the command will scan the drawing for instrument series and try to find match occurrences from the instrument table in the project database.
After a template drawing is selected, scanned, and processed, the next dialog provides the user the opportunity to relocate columns and specify widths. It also shows the columns found in the prototype drawing (minus the tag and functions that are in the instrument table).
The Table Name edit box allows the table to be named. It will have the prefix “LOOP_”
appended in the actual database.
The Column Setup allows the user to view and re-arrange the columns generated from the prototype drawing. The columns can be re-arranged here with the move up and move down controls below. Highlight a column in the list box above and pick either the move up or down button.
This Move Up button allows the user to move a column up in the list.
This Move Down button allows the user to move a column down in the list.
By highlighting one of the columns in the list box above, the user can specify the Column width in the table created here.
Chapter 4 Accessory 165
This final dialog shows which loops were found in the project database instrument table.
These are the loop entries that will be placed in the loop table. This table is named by the user and has appended a “LOOP_” prefix. In the Table Name: edit box shown above will be only the user specified name. It will not have the “LOOP_” appended prefix shown.
After this dialog is closed, all the loop number entries will be available.