# WIN32OLERuntimeError -- Using ruby for Solidworks

**URL:** <https://www.ruby-forum.com/t/win32oleruntimeerror-using-ruby-for-solidworks/110553>\
**Category:** Ruby\
**Created:** [July 27, 2007, 1:37pm UTC](https://www.ruby-forum.com/t/win32oleruntimeerror-using-ruby-for-solidworks/110553 "2007-07-27T13:37:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![aaron](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/e19adc/32.png) [@aaron](https://www.ruby-forum.com/u/aaron)\
**Post date:** [July 27, 2007, 1:37pm UTC](https://www.ruby-forum.com/t/win32oleruntimeerror-using-ruby-for-solidworks/110553/1 "2007-07-27T13:37:44Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![aaron](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/e19adc/32.png) [@aaron](https://www.ruby-forum.com/u/aaron)\
**Post date:** [July 27, 2007, 1:48pm UTC](https://www.ruby-forum.com/t/win32oleruntimeerror-using-ruby-for-solidworks/110553/2 "2007-07-27T13:48:45Z")

</div>

On Jul 27, 7:34 pm, Aaron [removed\_email\_address@domain.invalid](mailto: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

---

<div class="post-metadata">

**Author:** ![aaron](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/e19adc/32.png) [@aaron](https://www.ruby-forum.com/u/aaron)\
**Post date:** [July 27, 2007, 2:00pm UTC](https://www.ruby-forum.com/t/win32oleruntimeerror-using-ruby-for-solidworks/110553/3 "2007-07-27T14:00:45Z")

</div>

On 7/27/07, Aaron [removed\_email\_address@domain.invalid](mailto: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

> **[Antimail](https://learn.microsoft.com/en-us/archive/blogs/adioltean/)**

or google for the error codes.

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

Jano
