HYSYS pipeline backdoor monikers
HYSYS pipeline backdoor monikers
(OP)
Anybody know of a complete list of backdoor variable moniker names for the pipeline unit in HYSYS?
I searched ther knowledge base and my comments to one of their proposed solutions seems to have initiated some action - but so far not list
So if somebody has compiled a list that the would like to share then i would be happy (im currently mostly trying to find the moniker for heat trasfer data: ambient medium=water, water velocity so if yu know that noe it will also do )
Best regards
Morten
I searched ther knowledge base and my comments to one of their proposed solutions seems to have initiated some action - but so far not list
So if somebody has compiled a list that the would like to share then i would be happy (im currently mostly trying to find the moniker for heat trasfer data: ambient medium=water, water velocity so if yu know that noe it will also do )
Best regards
Morten
RE: HYSYS pipeline backdoor monikers
Here is a blurb from the code that I use, based on some example from the Hysys KB:
CODE
' :SmallLength.550.#
'Where # is an integer starting from 0 and refers to the segment
'number within the pipe segment operation
'If the segment refered to isn't set up yet then the empty value -32767 is returned
'Other relevant Monikers:
'Outside Dia- :SmallLength.551.#
'Elevation Change- :Length.550.#
'Length- :Length.551.#
'Num Increments- :Index.551.#
Set hyBDvar = hyBD.BackDoorVariable(":PressureDrop.500").Variable
DisplayBdVar hyBDvar
Set hyBDvar = hyBD.BackDoorVariable(":HeatFlow.501.0").Variable
DisplayBdVar hyBDvar
Set hyBDvar = hyBD.BackDoorVariable(":HeatFlow.531").Variable
DisplayBdVar hyBDvar
Set hyBDvar = hyBD.BackDoorVariable(":Temperature.500").Variable
DisplayBdVar hyBDvar
Set hyBDvar = hyBD.BackDoorVariable(":HeatTranCoeff.500").Variable
DisplayBdVar hyBDvar
Set hyBDvar = hyBD.BackDoorVariable(":Selection.502").Variable
wksOps.Cells(myRow, myCol).Value = hyBDvar.Description
Select Case hyBDvar.Value
Case 0
wksOps.Cells(myRow, myCol + 2).Value = "Petukov"
Case 1
wksOps.Cells(myRow, myCol + 2).Value = "Dittus"
Case 2
wksOps.Cells(myRow, myCol + 2).Value = "Sieder"
Case 3
wksOps.Cells(myRow, myCol + 2).Value = "Profes"
Case 4
wksOps.Cells(myRow, myCol + 2).Value = "HTFS"
Case Else
wksOps.Cells(myRow, myCol + 2).Value = hyBDvar.GetValue("")
End Select
wksOps.Cells(myRow, myCol + 2).Interior.ColorIndex = ColorSpecified
wksOps.Cells(myRow, myCol + 2).Font.ColorIndex = FontColorSpecified
Set hyBDvar = hyBD.BackDoorVariable(":Selection.506").Variable
wksOps.Cells(myRow, myCol).Value = hyBDvar.Description
Select Case hyBDvar.Value
Case hyEmpty
wksOps.Cells(myRow, myCol + 2).Value = "No Insulation"
Case 0
wksOps.Cells(myRow, myCol + 2).Value = "User specified"
Case 1
wksOps.Cells(myRow, myCol + 2).Value = "Evacuated Annulus" '1
Case 2
wksOps.Cells(myRow, myCol + 2).Value = "Urethane Foam" '2
Case 3
wksOps.Cells(myRow, myCol + 2).Value = "Glass block" '3
Case 4
wksOps.Cells(myRow, myCol + 2).Value = "Fiberglass block" '4
Case 5
wksOps.Cells(myRow, myCol + 2).Value = "Fiber blanket" '5
Case 6
wksOps.Cells(myRow, myCol + 2).Value = "Fiber blanket - Vap barrier" '6
Case 7
wksOps.Cells(myRow, myCol + 2).Value = "Plastic block" '7
Case 8
wksOps.Cells(myRow, myCol + 2).Value = "Asphalt" '8
Case 9
wksOps.Cells(myRow, myCol + 2).Value = "Concrete" '9
Case 10
wksOps.Cells(myRow, myCol + 2).Value = "Concrete Insulated" '10
Case 11
wksOps.Cells(myRow, myCol + 2).Value = "Neoprene" '11
Case 12
wksOps.Cells(myRow, myCol + 2).Value = "PVC Foam" '12
Case 13
wksOps.Cells(myRow, myCol + 2).Value = "PVC block" '13
Case 14
wksOps.Cells(myRow, myCol + 2).Value = "Polystyrene foam" '14
Case Else
wksOps.Cells(myRow, myCol + 2).Value = hyBDvar.GetValue("")
End Select
wksOps.Cells(myRow, myCol + 2).Interior.ColorIndex = ColorSpecified
wksOps.Cells(myRow, myCol + 2).Font.ColorIndex = FontColorSpecified
Set hyBDvar = hyBD.BackDoorVariable(":ThermCond.500").Variable
DisplayBdVar hyBDvar
Set hyBDvar = hyBD.BackDoorVariable(":Length.508").Variable
DisplayBdVar hyBDvar
Set hyBDvar = hyBD.BackDoorVariable(":Selection.505").Variable
wksOps.Cells(myRow, myCol).Value = hyBDvar.Description
Select Case hyBDvar.Value
Case 0
wksOps.Cells(myRow, myCol + 2).Value = "Air"
Case 1
wksOps.Cells(myRow, myCol + 2).Value = "Water"
Case 2
wksOps.Cells(myRow, myCol + 2).Value = "Sand"
Case Else
wksOps.Cells(myRow, myCol + 2).Value = hyBDvar.GetValue("")
End Select
wksOps.Cells(myRow, myCol + 2).Interior.ColorIndex = ColorSpecified
wksOps.Cells(myRow, myCol + 2).Font.ColorIndex = FontColorSpecified
Set hyBDvar = hyBD.BackDoorVariable(":Selection.508").Variable
Select Case hyBDvar.Value
Case hyEmpty
wksOps.Cells(myRow, myCol + 2).Value = "None"
Case 0
wksOps.Cells(myRow, myCol + 2).Value = "User Specified"
Case 1
wksOps.Cells(myRow, myCol + 2).Value = "Dry Peat"
Case 2
wksOps.Cells(myRow, myCol + 2).Value = "Wet Peat"
Case 3
wksOps.Cells(myRow, myCol + 2).Value = "Icy Peat"
Case 4
wksOps.Cells(myRow, myCol + 2).Value = "Dry Sand"
Case 5
wksOps.Cells(myRow, myCol + 2).Value = "Moist Sand"
Case 6
wksOps.Cells(myRow, myCol + 2).Value = "Wet Sand"
Case 7
wksOps.Cells(myRow, myCol + 2).Value = "Dry Clay"
Case 8
wksOps.Cells(myRow, myCol + 2).Value = "Moist Clay"
Case 9
wksOps.Cells(myRow, myCol + 2).Value = "Wet Clay"
Case 10
wksOps.Cells(myRow, myCol + 2).Value = "Frozen Clay"
Case 11
wksOps.Cells(myRow, myCol + 2).Value = "Gravel"
Case 12
wksOps.Cells(myRow, myCol + 2).Value = "Sandy Gravel"
Case 13
wksOps.Cells(myRow, myCol + 2).Value = "Limestone"
Case 14
wksOps.Cells(myRow, myCol + 2).Value = "Sandstone"
Case 15
wksOps.Cells(myRow, myCol + 2).Value = "Ice"
Case 16
wksOps.Cells(myRow, myCol + 2).Value = "Cold Ice"
Case 17
wksOps.Cells(myRow, myCol + 2).Value = "Loose Snow"
Case 18
wksOps.Cells(myRow, myCol + 2).Value = "Hard Snow"
Case Else
wksOps.Cells(myRow, myCol + 2).Value = hyBDvar.GetValue("")
End Select
wksOps.Cells(myRow, myCol + 2).Interior.ColorIndex = ColorSpecified
wksOps.Cells(myRow, myCol + 2).Font.ColorIndex = FontColorSpecified
Set hyBDvar = hyBD.BackDoorVariable(":ThermCond.501").Variable
DisplayBdVar hyBDvar
Set hyBDvar = hyBD.BackDoorVariable(":Length.510").Variable
DisplayBdVar hyBDvar
'First get an array carrying the types of segment/fittings
FittingTypes = hyBD.BackDoorVariable("FittingType.500.[]:Name.0").Variable.Values
For j = 0 To UBound(FittingTypes)
wksOps.Cells(myRow, myCol).Value = j + 1
wksOps.Cells(myRow, myCol + 1).Value = FittingTypes(j)
'Do common stuff = Inner Dia only
Set hyBDvar = hyBD.BackDoorVariable(":SmallLength.550." & CStr(j)).Variable
DisplayBdVar hyBDvar
If FittingTypes(j) = "Pipe" Then
'Do all the pipe specific stuff
'Outer Dia - may sometimes be empty call a procedure to deal with this
Set hyBDvar = hyBD.BackDoorVariable(":SmallLength.551." & CStr(j)).Variable
DisplayBdVar hyBDvar
'Length
Set hyBDvar = hyBD.BackDoorVariable(":Length.551." & CStr(j)).Variable
DisplayBdVar hyBDvar
'Elevation Change
Set hyBDvar = hyBD.BackDoorVariable(":Length.550." & CStr(j)).Variable
DisplayBdVar hyBDvar
'Num Increments
Set hyBDvar = hyBD.BackDoorVariable(":Index.551." & CStr(j)).Variable
DisplayBdVar hyBDvar
'Roughness - the monikers used to access this changed for Hysys 2.4 (build 3868)
Set hyBDvar = hyBD.BackDoorVariable(":Length.552." & CStr(j)).Variable
DisplayBdVar hyBDvar
Else
'Do fitting specific stuff - K factor
'This moniker did not change for 2.4 so still need to open and close the view
hyBD.SendBackDoorMessage (":ViewSegment 1 " & CStr(j))
Set hyBDvar = hyBD.BackDoorVariable(":ExtraData.503").Variable
DisplayBdVar hyBDvar
Set hyBDvar = hyBD.BackDoorVariable(":ExtraData.507").Variable
DisplayBdVar hyBDvar
hyBD.SendBackDoorMessage (":CloseView")
':ExtraData.503 moniker retrieves the VH factor
':ExtraData.507 corresponds to the FT factor
End If
Next j
Cheers,
Joerd
Please see FAQ731-376 for tips on how to make the best use of Eng-Tips.
RE: HYSYS pipeline backdoor monikers
Thanks for the tips about using the script recorder!
Best regards
Morten