Specifications

A-22 Extensibility FAQ
A-22
j. Add the following to the global declarations section:
k. Add the following to the Execute function:
12. How do I add a Component Matrix (a matrix with Component
names along the row and column headers in to the body of
which numbers can be entered)?
Ans: Use the following procedure:
a. Open the HYSYS Extension View Editor with the extension
definition file (EDF) to be modified.
b. Go to the Views Manager property view and press the
Object Manager icon beside the Selected Objects drop-
down list.
c. In the Variables of Selected Object matrix, enter the
following in the Tag, Name and Type columns.
ComponentNames is the Text object used to put the
component names in the matrix row and column header.
MatrixData is the Real Number object used to hold the
matrix data.
Dim hyComponentNames As InternalTextFlexVariable
Dim ComponentNames As Object
' Reference the variables ComponentNames variable In the EDF
Set hyComponentNames = hyContainer.FindVariable("ComponentNames").Variable
' Make an Object reference To the ComponentNames collection Object
Set ComponentNames = hyContainer.Flowsheet.FluidPackage.Components
' Set the size of the hyComponentNames vector using the SetBounds method
hyComponentNames.SetBounds ComponentNames.Count, 0, 0
' Set the values of hyComponentNames equal To the ComponentNames() vector
hyComponentNames.Values = ComponentNames.Names
Objects Manager icon
Tag Name Type
Persistent
Triggers
Solve
N
Dimensions
Numeric
Type
ComponentNames ComponentNames Text Checked Cleared Vector N/A
MatrixData MatrixData Real Checked Selected Matrix Index
Tag Name which is used to access the object from Visual
Basic.
Name Alternate name used in the Extension View Editor
(used to be more descriptive).