Hysys Column Stage Error
22 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello. I try to optimize the columns in Aspen Hysys via Matlab.
And I have a problem to access the column stage control.
aspen = actxserver('Hysys.Application.V12.1');
FileNamePath = 'Aspen Name';
simcase = aspen.SimulationCases.Open([cd, strcat('\', FileNamePath, '.hsc')]);
Oper = simcase.Flowsheet.Operation;
Oper.Item('T-100').Columnflowsheet.Operation.Item("Main_TS")
When I do this, there is an error.
Error using Interface.~~~~~/Item
Invoke Error, Dispatch Exception: Not spefied error.
Anyone know, how to access the stages of side inlet flows in columns??
Thank you.
0 Kommentare
Antworten (1)
Angelo Yeo
am 30 Nov. 2023
It looks like the error is related to "invoke". Would you invoke simulation cases and see if you can proceed?
aspen = actxserver('Hysys.Application.V12.1');
FileNamePath = 'Aspen Name';
simcase = aspen.SimulationCases.Open([cd, strcat('\', FileNamePath, '.hsc')]);
simcase.invoke('Activate'); % Add this
Oper = simcase.Flowsheet.Operation;
Oper.Item('T-100').Columnflowsheet.Operation.Item("Main_TS")
Also, you can find a good example of how to manipulate Hysys via COM server in the link below.
3 Kommentare
Angelo Yeo
am 30 Nov. 2023
Do you get the same error message? It would be good if you can provide reproducible steps and error messages.
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!