
2-54 Key HYSYS Objects
2-54
2.4.8 PFD Objects
PFD objects are used for the manipulation and automation of
PFDItems. A PFDItem is any item that is found on the HYSYS
PFD, such as a unit op or a stream. You can use PFD objects to
Move, Size, Mirror, Rotate, Hide, etc. any PFDItem. PFD objects
also allow you to import and display a selection of PFDItems in
to Visio, a CAD application or Excel (what items you get depends
on what parameters you specify). In addition to manipulating
the PFD you can use the PFDConnection object for such things
as finding the “stream line” route between two PFDItems.
Example: Nozzle Type
If nozzle.NozzleType = pfdInletFromMaterialStream Or
nozzle.NozzleType = pfdOutletToMaterialStream Or nozzle.NozzleType =
pfdInletFromStream Or nozzle.NozzleType = pfdOutletToStream Then
newLine.Line.ForeColor.RGB = RGB(0, 0, 128)
newShape.Fill.ForeColor.RGB = RGB(128, 128, 128)
ElseIf nozzle.NozzleType = pfdInletFromEnergyStream Or
nozzle.NozzleType = pfdOutletToEnergyStream Then
newLine.Line.ForeColor.RGB = RGB(128, 0, 0)
newShape.Fill.ForeColor.RGB = RGB(128, 128, 128)
ElseIf nozzle.NozzleType = pfdMaterialStreamInlet Or
nozzle.NozzleType = pfdMaterialStreamOutlet Then
newLine.Line.ForeColor.RGB = RGB(0, 0, 128)
newShape.Fill.ForeColor.RGB = RGB(0, 0, 128)
newShape.Line.ForeColor.RGB = RGB(0, 0, 128)
ElseIf nozzle.NozzleType = pfdEnergyStreamInlet Or nozzle.NozzleType
= pfdEnergyStreamOutlet Then
newLine.Line.ForeColor.RGB = RGB(128, 0, 0)
newShape.Fill.ForeColor.RGB = RGB(128, 0, 0)
newShape.Line.ForeColor.RGB = RGB(128, 0, 0)
Else
newLine.Line.ForeColor.RGB = RGB(0, 255, 0)
End If
Comentários a estes Manuais