Using basic capabilities > Overview of using basic capabilities > Printing diagrams > Creating diagram borders
  
Creating diagram borders
There are five predefined borders that can appear around the margins of a printed diagram. Four of them are in accordance with the IDEF methodology. However, any border can be applied to any diagram type, regardless of methodology. You can also change these predefined borders, and you can create your own borders.
Each border is defined by a Windows Metafile (WMF file). They are in the System Architect startup directory:
C:\Program Files\UNICOM Systems\System Architect Suite\System Architect
To change an existing WMF file or to create your own, you will need a drawing tool, such as Metafile Companion. A WMF file for a diagram border consists of drawing elements (lines, boxes, graphics, and so on), static text, and place holders for variable text. Place-holder variables are delimited with percent signs, as in this example:
Date: %UpdateDate%
There is also a file named DiagramPrintBorder.xml, which contains a list of the WMF files, numbered 1 through 5. Add any WMFs that you create to this file, starting from number 11. (6 – 10 are reserved.)
Each place-holder %variable% in your WMF file must have a matching "FieldId=" entry in the XML file, which gives instructions about how to find or derive the variable data to be printed in the border, and gives some information about its appearance. Variables are in three general categories:
Internal properties
(InternalProperty="T")
DiagramName
DiagramDate
DiagramPage
EncyclopediaPath
Audit
Diagram properties
(DiagramProperty="T"):
These can be anything that fits your needs. To work with diagram properties in System Architect, open and display any diagram, move your mouse cursor to an area of white space, right-click, and then select Diagram Properties. The dialog presented allows you to enter the variable data that will appear in the printed border. Please refer to the section on USRPROPS.TXT to learn how to add your own diagram properties to that dialog.
A special category of diagram property is where a multiple choice exists, and the selected choice appears on the printed border as an "X". For example, IDEF0 diagrams have a diagram property of "Status", which is rendered on the dialog as a choice of four radio buttons. Here is how "Status" is rendered on the printed diagram border:
_ Working
X Draft
_ Recommended
_ Publication
This category of diagram property is defined in the XML file as DiagramProperty="T" FirstLetterOfProperty="Diagram Status". This feature works only when each choice starts with a different first letter, such as the above W,D,R,P. If your USRPROPS.TXT file defines a multiple choice variable named "Color", then your XML entry will say DiagramProperty="T" FirstLetterOfProperty="Color", and your WMF border will have:
%R% Red
%G% Green
%B% Blue
Note "Black" cannot be used, since "B" has already been taken.
IDEF0 properties
(IDEF0Property="T")
These properties are unique to IDEF0 diagrams and are hard-coded to place appropriate IDFE0 data into the border. They are:
Project
Normally a diagram property, but an empty field will default to the encyclopedia path.
Node
The data printed follows IDEF0 conventions for numbering a symbol based on its position in a hierarchy and its position on a diagram.
Context
This is normally a thumbnail picture of the parent diagram, with this diagram's parent symbol highlighted. When a thumbnail is not appropriate, the word "TOP" or "NONE" might appear instead.
Margins
The diagram border you create will take up space on the printed page, and you will have to supply the data needed to prevent a diagram’s symbols from overprinting your border. The XML file has an element named ExtraMarginLTRB=. For an IDEF0 border, this element is set to ExtraMarginLTRB="0,120,0,80". The thin lines making up the border’s left and right (L and R) do not take up any space and are set to zero. The top (T) part of the IDEF0 border needs 1.2 inches and the bottom (B) needs .8 inches.
Portrait versus landscape
The IDEF specification calls for its diagrams to be printed in landscape mode, so you will see that the XML file contains the element Landscape="T". The purpose of the setting is to warn a user who wants to ignore the specification, but it does not prevent them from doing so.
Example
Here is an example of an added border named Suzanne’s Border:
This graphic is described in the surrounding text.
This graphic is described in the surrounding text.
See also
Printing diagrams