Hysys Column Stage Error
Mostrar comentarios más antiguos
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.
Respuestas (1)
Angelo Yeo
el 30 de Nov. de 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 comentarios
지원 구
el 30 de Nov. de 2023
Angelo Yeo
el 30 de Nov. de 2023
Do you get the same error message? It would be good if you can provide reproducible steps and error messages.
Categorías
Más información sobre Time-Domain Analysis en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!