I would like to further improve upon my HYSYS skills by learning how to create functioning "user variables" and "Excel/ HYSYS VBA automation".
I have had reasonable success so far but my main problem is that I am wasting excessive amounts of time using 'trial and error' to learn the correct syntax to reference specific properties in HYSYS.
Infact I have just hit a wall. I am trying to access a straightforward stream property "actual volume flow - liquid". Using object explorer I can find "actualliqflow" tag, however it always gives a "empty value" ie. -62737.
Does anyone have some pointers to where I can find information or examples on accessing various property values in HYSYS, so I don't feel like I am searching in the dark? Furthermore if you could assist me in getting "actual liquid volume flow" that would be great.
Nicholas
Sub PostExecute()
On Error GoTo ErrorHandler
Dim mystream As ProcessStream
ActiveVariableWrapper.Variable.Erase
Set mystream = ActiveObject
LiquidActualVolume = mystream.ActualLiqFlow
MsgBox LiquidActualVolume
ActiveVariableWrapper.Variable.SetValue(LiquidActualVolume)
Exit Sub
ErrorHandler:
MsgBox "error"
Exit Sub
End Sub
Edited by ChurchMouth, 03 January 2013 - 01:11 AM.