Invoke Error, Dispatch Exception: Exception Error Occurred
52 次查看(过去 30 天)
显示 更早的评论
Hi,
After creating a .COM object for SAP2000 from MATLAB I run a for loop with one API command. The loop looks something like this:
for i = 1:333
[a b c] = SAPObject.SAPModel.APIcommand(input arugments);
end
I am trying to run this code when this occurs:
"Interface.a string of numbers and letters/API command"
"Invoke Error, Dispatch Exception: Exception Error Occurred"
What's surprising if I run the for loop for any one number, say "i = 1" or "i = 4", and it runs successfully but when I try to loop through a range of numbers, it generates error.
Thanks in advance for your help.
0 个评论
采纳的回答
Walter Roberson
2012-4-26
This isn't necessarily a MATLAB issue: COM interfaces can be sensitive to 32 vs 64 bit.
You can write your code to detect 32 vs 64 bit: http://www.mathworks.com/support/solutions/en/data/1-2HBX9L/index.html?solution=1-2HBX9L . With all the currently supported versions, if computer() or mexext() end in '64' then you have a 64 bit version and otherwise you have a 32 bit version. You can use this information to set typename strings for use with ones() or zeros() or cast() or NaN() or inf()
更多回答(1 个)
Peeyush
2012-4-26
2 个评论
Guy Reading
2019-6-12
I realise this was asked a long time ago, but just in case others are looking for help here, I believe the problem may be in where you're registering your .com object.
There's a folder for 64 bit objects and another folder for 32 bit. This is in the (Windows) OS architecture, nothing to do with MATLAB, but you'll need to register the .com object in the right folder.
For 32 bit, it's C:\Windows\SysWOW64.
For 64 bit, it's C:\Windows\System32
This may help, I'd also invite you to research this independently as I'm not an expert with this, but it helped me a few times in the past.
supriya Naik
2022-5-10
Error using Interface.4E4ADE7E_0FB6_430F_9D1B_1A66C6A69953/GetPropertyValue
Error: Object returned error code: 0x80070202
Can you explain what is the meaning of this error, during ansys matlab interfacing?
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Parallel Computing Fundamentals 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!