
Customization FAQ A-19
A-19
f. Add an Enumeration widget. Double-click on the Target
Moniker field or click the Ellipsis icon beside it and
select the enumeration tag created in the Objects
Manager. The number of entries in the drop-down list, the
order in which they appear, and how they are matched
can also be set here.
g. Save the *.edf file.
h. In the extension code, use the value of the enumeration
as appropriate:
10. How do I force the simulation to solve?
Ans: Add a new sub-procedure named VariableChanged to
the unit operation extension class module. This procedure is
called whenever a variable in the extension is changed. An
InternalVariableWrapper object is passed to it as an
argument. This object is used to identify the name of the
variable and take an appropriate action, such as triggering a
solve. For example,
If the Tag property of the VarableName object is equal to
NAME then the hyContainer object uses the TriggerSolve
method to triggers a solve. NAME is the name of the
enumeration widget (or any other widget) in the EDF file.
Code Description
Dim hyList as Object
Dimension hyList as an
object in the declaration
section.
Set hyList = hyContainer.FindVariable("List").Variable
Use hyList to set a reference
to the Status object in the
extension definition file
(EDF).
Public Sub VariableChanged(ByVal VariableName As InternalVariableWrapper)
If VariableName.Tag = "Name" Then hyContainer.TriggerSolver
End Sub
Comentários a estes Manuais