ModifyText
- Last UpdatedApr 27, 2023
- 2 minute read
Modifying a text attribute is achieved through use of the EDTEXT command, which gives a simple case-sensitive, string exchange facility operating on the attribute in question.
The EDTEXT command takes the general forms:
|
EDT text_type numberstring_1 string_2 |
|
|
text_type |
is the text attribute in question, which can be any Draw text attribute, including the name attributes OSFN and BSFN. If text_type is not specified, BTEX is assumed. |
|
number |
is the order of occurrence of string_1 within the target string. If this is omitted then the first occurrence, is assumed, if a value of 0 is specified then all occurrences of string_1 are processed (for example, replaced by string_2). |
Several modification instructions can be given in the same command line. The command
EDT text_type APP string
appends the given string to the specified text attribute.
The examples display different syntax options for the EDTEXT command.
|
Target string: ‘The dog, the cat and the rabbit were in the garden’ |
||
|
EDT ’the’ ’that’ |
(change first occurrence of ‘the’ to ‘that’) |
|
|
gives: |
’The dog, that cat and the rabbit were in the garden’ |
|
|
EDT ’the rabbit’ ’Dolores’ |
||
|
gives: |
’The dog, the cat and Dolores were in the garden’ |
|
|
EDT 2 ’the’ ’that’ |
(change second occurrence of ‘the’ to ‘that’) |
|
|
gives: |
’The dog, the cat and that rabbit were in the garden’ |
|
|
EDT 0 ’the’ ’that’ |
(change all occurrences of ‘the’ to ‘that’) |
|
|
gives: |
’The dog, that cat and that rabbit were in that garden’ |
|
|
EDT ’dog’ ’horse’ ’at’ ’ow’ 3 ’the’ my’ |
||
|
gives: |
’The horse, the cow and the rabbit were in my garden’ |
|
|
EDT ’fox’ ’fish’ |
(no change, ‘fox’ is not found) |
|
|
EDT PLTX 3 ’we’ ’a’ |
(attribute PLTX can be altered, if found) |
|
|
EDT OSFN ’A3’ ’A4’ |
(OSFN can be altered, if found) |
|
|
EDT DATE ’1990’ ’1991’ |
(DATE can be altered, if found) |
|
Note:
When modifying intelligent text the intelligent text code itself must be specified,
not the ‘resultant’ text.