Schedule Generation
- Last UpdatedJan 16, 2024
- 2 minute read
Using Autotagging, tabbing in intelligent text, and the Marine Programmable Macro Language (PML) it is possible to generate schedules on drawings easily.
The Tag Rule’s TMRF attribute should reference a GLAB that has been positioned absolutely (for example, AT X1000 Y800 ABS) at the top or bottom of the required schedule’s position. The GLAB’s BTEX attribute should contain a number of code-words separated by tabbing codes (see Tab Generator Codeword). For instance for a nozzle schedule the BTEX may be
’#NAME#15#P1BOR#25#CREF’.
This will create a schedule of three fields giving nozzle name, bore, and connection reference. The second field will start at character column 15 and the third at column 25. The width of the fields should be made sufficient to accommodate the expanded codewords. The GLAB’s FONT attribute should point to a font set up with fixed-width characters (that means, styles 6 or 7), its CHEI set to an appropriate value, and its leader line and text frame suppressed.
When the Tag Rule is updated all the GLABs generated will be in the same position. A macro should be written that scans around the Layer looking for GLABs with their SORF attribute referencing the Tag Rule. Each such GLAB found should be moved up or down (depending upon whether the template GLAB was positioned at the bottom or top of the schedule). The size of the move should be calculated from the character height of the GLAB and its number in the scan.
The macro should also create a TABL element to provide the frame of the schedule and its horizontal lines, a TEXP element to define the field headings, and vertical STRA elements to separate the fields. To achieve this it will be found necessary to use the Q EXTENT BTEX feature (see Entering Text from Draft) to determine the lengths and positions of text strings.