
Customization FAQ A-7
A-7
9. How do I determine if an object reference actually points to
an object?
Ans: When an object reference is made, the reference may
point to an object which does not exist. For example, when
using the HYSYS Macro Language Editor, the ActiveCase
object is an object reference to the currently open case. If
no case is currently open, then the ActiveCase reference
points to nothing. Use the Is keyword to compare the object
reference to Nothing. The following code demonstrates this:
10. How does HYSYS represent empty or null values internally?
Ans: HYSYS uses the integer -32767 to represent empty or
null values. Empty values are shown as <empty> in HYSYS.
For example, if Automation is used to access the
temperature of a process stream on which a temperature
has not been specified, a value of -32767 is returned.
11. How do I use HYSYS Macro Language (WWB) files?
Ans: In the HYSYS desktop, select Macro Language Editor
command from the Tools menu. The HYSYS Macro
Language Editor property view appears. Right-click
anywhere on the Macro Language Editor property view, and
select File | Open command from the Object Inspect menu.
In the Open property view, select the HYSYS Macro
Language (*.WWB) file to open.
12. How do I access column specification values?
Ans: The column unit operation is special in that it has its
own flowsheet. The flowsheet is where most information
about the column is stored, so it must be used as the access
the column specifications. Access the column flowsheet as
shown below (hyCase is an object reference to the
simulation case, and A-100 is the column name):
Set hyCase = ActiveCase
If hyCase Is Nothing Then
MsgBox "No HYSYS Case Is Open."
End If
Set hyCol = hyCase.Flowsheet.Operations.Item("A-100").ColumnFlowsheet
Comentários a estes Manuais