Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations KootK on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hysys - Excel link, BackDoorVariable

Status
Not open for further replies.

MortenMB

Mechanical
Apr 18, 2016
4
I am trying to access the Initial holdup composition of a separator in a dynamic simulation. Since it seems that it cannot be done with the VBA functions in Excel, I want to do it with the BackDoorVariable function.
The link to the composition is given by:
FlowSht.1/UnitOpObject.400(V-100)/SepStage.500!:MoleFraction.101.0'
How can I access the separation stage of the separator? My code is:
-------------------------------------------------------------------------------------------------------------------------
Dim hyBD As BackDoor
Dim hyOp As Separator
Dim hyFS As Flowsheet

Set hyFS = Hycase.Flowsheet
Set hyOp = hyFS.Operations.Item("V-100")
Set hyBD = hyOp

Set hyBDvar = hyBD.BackDoorVariable("MoleFraction.101.0").Variable
---------------------------------------------------------------------------------------------------------------------------
It returns -32767, which is the empty value…The composition contains values, so it should return the composition value.
I think the error is in the: Set hyOp = hyFS.Operations(oc_Vessels).Item("V-100") , because it doesn’t have the “SepStage” part…Is there any way to include this?
 
Replies continue below

Recommended for you

Hi,

Welcome to Eng-Tips.

You might get better results in forum142.

Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
 
Ok, great! I'll try there! =D
Thank you!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor