How to link MATLAB to Aspen Adsorption? But i have Aspen Adsorption linking with Excel VBA code is here, if you have any matlab code please share ..

4 ビュー (過去 30 日間)
Ankit
Ankit 2024 年 6 月 27 日
回答済み: Suraj 2024 年 7 月 8 日
Sub aspenaAdorption()
' Declare variables for the ACM application, document, and simulation
Dim ACMApp As Object
Dim ACMDocument As Object
Dim ACMSimulation As Object
' Create an instance of the ACM application
Set ACMApp = CreateObject("ACM Application")
' Use "ACM Application" for Aspen Custom Modeler
' Use "ADS Application" for Aspen Adsorption
' Make the ACM application visible
ACMApp.Visible = True
' Open the specified simulation document
Set ACMDocument = ACMApp.OpenDocument("C:\Users\user\Desktop\H2_Purification.acmf")
' Set the simulation object to the current simulation in the application
Set ACMSimulation = ACMApp.Simulation
' Set the simulation to run in dynamic mode
ACMSimulation.RunMode = "Dynamic"
' Run the simulation
ACMSimulation.Run (True)
' Check if the simulation was successful and display a message box
If ACMSimulation.Successful Then
MsgBox "Simulation Complete"
Else
MsgBox "Simulation Failed"
End If
' Quit the ACM application
ACMApp.Quit
End Sub

回答 (1 件)

Suraj
Suraj 2024 年 7 月 8 日
Hi Ankit,
I understand that you would like to link MATLAB to Aspen Adsorption. It looks like you've shared the VBA code to link Aspen Adsorption with Excel. This code would not be useful to link MATLAB.
I found the following post on the MATLAB Answer forum which addresses a similar query,
Please have a look.

カテゴリ

Help Center および File ExchangeMathematics についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by