SY006 - Insert Text by Drawing Form Rule
- Last UpdatedNov 28, 2025
- 3 minute read
The program SY006 is used to insert text data in a number of drawings. The insertion is directed by placing rules belonging to the form connected to the drawing. A rule is identified by a specific number and contains information that directs the size and positioning of the text. Some applications use this technique to insert texts in drawings.
For general information on rules and dynamic texts, see Drawing Forms and Rules.
The rules used for this purpose are system-defined and should normally not be used in this program. To be sure not to interfere with the system-defined rules, it is recommended to use rule numbers starting from 10000 and upwards. These are called user-defined rules. However, there are no restrictions on the usage of rules in this program. The rules of any form can be defined and updated interactively in Marine Drafting, using the Tools > Drawing Form > Save function. Hence, to insert a text into a drawing, this text must be associated with a specific rule, a form must be connected to the drawing and this form must contain the description of this specific rule. The program is controlled by an input file, directing what drawings to handle and what text to insert.
Assignments
|
SY006_DATA |
- input file |
|
SY006_LIST |
- output list file |
Input File
The input file is an ordinary ASCII stream file containing an arbitrary number of statements defining what drawings to treat and what texts to insert. The file may look like:
DRAWING, 'MYDRAWING';
DRAWING, 'PROJ-%%%-MY*';
TEXT/RULE=12001,
‘Nagoya Takamitu';
TEXT, 'Hakamoto',
'Sukiyaki',
'and friends'
/RULE=12004;
Thus, first the drawings to treat are stated, followed by the texts to insert. However, the order of the statements are irrelevant.
The DRAWING Statement
DRAWING,'<dwg_name>';
This statement denotes what drawing(s) to treat. The drawing name <dwg_name> can be generic, that means, contain wild cards like'*' and '%'. The surrounding apostrophes can be omitted if there are no special characters in the drawing name.
The TEXT Statement
TEXT/RULE=<rule_no>,
'textrow_1',
'textrow_2',
...
'textrow_n';
This statement denotes what text to insert. The rule number <rule_no> is given by the attribute RULE and is compulsory. The text to insert is given row by row. At least one row and a maximum of 25 rows are expected. The surrounding apostrophes can be omitted if there are no special characters in the row.
Result
Drawings will be updated with text data as defined by the input file. In each drawing, each text will be inserted according to the specified rule. The text will structurally belong to the form view of the drawing. If a text denoted by this rule already exist, it will be replaced.
Note: The rule dictates the maximum length of a row and also the maximum number of rows in a text. This means that the inserted text may be truncated to satisfy the rule description.
Drawings that cannot be found in the Drawing data bank will be ignored. The same goes for drawings without a drawing form or if the form object cannot be found in the Standard data bank. Texts denoted by a rule that cannot be retrieved (that means, cannot be identified in the form definition) will be ignored. A list file on the standard list directory containing the result of the interpretation and the text insertion will be produced. The name of the list file will be instext <jobno>.lst where <job_no> stands for the job number.