Specifications

A-16 Extensibility FAQ
A-16
h. In the extension code, use the value of the enumeration
as appropriate:
IsRecalling is only false when the extension is first added to
the simulation, so that is when the default value of hyRef is
set to 0, which corresponds to a Radio Button value.
8. How do I add status text and status colour?
Ans: Use the following procedure:
a. Go to the Views Manager property view and click the
Objects Manager icon beside the Selected Objects
drop-down list.
b. In the Variables of Selected Object matrix, type the Tag
name in the Tag column, enter the name in the Name
column, and select Real Number in the Type column. For
example,
Make sure the Persistent checkbox is selected, the None
option is selected in the N Dimensions drop-down list, and
that Index option is selected in the Numeric Type drop-
down list.
c. Close the Object Manager property view and open the
form by double-clicking on it in the Existing Views list.
d. Add Static Text objects of the exact same size in the
exact same place on the bottom of the form (this can be
easily accomplished using the Position and Size matrix).
Give them appropriate Names (such as OK and Error),
Background Colours (yellow for informative text, green
for converging and converged and red for errors) and
Code Description
Dim hyRef as Object
Dimension hyRef as an
object in the declaration
section.
Set hyRef = hyContainer.FindVariable("Ref").Variable
Use hyRef to set a reference
to the Status object in the
extension definition file
(EDF).
Set hyRef = hyContainer.FindVariable("Ref").Variable
If IsRecalling = False Then
hyRef.Value = 0
The Initialization function
in the extension code is
used to set the default value
for the Radio Buttons.
Tag Name Type
Status Status Real Number
Objects Manager icon