Discussion Groups

Robot Structural Analysis

Reply
Active Contributor
guillaumeniel
Posts: 44
Registered: ‎12-07-2012
Accepted Solution

RSA API with Python

363 Views, 4 Replies
01-28-2013 04:58 AM

Hi,

Is it possible to use the RSA API with Python ?

 

Thanks

 

Guillaume

Please use plain text.
Product Support
Rafal.Gaweda
Posts: 5,164
Registered: ‎04-26-2010

Re: RSA API with Python

01-28-2013 05:45 AM in reply to: guillaumeniel

Most likely yes (Python supports COM as far as I can see from google).



Rafal Gaweda
Please use plain text.
Active Contributor
guillaumeniel
Posts: 44
Registered: ‎12-07-2012

Re: RSA API with Python

01-29-2013 08:36 AM in reply to: Rafal.Gaweda

I tried to import robotOM library with Python, but it looks like the library file as to be a .py file, not a .dll file. Does such a file already exist ? If not, how can I convert the Interop.RobotOM.dll file to a .py file ?

Please use plain text.
Product Support
Rafal.Gaweda
Posts: 5,164
Registered: ‎04-26-2010

Re: RSA API with Python

01-29-2013 08:39 AM in reply to: guillaumeniel

Sorry , I do not know.



Rafal Gaweda
Please use plain text.
Active Contributor
guillaumeniel
Posts: 44
Registered: ‎12-07-2012

Re: RSA API with Python

01-31-2013 01:57 PM in reply to: Rafal.Gaweda

I found the syntax to import and use the API with Python :

 

import clr
clr.AddReferenceToFileAndPath("C:\...\Interop.RobotOM.dll")
import RobotOM as rbt

 

Then you can call RSA classes as follow : 

Robot = rbt.RobotApplication

etc...

 

It may be usefull for Grasshopper users...

Please use plain text.