Adobe framemaker 6.0 User Manual

Page of 323
251
ADOBE FRAMEMAKER 6.0
 Examples
If you are using 4th Dimension, the procedure should have the following statements:
vDoc:=CREATE DOCUMENT ("") `Prompts user to name main file.
vTbls:=CREATE DOCUMENT (Tbls.mif) `Hard codes name  of include file.
SEND PACKET (vDoc;"<MIFFile  6.00> #File ID")
SEND PACKET (vDoc;"include (template.mif")
SEND PACKET (vDoc;"include (Tbls.mif")
As you process the records, you write the table data to the second include file by referring to the vTbls 
variable in a SEND PACKET command. For example:
SEND PACKET (vTbls; "<Cell <CellContent"+CR)
The main MIF file would have the following components:
<MIFFile 6.00> # File ID
include (template.mif) # MIF template
include (Tbls.mif)
# Table instances, created by
# the database
<TextFlow
# Main text flow
...
> # end of text flow
When a FrameMaker product opens the main MIF file, it will use the two include statements to place the 
data and template information in the required order.
Creating anchored frames
You can extend the technique of writing separate MIF files to handle both tables and graphics. Like table 
instances, anchored frame instances must appear in the MIF file prior to the TextFlow statement. If each 
record contains a graphic or a reference to a graphics file on disk, you would create a separate text file called 
AFrames.mif for only the AFrames statement. Using the technique described in the previous section, you 
would insert the code for the tables in the Tbls.mif file, the graphics in the AFrames.mif file, and the main 
text flow in the main text file. You use an include statement to read in the AFrames.mif file. 
Remember to assign unique ID numbers in the TblID statement for each table and the ID statement for each 
frame.