Extend Ironpython with a .NET plug-in

Hi all

I found this page on the rhino wiki a while ago:
Extend RhinoScript with a .NET plug-in

To call the new method there is an example for vbs:

Dim customobj
On Error Resume Next
Set customobj = Rhino.GetPlugInObject("WikiSamples")
If Err Then
  MsgBox Err.Description
  customobj.MakePoint 1,2,3
End If

What would be the equivalent approach to access the new method in rhino python? Thanks!


Hi Manuel,

What do you want to extend Python with? Python scripts have full access to the .NET Framework and RhinoCommon - I can’t imagine what you need that this does not provide…

Thanks Dale

You are right but in my case I would like to provide accessibility to some functions I already implemented in my c# plug-in. Basically to provide access to some features of my plug-in for more experienced users to automate a certain user-defined workflow. It works for rhinoscript-users so I am just interested if this can be accessed through python as well. I think I even saw this once but I cannot find the source anymore.


Here’s a sample using Grasshopper as the plug-in

import Rhino

gh = Rhino.RhinoApp.GetPlugInObject("Grasshopper")
functions = dir(gh)
for function in functions:
    #skip internal names
    if function.startswith("__"): continue
    print function
#Call a function in the plug-in

Thanks Steve!