Invoke Error, Dispatch Exception: Exception Error Occurred
47 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Peeyush
el 26 de Abr. de 2012
Comentada: supriya Naik
el 10 de Mayo de 2022
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 comentarios
Respuesta aceptada
Walter Roberson
el 26 de Abr. de 2012
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()
Más respuestas (1)
Peeyush
el 26 de Abr. de 2012
2 comentarios
Guy Reading
el 12 de Jun. de 2019
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
el 10 de Mayo de 2022
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?
Ver también
Categorías
Más información sobre Use COM Objects in MATLAB en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!