Adobe framemaker 6.0 Manuale Utente

Pagina di 323
250
ADOBE FRAMEMAKER 6.0
 Examples
SEND PACKET(vDoc;"<Para <PgfTag  `Body2'> <ParaLine "+CR)
SEND PACKET(vDoc;"<String `"+String(Num($2»);"(###) ###-
####")+"'>"+CR)
SEND PACKET(vDoc;"<ATbl 2> >>>"+CR)   `Send the anchor for the table
CLOSE DOCUMENT(vDoc)
ALERT("Your MIF file is awaiting your attention.")
Creating several tables
The previous example illustrates how to use a database to create one table instance. Both the Tbls and the 
TextFlow statements are written to a single text file. This approach, however, is limited to this simple case. 
If the document contains several tables, it may be more convenient to use the database to write the Tbls 
statement to a separate file and then use a MIF include statement to read the file into a FrameMaker 
product.
For example, suppose you need to publish a parts catalog. Each part has a name, a description, and a table 
that gives pricing information. A typical record looks like this:
In the database, all the information about each part is associated with its record. Due to the structure of 
MIF, however, the information must appear in different portions of the MIF file: the part name and 
description belong in the TextFlow statement, while the table belongs in the Tbls statement. To accomplish 
this, you can make the following modifications to the design of the database procedure shown in the 
previous example.
At the beginning of the procedure, create two text files—one for the main MIF file that will contain the 
MIF file identification line and the main text flow and the other for the Tbls statement. 
Use a second include statement to read in the Tbls statement
As your procedure passes through each record, write the data that belongs in 
the TextFlow statement in the main text file and write the table data to the 
Tbls file.
Valve Box Lids 
For 5.25" Shaft Buffalo style valve boxes. Lids come in 
three styles: water, gas, and sewer.
Marking
Stock Number
Price
Water
367-5044
$11.36
Sewer
367-5046
$10.25
Gas
367-5048
$12.49
Put  the  part  name 
and  description  in 
TextFlow
 
statement.
Put  the  table  in  a 
Tbls
  statement  in
a  separate  file.