Hi everyone,
I am struggling to add Inlet stream to compressor using VBA.
So like Set Compressor.Property("InletStream") = "MyStream"
Does anyone know how to fix this?
Thank you in advance!
|
Posted 30 July 2024 - 02:37 AM
Hi everyone,
I am struggling to add Inlet stream to compressor using VBA.
So like Set Compressor.Property("InletStream") = "MyStream"
Does anyone know how to fix this?
Thank you in advance!
Posted 06 August 2024 - 03:14 AM
Hello!
I've managed to figure out so in case anyone needs the answer:
Dim Compressor As HYSYS.CompressOp
Set Compressor = hyCase.Flowsheet.Operations.Add("compressor_name", "compressor")
Set Compressor = hyCase.Flowsheet.Operations().Item("compressor_name")
Dim InletStream As HYSYS.ProcessStream
Set InletStream = hyCase.Flowsheet.MaterialStreams.Add("InletStream")
Set InletStream = hyCase.Flowsheet.MaterialStreams("InletStream")
Compressor.FeedStream = InletStream
ProductStream is Outlet Stream and Energy stream is energy stream
Edited by Matylda, 06 August 2024 - 03:14 AM.
Posted 14 August 2024 - 12:22 AM
What are you trying to accomplish? Are you trying to define streams on the fly?
Posted 21 August 2024 - 06:39 AM
I was creating a stream that later goes as an inlet to compressor
Posted 22 August 2024 - 02:30 AM
Is it not possible to add it via normal means at the flowsheet?
Why is there a need to use VBA to create a stream?
![]() Hysys Expander/compressor Input Using Dimensionless CurveStarted by Guest_Alfreedo_* , 21 Apr 2025 |
|
![]() |
||
Water Hammer Study: Hysys Dynamics Vs PipenetStarted by Guest_powerox29_* , 07 Apr 2025 |
|
![]() |
||
![]() Tank Inlet Diffuser LengthStarted by Guest_RAFAELDAVE_0752_* , 08 Apr 2025 |
|
![]() |
||
Inlet Line Not Free DrainingStarted by Guest_Asifdcet_* , 07 Apr 2025 |
|
![]() |
||
Need Help In Hysys For Production Of Vinyl AcetateStarted by Guest_christinalee12_* , 31 Mar 2025 |
|
![]() |