Contents - Index

Creating Links


Link buttons can be placed on the Diagram window or child Diagram windows by selecting the Create Link button in the toolbar in the Professional version.   A dialog window will appear after clicking this toolbar button in which the caption and link properties can be specified and assigned to a button which will appear on the foremost Diagram window.  The caption, bitmap picture, and properties can be changed at a later time by right-clicking (or double-clicking) on the link button while the Diagram window is in development mode which brings up the Link Button Properties dialog shown below.   Fields are provided in the link button dialog to enter the left and top positions of the button as well as the width and height.  Note that a transparent Link Button may be selected.  In this case, the Link Button is invisible in application mode but it is visible in development mode. 


A Name field is provided to associate this button with EES variables.   If a name is provided, EES will create variables Name.left,, and Name.Hide. (Note that the names of the attributes that can be specified with EES variable names are underlined when a name is entered.)  The created variables can optionally be assigned values in the EES program.   For example, the left position of the Link button shown below can be controlled by EES variable LinkReturn.left.  If an array name is provided, the array index is moved to the end of the created variable names so that, for example, the left attribute for a button named Link[1] would be Link.left[1].


The Link button can be dragged to any location in the window while the toolbar is visible.   Finer positioning is available by pressing the left, right, up, or down arrow keys which move the button one pixel for each press. The width and height of the button can be changed by holding the Ctrl key down while pressing arrow keys.  The right arrow increases the button width. 



Six different types of links can be created: 


Link type 1:  Start an External Program

This link type allows any program, including a second copy of EES, to be started when the user clicks the link button in the Diagram window while in application-modeThe link button property only requires the name of the file that is to be opened when the application starts.   The name of the application is not required as that information is determined by EES from information in the Windows operating system registry.  As an example, the following link property will start a second copy of EES and load file TEST.EES in the C:\EES32 directory.  




EES can communicate with other programs using lookup files.  The $OpenLookup and $SaveLookup directives make this process convenient.  If the file is changed, it will be automatically reloaded.


Link type 2: Open EES File

This link type will close the existing EES file and open the EES file specified as the link button property.  EES will check to see that the current EES file is saved, and if not, ask for confirmation before closing the existing file.  If the EES file name provided in the link button dialog is *.EES, EES will display a standard Windows Operating system open file dialog so that the file can be conveniently selected.  The Open EES File option is useful when the results of one EES program provides data for use in the next EES program.  For example, information can be calculated and saved in a Lookup Table that is automatically loaded in the next EES program with the $OpenLookup directive.  Alternatively, a Link button (type 6) can placed on a Diagram window to open a specified Lookup file.


Link type 3: Open Distributable File

This link type is applicable only to distributable programs created with the Make Distributable Program command.  Distributable programs can include up to 100 EES files.  As with option 2, this link type allows one EES file to open another, but in the case of a distributable program the EES file must be one of the five included with the distributable program.  It is referred to by its number, 1 to 100.


Link type 4: Open Child Diagram Window

This link type is applicable if one or more child Diagram Windows have been created.  A list box showing the names of all child Diagram windows is provided.  Clicking the button will open the specified child Diagram Window, just as if the user had clicked the mouse within the hot area for the child Diagram window.  However, the button can be positioned anywhere in the window. 


Link type 5: Play Macro adapted with EES variables

This link type will play a predefined Macro file that has been stored with a .EMF filename extension.  The first parameter that must be supplied in the edit box is the macro filename, including the .EMF filename extension. All other parameters are optional.  


It is possible to provide information to the macro file that allows its capability to be programmed.  This is done by providing parameters after the macro file name separated with a space or comma.  These parameters can be EES variable names, numerical values, or strings.  EES will process the Macro file looking for the character sequence %%N where N is an integer value.  If this sequence is found, %%N is replaced with the Nth parameter.  For example, suppose the macrofile name doPropPlot.EMF has a line that contains


PropPlot %%1 PH 2 %%2 %%3 0 DoQLines


If the Play Macro link information is 


doPropPlot.EMF R$, Thigh, 0


EES will replace %%1 with the value of the EES string variable R$, %%2 with the value of EES variable Thigh, and %%3 with 0. The property plot will then be drawn.  Note that calculations must be completed to enable the button. 


Link type 6: Open a Lookup File

A Link button can be placed on the Diagram window that, when clicked, will display the familiar Open File dialog.  A user can then select a Lookup file having a filename extension of .LKT, .TXT, .CSV, or .DAT and that Lookup file will be opened.  After the selection has been made, an EES string variable having the same name as the caption of the Link button is created and its value is set to the name of the Lookup table that has been read in.  EES does not allow spaces in a variable name so any spaces in the caption are set to underscores.  Also, the maximum length of the variable is 29.  The last character of the EES variable name is set to $ to indicate that it is a string variable. As an example, if the caption of the Link button is "Open Lookup File", clicking the button will read the file, create variable Open_Lookup_File$ and set the value of this variable to the name of the Lookup table that was created.   If the Lookup table already exists, it will not be re-read.  


Clicking OK in the Link Properties dialog will create the link button. The button can be dragged to any location while the Diagram Window is in development mode.  Right-clicking on the link button while in development mode will bring up the Link Properties dialog so that link properties can be changed or the button can be deleted.   


While in development mode, the Link button can be dragged to any location on the window.  Finer positioning is available by pressing the left, right, up, or down arrow keys which move the button one pixel for each press. The width and height of the button can be changed by holding the Ctrl key down while pressing arrow keys.  The right arrow increases the button width by one pixel.  Left arrow decreases the width.  Down arrow increases the height and up arrow reduces the height.