Contents - Index


$DiagramUpdate On / Off

 

The $DiagramUpdate directive is useful for some large EES programs that contain a Diagram window.  When controls in the Diagram window, such as dropdown lists, radio buttons, check boxes, and sliders, are changed, the Diagram  window may recompile the equations in the Equations window depending on whether the Execute EES commands .. check box is checked for these controls.  Large programs with many equations and directives may require signficant time to recompile, which can cause an unacceptable delay in the response to the change made in the Diagram window.  This situation can be remedied with $DiagramUpdate directives.

 

$DiagramUpdate Off and On directives can be placed around Functions, Procedures, Modules, and/or Subprograms in the Equations window that do not need to be recompiled during the Diagram window updating process.  $DiagramUpdate Off will cause all following equations to be ignored until a $DiagramUpdate On directive is found.  The use of the $DiagramUpdate directives is illustrated in the following code fragment.  

 

$DiagramUpdate Off

{not necessary to recompile these routines when changes are made in the Diagram window}

Function myfunction(X,Y)

  ...

  ...

  myfunction=...

End

 

Procedure myprocedure(X,Y:a,b)

   ...

   ...

   a:=...

   b:=;;;

End

$DiagramUpdate On

 

{Start Main Program}

...

 

 

Note that the $DiagramUpdate directive should not normally be placed in the Main program as this will likely generate compiliation errors.  Also a $DiagramUpdate Off must be provided after a $DiagramUpdate On directive or an error will occur.

 

The $DiagramUpdate directives are ignored if there is no Diagram window or if the Diagram window not being changed.

 

Directives