HAT 4.1 Text File Format


Templates Section

Analysis templates are stored in a templates section in a HAT text file. HAT stores all templates in a single templates section, but it is formally correct to use multipile sections as well.

Templates section begins with a section header
##Templates
User defined default values set by "Analysis/Set Defaults" -command are stored using the same format. This section begins with a section header
##Defaults
This document describes how the different templates are stored in the file. Although it is possible to write template definitions externally with a word processor, it is much easier to use HAT's own user interface to define them. This information is provided for advanced users who might use cut-and-paste technique to prepare files with a set of useful templates.

Format
Generic symbols
Generic selectors
Local subsets

Cards template
Lines template
Components template
Time Functions template
Component Functions template


The analysis templates are stored after each other in the file. One empty line separates the template definitions. The first line always begin with a # character. No other definition line begins with that character.

  • Format:
    #{type}	{pathname}
    {selector}
    {selector}
    {selector}
    .............
    
  • Description:
    {type}      Template type specifier. Currently defined types:
                  C   Cards analysis template
                  L   Lines analysis template
                  P   Components analysis template
                  R   Component Functions template
                  T   Time Functions template
                  K   Card format template
    
    {pathname}  Name of the template. Name is a full pathname
                defining its place in template hierarchy.
                Hierarchy levels are separated by a colon (:).
                Default section templates do not have a name.
    
    {selector}  These selectors define the template.
                See appropriate template type definition.
    

    Generic Symbols

    These symbols are used in all template definitions:
    {int}    = Integer value
    {float}  = Floating point value
    
    {dim}    = Dimension number, 1 to 12
    
    {decs}   = Decimals
               0 to 6   Number of decimals
               T        Thousands (-3, ')
               M        Millions  (-6, ")
    
    {grid}   = Horizontal gridlines
               -   None
               1   Every line
               2   Every other line
               3   Every third line
               5   Every fifth line
               X   Every tenth line
    
    {vertgrid} = Vertical gridlines
               -   No
               +   Yes
    
    {indent} = Hierarchy indent
               F   Flat, no indent
               S   Single
               D   Double
    
    {sort}   = Sorting
               -   Dimension Hierarchy
               A   Ascending
               B   Combined Ascending
               C   Absolute Ascending
               D   Descending
               E   Combined Descending
               F   Absolute Descending
    
    {color}  = Color
               -   White
               2   Gray 25 %
               5   Gray 50 %
               7   Gray 75 %
               B   Black
               N   Brown
               R   Red
               M   Magenta
               V   Violet
               Y   Yellow
               L   Light green
               G   Green
               C   Cyan
               U   Blue
               D   Dark blue
    

    Generic Selectors

    Selectors beginning with s define local subsets.

    Selectors beginning with x are common to all templates:
    xo                     Open directly
    xc                     Calc directly
    xz                     Zoom directly
    
    xP  {int}  {int}       Window position  (top, left)
    xS  {int}  {int}       Window size  (height, width)
    
    xE  {int}              Window header height (integer)
    
    xLm {Data}             Page Setup record (for macintosh)
    xLw {Data}             Page Setup record (for windows)
    
    xpt                    Don't print window title
    xpu                    Don't print printing time
    xpm                    Print analysis definition
    xpn                    Print analysis notes
    xpc                    Don't print column titles
    xpd                    Don't print header rows
    xpa                    Don't print data rows
    xph                    Print leaving margin for holes
    
    xpp  {pagenumber}      Print page number
    
                           {pagenumber} =
                              -   no page numbers
                              a   n        n = current page number
                              s   n/t      t = total number of pages
                              p   n(t)
    
    xep  {Creator}         Picture export creator (for macintosh)
    xeg  {Filetype}        Picture export file type (for macintosh)
    xeW  {int}             Picture export width
    xeH  {int}             Picture export height
    
    xec  {Creator}         Text export creator (for macintosh)
    xew                    Export text in HTML
    xex                    Export text in XML
    xet                    Export window title
    xer                    Export column titles
    xes                    Export analysis notes
    xeh                    Don't export header rows
    xea                    Don't export data rows
    xed  {sepchar}         Export using decimal separator
    xem  {sepchar}         Export using thousand separator
    xef  {sepchar}         Export using field separator
    xeq  {sepchar}         Export using quoted fields
    xen  {sepchar}         Export using row terminator
    
                           {sepchar} =
                              {char}     Actual non-control character
                              #{int}     ASCII code for a control character
                              #F         CR/LF row terminator
                              #B         Padding character (non-breaking space)
    
    xN  {notes}            Analysis template notes
    

    Cards Template Selectors

    BD{dim}  {Expr}        Dimension expressions
    BC  {From}  {To}       Card IDs
    BY  {Expr}             Card title expression
    BL  {Expr}             Line text expression
    BV  {Expr}             Value expression
    BS  {Expr}             Subset expression
    
    P   {C}{C}{C}...       Show columns:
    
                           {C} =
                              I      Card ID
                              T      Card title
                              L      Line text
                              V      Value
                              1..9   Dimension 1 to 9
                              A..C   Dimension 10 to 12
    
    D   {decs}             Decimals
    
    S   {GS}{LS}           Group and line scope
    
                           {GS} = {LS} =
                              N   None
                              S   Selected
                              A   All
    
    wC  {int}              Width of the card ID field
    wY  {int}              Width of the card title field
    wL  {int}              Width of the line text field
    wV  {int}              Width of the value field
    wD  {int}  {int}  ...  Widths of the dimension fields
    

    Lines Template Selectors

    BD{dim}  {Expr}        Dimension expressions
    BC  {From}  {To}       Card IDs
    BY  {Expr}             Card title expression
    BL  {Expr}             Line text expression
    BV  {Expr}             Value expression
    BS  {Expr}             Subset expression
    
    D   {decs}             Decimals
    Gx  {grid}             Horizontal gridlines for text
    Gy  {vertgrid}         Vertical gridlines for text
    
    P   {C}{C}{C}...       Show columns:
    
                           {C} =
                              I      Card ID
                              T      Card title
                              1..9   Dimension 1 to 9
                              A..C   Dimension 10 to 12
                              L      Line text
                              V      Value
                              S      Accumulated
    
    H   {F}{F}{F}...       Header flags:
    
                           {F} =
                              B   Sum before
                              +   Sum positive
                              -   Sum negative
                              P   Sum period
                              F   Sum after
                              M   Max values
                              m   Min values
                              A   Averages
                              #   Number of lines
                              T   Turnover time
                              R   Turnover rate
    
    +   {percentage}       Positive interest
    -   {percentage}       Negative interest
    
                           {percentage} = floating point number without %-sign
    
    IL                     Linear interest calculation
    IE                     Exponential interest calculation
    
    WL                     Show as line chart
    WB                     Show as bar chart
    
    wC  {int}  {int}             Column widths for card ID and card title
    wD  {int}  {int}  {int} ...  Column widths for dimensions
    wL  {int}  {int}  {int}      Column widths for line text, value and accumulated
    
    ZE                     Show exponent on value axis
    ZI                     Invert value axis direction
    ZV                     Omit value gridlines
    ZD                     Omit time gridlines
    ZR                     Show reference line
    ZG                     Show today line
    ZZ                     Show zero line
    ZC  {Name}             Use time scale {Name} as time labels
    ZS                     Omit redundant information in card fields
    

    Components Template Selectors

    BD{dim}  {Expr}        Dimension expressions
    BC  {From}  {To}       Card IDs
    BY  {Expr}             Card title expression
    BL  {Expr}             Line text expression
    BV  {Expr}             Value expression
    BS  {Expr}             Subset expression
    
    D   {decs}             Decimals
    
    P   {dim}              View dimension
    Gx  {grid}             Horizontal gridlines for text
    Gy  {vertgrid}         Vertical gridlines for text
    S   {sort}{column}     Sorting
    
    K   {hier}{comps}      Components
    
                           {hier} =
                              H   Hierarchical
                              F   Flat
    
                           {comps} =
                              A   All
                              U   In Use
    
    R   {indent}           Indentation
    
    %-                     No %-labels around pies
    %I                     %-labels with integer values
    %D                     %-labels with one decimal
    
    WP                     Show pie chart
    
    ZC                     Don't draw scale under the pies
    ZD                     Show direct values
    ZS                     Show summed values
    ZX  {ExpansionData}    Initial component expansion state
    
    wD  {int}              Column width for dimension texts
    
    Q{column}  {flags}  {width}    Column information for each column in use
    
                           {column} =
                              B   Before -column
                              N   Negative -column
                              P   Positive -column
                              R   Period -column
                              C   Count -column
                              E   At End -column
                              A   After -column
                              T   Total -column
    
                           {flags} =
                              V   Visible
                              v   Not visible
                              B   Boldface
                              b   Not boldface
    
                           {width} = {int}     Column width in pixels
    

    Time Functions Template Selectors

    Selection Variable selectors:
    VN  {Name}  {Title}    Name and title  (must be the first line)
    VD{dim}  {Expr}        Dimension expressions
    VC  {From}  {To}       Card IDs
    VY  {Expr}             Card title expression
    VL  {Expr}             Line text expression
    VV  {Expr}             Value expression
    VS  {Expr}             Subset expression
    
    VM  {combination}{measure}   Variable calculation options
    
                           {combination} =
                              C   Count
                              S   Sum
                              P   Product
                              A   Average
                              G   Geometric mean
                              M   Maximum
                              N   Minimum
    
                           {measure} =
                              P   By Period
                              A   From Start
    
    VZ  {cp}  {cp}  ...    Presentation options:
    
                           {cp} =
                              D{decs}   Decimals
                              C{color}  Line or bar color
                              W{int}    Column width in pixels
                              w{int}    Line width (1 to 6)
                              V+        Visible
                              B+        Boldface
    

    Formula Variable selectors:
    FN  {Name}  {Title}    Name and title  (must be the first line)
    FF  {Expr}             Expression
    FD  {timeopr}          Operation by time
    
                           {timeopr} =
                              x   No operation
                              I   Integrate
                              D   Differentiate
                              M   Multiply
                              Q   Quontient
    
    FG  {cgr}              Curve presentation
    
                           {cgr} =
                              -   Invisible
                              L   Line chart
                              B   Bar chart
    
    FZ  {cp}  {cp}  ...    Presentation options (same structure as in VZ above)
    

    General Selectors:
    K   {From}  {To}       Time axis limits (card IDs)
    PL  {period}           Period length
    
                           {period} =
                              Y   Years
                              H   Half Years
                              T   Tertials
                              Q   Quarters
                              N   Two Months
                              M   Months
                              K   Half Months
                              4   Four Weeks
                              3   Three Weeks
                              2   Two Weeks
                              W   Weeks
                              D   Days
                              A   Active Days
                              C   Active Cards
                              G   Active Groups
                              L   Active Lines
    
    PX  {Name}             Use time scale {Name} as the period.
    
    PW  {int}              Date/CardID column width in pixels
    
    L   {bar}              Bar types in bar chart
    
                           {bar} =
                              U   Unique Bars
                              T   Tiled Bars
                              B   Behind Each Other
                              O   Overlayed Bars
                              S   Stacked Bars
    
    Gx  {grid}             Horizontal gridlines for text
    Gy  {vertgrid}         Vertical gridlines for text
    
    SM  {float}            Maximum value for diagram value axis
    SN  {float}            Minimum value for diagram value axis
    
    WL                     Show diagram (line and bar charts)
    
    ZE                     Show exponent on value axis
    ZI                     Invert value axis direction
    ZV                     Omit value gridlines
    ZD                     Omit time gridlines
    ZR                     Show reference line
    ZG                     Show today line
    ZZ                     Show zero line
    ZC  {Name}             Use time scale {Name} as time labels
    

    Component Functions Template Selectors

    Selection Variable selectors:
    VN  {Name}  {Title}    Name and title  (must be the first line)
    VD{dim}  {Expr}        Dimension expressions
    VC  {From}  {To}       Card IDs
    VY  {Expr}             Card title expression
    VL  {Expr}             Line text expression
    VV  {Expr}             Value expression
    VS  {Expr}             Subset expression
    
    VZ  {cp}  {cp}  ...    Presentation options:
    
                           {cp} =
                              D{decs}   Decimals
                              C{color}  Bar color
                              W{int}    Column width in pixels
                              cD        Direct values
                              cS        Sums
                              V+        Visible
                              B+        Boldface
    

    Formula Variable selectors:
    FN  {Name}  {Title}    Name and title  (must be the first line)
    FF  {Expr}             Formula expression
    
    FS  {Sum}              Summing over the dimension hierarchy
    
                           {Sum} =
                              B   Before
                              A   After
    
    FZ  {cp}  {cp}  ...    Presentation options (same structure as in VZ above)
    

    General Selectors:
    K   {hier}{comps}      Components
    
                           {hier} =
                              H   Hierarchical
                              F   Flat
    
                           {comps} =
                              A   All
                              U   Active
                              Z   Non-zero
    
    PD  {dim}              View dimension
    PW  {int}              Dimension column width in pixels
    R   {indent}           Indentation
    
    Gx  {grid}             Horizontal gridlines for text
    Gy  {vertgrid}         Vertical gridlines for text
    
    S   {sort}  {Name}     Sort lines by variable with name {Name}
    
    L   {bar}              Bar layout
    
                           {bar} =
                              U   Unique Bars
                              T   Tiled Bars
                              B   Behind Each Other
                              O   Overlayed Bars
    
    N  {spacing}           Line spacing
    
                           {spacing} =
                              1   1.0
                              A   1.2
                              2   1.5
                              3   2.0
                              4   2.5
                              5   3.0
                              B   4.0
                              C   5.0
                              D   6.0
    
    WR                     Show bar chart
    
    ZI                     Invert value axis direction
    ZV                     Omit value gridlines
    ZX  {ExpansionData}    Initial component expansion state
    
    

    Previous Contents