Error using Interface.​Vissim_Obj​ect_Librar​y_8.0_64_B​it.ILinkCo​ntainer/Ge​tMultipleA​ttributes Invoke Error, Dispatch Exception

2 次查看(过去 30 天)
I have a problem with Matlab COM interface. I have a problem regarding GetMultipleAttributes I was using it successfully but today I have an error as you can see below:
Attributes1={'No';'VehType';'Speed';'SpeedDiff';'Acceleration';...
'Hdwy';'Pos';'Lane';'Lane\Link\No';'CoordFront';'PS';'PL';...
'LeadTargNo';'Length'}; % add more if needed
allVehAttributes = vissim.Net.Vehicles.GetMultipleAttributes(Attributes1);
Error using Interface.Vissim_Object_Library_8.0_64_Bit.ILinkContainer/GetMultipleAttributes
Invoke Error, Dispatch Exception:
Source: VISSIM.Vissim.800
Description: CComBaseContainer::GetMultipleAttributes failed
I couldn’t find a solution. I updated all windows update. And check my vissim files, yet can’t figure out what is wrong. I appreciate any help you can provide.

回答(1 个)

pratik gautam
pratik gautam 2020-7-23
aa=vis.Net.DrivingBehaviors.GetMultiAttValues("No");
a1=size(aa);
a2=aa(:,2);
a3=cell2mat(a2);
for i=1:a1(1)
if(a3(i)==106)
vis.Net.DrivingBehaviors.ItemByKey(106).AttValue('Name')
a4="false";
else
a4="true";
end
end
if (a4=="true")
aa = "Driving behaviour not found, plese try again"
end
i did this to check the Driving behaviour, hope it might help someone :)

类别

Help CenterFile Exchange 中查找有关 Getting Started with Microsoft .NET 的更多信息

标签

尚未输入任何标签。

Community Treasure Hunt

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

Start Hunting!

Translated by