Flanged Pipe
4. Batch Software Organization
This section provides an overview of the batch extraction software components and
organization. The purpose of this section is to explain to software support personnel how the software works so that problems can be tracked down and reported.
Figure 4-1 shows the batch software organization. The batch extraction software is driven by an executable pdsidf and a script file batch.cmd. When you submit a batch job using the Schedule Batch Job form, the batch extraction is submitted to a batch queue named PDisocreate. This queue is created with a job limit of 1 and a priority of 16. These parameters can be modified as needed.
In order to run batch isometrics, the pd_iso.cmd file, located in ˜\pdiso\bin, must define locations for required software. This script is executed from the batch queue and allows the batch extraction process to run on a node other than the one from which it was submitted.
The following three variables are read from the Windows NT registry:
PD_SHELL PD_ISO PD_ISOGEN
Figure 4 - 1. Batch iso extraction flow
Batch Software Organization 4 - 3
__________________________________________________________________________________________________________________________________________________
4.1 The Batch Job Input File
The input to the batch procedure is an ASCII data file generated by the Batch Environment called the Batch Job Input File. This file is structured as shown in Figure 4-2.
Figure 4 - 2. Batch input file data structure
The first record in the file contains a file format version number and the name of the Batch Data File from which the Batch Job Input file was generated. The software checks the version number to see if it matches the software version number, and, if it does match, passes the Batch Data File name on to other software modules as needed.
The second record is called an option record. The option record contains all of the batch processing options and revision block data that was entered into the BATCH form. Each option is separated from the others by at least one space. This record contains an exclamation point (!) in column 1 which flags it as an option record.
The third record holds the name of the default set which was specified in the Create Batch Job Input form. This record also contains an exclamation point in column 1.
Subsequent records, which initially contain a space in column 1, hold the model and primary line name for an isometric drawing which will be extracted. After the line is extracted, it is marked by an asterisk (*) in column 1 to indicate that it has been processed.
The drawing records can be repeated any number of times in the batch job input file. Each time Accept is selected, from the Create Batch Job Input form, a set of drawing records is written to the batch input file. An example batch job input file is shown in Figure 4-3.
Figure 4 - 3. Example Batch Job Input File
When a batch iso job is submitted using the Schedule Batch Job form, the batch job input file name is passed to the pdsidf executable as a parameter. The system then reads the batch job input file and drawing creation begins.
__________________________________________________________________________________________________________________________________________________
4.2 Line Processing (pdsidf)
Given the options from the batch input file and the identification of the line, two files are created, seed.dat and pdsidf.dat. These are the same two files that are created during interactive extraction.
The Project database is accessed to obtain the list of model files, secondary pipeline names, the seed file names, the options file for the piping area, the output file directory, the iso design file name and the extraction number for the drawing.
Type 63 information is read from the first piping model in the area specified in each record of the batch input file. Note that this model may not be the piping model which contains the pipeline being extracted.
The two files produced are different from the ones produced for interactive extraction. In pdsidf.dat, the first line name in the line name list is followed by a backslash and the piping area name. Following the line list is a record that contains the default set name. Next is a record that contains batch processing options. The last record contains the extraction number for the drawing.
Batch Software Organization 4 - 5
In SEED.DAT, the seed iso design file name is followed by records containing the plot request file name, the output file directory, the output iso file name, extraction number and number of sections.
The ISOGEN interface performs the same function in batch extraction as in interactive extraction: generation of the Intermediate Data File (IDF), which is the input to ISOGEN.
In addition to the IDF the interface may also produce an mto neutral file and three files containing text for the drawing title block. The title block text files are shown symbolically as a single file in Figure 4-1.
The contents of each of the title block tables file is controlled by a corresponding table in the title block tables file map. The SEGMENT_DATA_TABLE produces a file with the file extension of .seg, the DRAWING_DATA_TABLE produces a file with the extension of .bit and the SHEET_DATA_TABLE produces a file with the extension of .dwg.
The title block text files are only produced if the appropriate option is set in the Intergraph options block. Some of the entries in the DRAWING_DATA_TABLE can only be produced when PDSIDF.DAT contains the extra inputs that appear in the file for batch extraction. A title block record map set up for use with batch extraction might not generate a correct output file if it is generated by running the interactive software.
__________________________________________________________________________________________________________________________________________________
4.4 ISOGEN
As in interactive extraction, in batch extraction, the program ISOA_BGEN must be run immediately prior to IZOD2 in order to convert the ASCII IDF to binary. IZOD2, the ISOGEN image which produces the iso, can then be run to generate the isometric drawings.
Isometrics generated by the batch software are always created one sheet to a design file. The iso design file name is passed to the interface as name.i*, and so the first sheet will be in a file with the extension .i01, the second in .i02 and so on.
When isometrics are created in batch, you must set Intergraph options block word 4 to 1.
This causes ISOGEN to create a file that identifies which sheet each component in the line is drawn on. This file (called the sheet data file) is used downstream to split up the mto neutral file by sheet and also to prepare the segment summary table for each isometric sheet.
__________________________________________________________________________________________________________________________________________________
4.4.1 Splitting the MTO neutral file (MSPLIT)
After IZOD2 (see Figure 4-1) runs and creates the sheet data file, Intergraph’s MSPLIT executable splits up the mto neutral file so that a separate neutral file is created for each sheet of the drawing. The sheet data file consists of sheet numbers followed by Intergraph database occurrence numbers. MSPLIT assigns each neutral file record to a particular sheet by matching occurrence numbers in the sheet data file with the occurrence number on each record in the mto neutral file. MSPLIT will not work if you have not mapped the Intergraph occurrence anywhere in the neutral file record.
MSPLIT is executed by passing the mto neutral file name (without the file extension) and the extraction number as inputs in a foreign command line. Therefore, if the mto file name is test.b and the extraction number for the drawing is 10, the input parameter to MSPLIT would be formed as test 10. MSPLIT then looks for files test.b and test.sht as the input files.
The current assignment for the exported variable ISOOPTION is used to obtain the mto neutral file map name. The mto neutral file map must be read so that the field containing the occurrence number can be located in an mto record.
When output files are generated by MSPLIT, the output file name contains the extraction number and sheet number. For example, for sheet 2, extraction number 10, the output file name would be test2.b10.
__________________________________________________________________________________________________________________________________________________
4.5 Generating Title Block Input (TBLOCK)
In the same way that MSPLIT assigns a neutral file record to each sheet in an isometric, Intergraph’s TBLOCK assigns segment data to a sheet for the segment data summary.
TBLOCK assigns records in the .seg file (produced by the PD_ISO interface) to each sheet. It then sorts the records for each sheet and eliminates duplicates. Finally, TBLOCK assigns each data item in the record a text node number and sends it as output to a new file, which is input to STIB.
TBLOCK is also executed by passing the input in a foreign command line. The only input in this case is the isometric file name. The input files are then determined by name plus .seg and name plus .dwg. The title block map name is obtained by reading the options file assigned to ISOOPTION.
__________________________________________________________________________________________________________________________________________________
4.6 Filling in the Title Block (STIB)
After all of the input for each sheet has been determined, the executable that actually places text in the drawing title block is run. Intergraph’s STIB associates text in an input file with text nodes placed in the design file.
Batch Software Organization 4 - 7
__________________________________________________________________________________________________________________________________________________
4.7 Plotting
After drawings are created in batch they can be plotted. You can use IP_IPLOT plotting software.
To submit a plot, the batch software submits a job to the batch queue named PDisoplot. The job that runs in PDisoplot actually launches the plot.
Since the plot jobs are launched from a separate batch queue, you can accumulate the jobs in the queue and release them at some later time. You might also hold the jobs in PDisoplot to prevent normal production plotting queues from getting loaded down with isometric plots.
__________________________________________________________________________________________________________________________________________________
4.8 Updating the Project Database (pdsidf)
After a line has been successfully extracted, the project database is updated. The extraction number and date are updated each time a drawing is completed, while the revision block is only updated if you chose to update it in the Create Batch Job Input form when you create the batch job input file.
__________________________________________________________________________________________________________________________________________________
4.9 Making a Run Log Entry (pdsidf)
Making an entry into the run log is the last activity performed. The run log file name is formed using the file name of the batch job input file together with the file extension .job.
An entry in the log file consists of the drawing spec (piping area plus line name), an error code, a status message, and the date and time that the run completed. This is the same information given to you in a MAIL message when an error occurs.
__________________________________________________________________________________________________________________________________________________
4.10 Investigating Batch Extraction Problems
Since there are many steps involved in the generation of a completed isometric, there are many ways for the process to fail. When a problem occurs and drawing generation fails, you should follow a systematic procedure to determine the cause of the problem and, if needed, call Intergraph support and log the problem. All files will reside in the isoerr subdirectory in the specified output path location. Here is a suggested procedure:
1. Check the run log (.job file) to get the status code and message.
If there is no code or message, the batch procedure itself probably failed or was aborted.
In this case, go to Step 4.
2. Consult Appendix A for an explanation of the error determined in Step 1.
The explanation of the error might be enough to enable you to resolve it easily. If not,
then the explanation should narrow down the possibilities to a certain extraction facility or a certain area within the batch procedure. For example, it could be that the ISOGEN interface failed or that ISOGEN failed.
3. Check for error message files (.err).
Sometimes the cause of an error is reported more specifically in the error log. For example, if the ISOGEN interface fails, it might be that the line did not exist in the model. This fact would be reported to you in the error message log.
The .err file contains a note in the files list located near the top of the file. This note indicates which file was read for type 63 data. If any of the type 63 data which could effect the iso (for example: MTO Options, Design Monuments, etc.) has been changed, verify that the changes have been made to the file that is being read by PD_ISO.
4. Check the log file for the batch run.
Occasionally, error messages are displayed here and are not reported in the error log file. Also, if an error occurs or some module stack dumps, those conditions will be reported in this log.
5. Rerun the line with the DEBUG and VERIFY options enabled.
If the above steps do not lead to a resolution of the problem, use the DEBUG and VERIFY options to generate a detailed log file for the run. These options will also cause log files to be generated for the plotting jobs in case there is a problem with plotting. If you cannot determine the cause of the problem, the detailed log and any other pertinent files will need to be sent to Intergraph for an analysis of the problem.
Batch Isometric Extraction 5 - 1
__________________________________________________________________________________________________________________________________________________