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 visualizzazioni (ultimi 30 giorni)
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

Risposte (1)

Suraj
Suraj il 8 Lug 2024
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.

Categorie

Scopri di più su Mathematics in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by