Manuel Reimer
2011-03-03 09:55:04 UTC
Hello,
we use Perl and the Win32::OLE module to do some automatic drawing
modifications with AutoCAD. Several scripts have been created and they
work well with AutoCAD up to 2009.
Starting with AutoCAD 2010 it unfortunately gets nearly impossible to
get a stable communication between Perl and AutoCAD with Win32::OLE. I
get errors like the following one:
| Win32::OLE(0.1709) error 0x8001010a: "Durch den Messagefilter wurde
| angezeigt, dass die Anwendung ausgelastet ist"
| in METHOD/PROPERTYGET "" at C:\bin\test.pl line 20
Searching the net revealed, that such errors also occur with Excel,
sometimes, but no solution.
I tried several things like catching the error from Perl to retry the
call and even tried to implement some retry code in the OLE.xs file
until I found the following from Autodesk:
<http://through-the-interface.typepad.com/through_the_interface/2010/02/handling-com-calls-rejected-by-autocad-from-an-external-net-application.html>
This C# and so I tried to port this over to C++ to be able to add this
to the OLE.xs file. I've attached the patch file with my proof of
concept code.
As you see in my patch, I commented out the code, initializing OLE in
multi threading mode, to make the CoRegisterMessageFilter call succeed.
Problem with this patch: It doesn't work. Anything, it does, is crashing
the Perl interpreter... :-(
Is someone here able to have a look at this and perhaps fix this code?
Thank you very much in advance.
Mit freundlichen Grüßen / Best regards
Manuel Reimer
Bosch Rexroth. The Drive & Control Company
Tel. 09352/18-1578
***@boschrexroth.de
www.boschrexroth.com
Bosch Rexroth AG
Maria-Theresien-Straße 23
97816 Lohr am Main
GERMANY
Firmensitz: Stuttgart, Registrierung: Amtsgericht Stuttgart HRB 23192
Vorstand: Dr. Karl Tragl (Vorsitzender), Dr. Georg Hanen; Reiner
Leipold-Büttner; Dr. Stefan Spindler
Vorsitzender des Aufsichtsrats: Dr. Siegfried Dais
we use Perl and the Win32::OLE module to do some automatic drawing
modifications with AutoCAD. Several scripts have been created and they
work well with AutoCAD up to 2009.
Starting with AutoCAD 2010 it unfortunately gets nearly impossible to
get a stable communication between Perl and AutoCAD with Win32::OLE. I
get errors like the following one:
| Win32::OLE(0.1709) error 0x8001010a: "Durch den Messagefilter wurde
| angezeigt, dass die Anwendung ausgelastet ist"
| in METHOD/PROPERTYGET "" at C:\bin\test.pl line 20
Searching the net revealed, that such errors also occur with Excel,
sometimes, but no solution.
I tried several things like catching the error from Perl to retry the
call and even tried to implement some retry code in the OLE.xs file
until I found the following from Autodesk:
<http://through-the-interface.typepad.com/through_the_interface/2010/02/handling-com-calls-rejected-by-autocad-from-an-external-net-application.html>
This C# and so I tried to port this over to C++ to be able to add this
to the OLE.xs file. I've attached the patch file with my proof of
concept code.
As you see in my patch, I commented out the code, initializing OLE in
multi threading mode, to make the CoRegisterMessageFilter call succeed.
Problem with this patch: It doesn't work. Anything, it does, is crashing
the Perl interpreter... :-(
Is someone here able to have a look at this and perhaps fix this code?
Thank you very much in advance.
Mit freundlichen Grüßen / Best regards
Manuel Reimer
Bosch Rexroth. The Drive & Control Company
Tel. 09352/18-1578
***@boschrexroth.de
www.boschrexroth.com
Bosch Rexroth AG
Maria-Theresien-Straße 23
97816 Lohr am Main
GERMANY
Firmensitz: Stuttgart, Registrierung: Amtsgericht Stuttgart HRB 23192
Vorstand: Dr. Karl Tragl (Vorsitzender), Dr. Georg Hanen; Reiner
Leipold-Büttner; Dr. Stefan Spindler
Vorsitzender des Aufsichtsrats: Dr. Siegfried Dais