how can i get binary interaction data of NRTL-1 (MEA H2O) AIJ value at matlab

4 次查看(过去 30 天)
clc
clear
Aspen = actxserver('Apwn.Document.37.0');
Aspen.invoke('InitFromArchive2', 'C:\Users\ASPENPC\Desktop\a7777\77777.apw')
Aspen.visible = 1;
data = Aspen.Application.Tree.FindNode("\Data\Properties\Parameters\Binary Interaction\NRTL-1\Input\VAL1\NRTL\MEA H2O").value
% i can't get aspen data only this nodepath

回答(1 个)

neha agarwal
neha agarwal 2023-10-19
I want to connect aspen properties with MATLAB. like this:
AspenProperties.Application.Tree.FindNode("\Data\Properties\Analysis\BINRY-1\Output\Prop Data\PROPTAB\VAPOR MOLEFRAC BENZENE 2").value
But its showing an error: Dot indexing is not supported for variables of this type.
Please help me out
  5 个评论
neha agarwal
neha agarwal 2023-10-23
the output is as follows:
found tree as far as "\Data\Properties\Analysis\BINRY-1\Output\Prop Data\PROPTAB\VAPOR MOLEFRAC BENZENE 2" but no further
methods available for further exporation:
Methods for class Interface.8E567522_F9BA_11CF_90B2_0000C0A810C4:
AddClassAttribute DeleteClassAttribute NextIncomplete ValueForUnit release
AttributeType Export PrintUseful addproperty saveobj
AttributeValue FindNode Reconcile delete set
BrowseNext HasAttribute RemoveAll deleteproperty
ClassAttributeType HasClassAttribute RenameChild events
ClassAttributeValue Hide Reveal get
Clear NewChild SetValueAndUnit invoke
Delete NewID SetValueUnitAndBasis loadobj
Walter Roberson
Walter Roberson 2023-11-20
I had a slight mistake in the output. The proper output would have reported
found tree as far as "\Data\Properties\Analysis\BINRY-1\Output\Prop Data\PROPTAB\" but no further
parts = string({'Data' 'Properties' 'Analysis' 'BINRY-1' 'Output' 'Prop Data' 'PROPTAB' 'VAPOR MOLEFRAC BENZENE 2'});
oldcurrent = '\';
found_something = false;
ended_early = false;
for idx = 1 : length(parts)
thistree = "\" + strjoin(parts(1:idx), "\");
currentnode = AspenProperties.Application.Tree.FindNode(thistree);
if isempty(currentnode); ended_early = true; break; end
found_something = true;
oldcurrent = currentnode;
end
if found_something
if ended_early
fprintf('found tree as far as "%s" but no further\n', oldcurrent);
else
fprintf('found the complete tree "%s"\n', thistree);
end
fprintf('methods available for further exporation:\n');
methods(oldcurrent)
else
fprintf('did not find any node at all, not even "%s"\n', thistree);
end

请先登录,再进行评论。

标签

产品


版本

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by