Copy link to clipboard
Copied
HI All,
I'm trying to create a simple MIF file that contains tables and can be read via FM. I need this structure for my engineers, so that they can export data into a pre-defined table format - MIF file that I can read in FM. It will be a register list of hundreds, if not thousands of tables.
I have the structure of the table (basically copied the structure given by one of FM's Sample MIF files (included with the FM installation)).
I created the table and a short body page by creating 2 MIF files.
Now, because the table format is defined in the template, it pulls all the table format definitions from the template file. Including its **TableTitle**. And herein is my problem.
The MIF file opens nicely in FM with everything except the TableTitle being populated (i.e. the table has a table title, e.g. "Table1: " but this remains blank despite my desperate attempts to populate it via the MIF.
I tried populating it manually - i.e.
I opened the MIF file in FM.
Populated Table1: with an example name,
Saved the MIF file
Opened the MIF file in a text editor and found that this introduced the entire template again into my MIF file.
So I tried using the manually generated lines for the Table Title and copying it into the original 300-line MIF, but that didn't work either.
I also read in the MIF manual that if you create (generate) a table this way, you can call the table format (using <TblTag 'TableNameFromCatalog'>) and then define exceptions to the Table Format by giving the statement name for the specific property and then redefining it. i.e. create a local definition (instantiation) based on the Table catalog definition. (The MIF manual gives an example of redefining the number of columns and then adjusting their width - there is nothing about the table title property).
For some reason this does not work with the TableTitle. Any ideas why not?
Or am I not defining it properly for some reason?
Here is an example of the code for the tables: (also attached as a file to this post).
<Tbls
<Tbl
<TblID 11>
# Adding next line with Table Format-this is not needed if I don't need the TableTitle populated. It pulls the format from the template MIF. If I copy the table, it even numbers them correctly, but I can't figure how to get text into them. The string below with the example Register Name doesn't show in FM.
<TblFormat #normally for what I'm doing this line is not needed - up to end of TblFormat
<TblTag `Register'>
#Adding Table Title
<TblTitle
<TblTitleContent
<Para
<PgfTag `TableRegTitle'> # Forces lookup in Paragraph Catalog.
<PgfNumString `Table 1:\t'> #even without this line, the table shows up in FM with "Table 1: " as its title
<ParaLine
<String `Example Register1 Name (Ex_Reg1_SN)'>
> # end of ParaLine
> # end of Para
> # end of TblTitleContent
> # end of TblTitle
> #end of TblFormat
<TblH #this is the Header Row
<Row
<Cell
<CellContent
<Para
<PgfTag `chr_CellHeadingReg'>
<ParaLine
<String `Bits'>
>
> # end of Para
> # end of CellContent
> # end of Cell
#... it goes on to end the rows and cells properly. As well as end the Tbls.
BTW- I attached the MIF file with a .txt extension, since this platform doesn't support uploading MIF files (how odd, on an Adobe FM forum, MIF files aren't supported :). So just rename the extension to MIF in to open in FM and add <MIFFile 2017> to the first line. Otherwise, it'll open up fine in any text editor.
Have something to add?