Forum: Ruby WIN32OLERuntimeError -- Using ruby for Solidworks

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Aaron (Guest)
on 2007-07-27 15:37
(Received via mailing list)
I want to use Ruby to manipulate the famous 3D software Solidworks
though win32ole.
I just did this in the irb:
  >require 'win32ole'
=>true
  >sw = WIN32OLE.new('SldWorks.Application')

Then I found the Solidworks' process running in the backgroung though
the Process Manager.
Then ,after long time waiting, it results in this error:
WIN32OLERuntimeError:failed to create WIN32OLE object from
'SldWorks.Application'
HRESULT error code:0x80080005

I realy want to know why.

Thank you for your time
Aaron (Guest)
on 2007-07-27 15:48
(Received via mailing list)
On Jul 27, 7:34 pm, Aaron <removed_email_address@domain.invalid> wrote:
> WIN32OLERuntimeError:failed to create WIN32OLE object from
> 'SldWorks.Application'
> HRESULT error code:0x80080005
>
> I realy want to know why.
>
> Thank you for your time


I do some testing like this:
first I started the SolidWorks ,seeing the Solidworks' process running
in the backgroung though the Process Manager.

then in the irb :
 >require 'win32ole'
=>true
 >sw = WIN32OLE.connect('SldWorks.Application')
The error:
WIN32OLERuntimeError:OLE server 'SldWorks.Application' not running
HRESULT error code:0x800401e3
Jano S. (Guest)
on 2007-07-27 16:00
(Received via mailing list)
On 7/27/07, Aaron <removed_email_address@domain.invalid> wrote:
> > Then ,after long time waiting, it results in this error:
> first I started the SolidWorks ,seeing the Solidworks' process running
> in the backgroung though the Process Manager.
>
> then in the irb :
>  >require 'win32ole'
> =>true
>  >sw = WIN32OLE.connect('SldWorks.Application')
> The error:
> WIN32OLERuntimeError:OLE server 'SldWorks.Application' not running
> HRESULT error code:0x800401e3

Have a look at
http://blogs.msdn.com/adioltean/archive/2005/06/24...
or google for the error codes.

Try using it from VBA/vbs/any other language to see if it works at all.

Jano
This topic is locked and can not be replied to.