Eclipse + Pydev for Rhinoscripting


I’m following Steve’s tutorial trying to set up Eclipse + Pydev for scripting:

But I’m running into some prtoblems.

I’m trying to run the following code:
Created on Feb 3, 2015

@author: Yaniv Corem
import rhinoscriptsyntax as rs

def main():
curve_id = rs.GetObject(“Select a curve to sample”, 4, True, True)
if not curve_id: return

t = 0
while t<=1.0:

def addpointat_r1_parameter(curve_id, parameter):
domain = rs.CurveDomain(curve_id)
r1_param = domain[0] + parameter*(domain[1]-domain[0])
r3point = rs.EvaluateCurve(curve_id, r1_param)
if r3point:
point_id = rs.AddPoint(r3point)
rs.ObjectColor(point_id, parametercolor(parameter))

def parametercolor(parameter):
red = 255 * parameter
if red<0: red=0
if red>255: red=255
return (red,0,255-red)

if name==“main”:

I’ve got Rhino (32-bit) open, and I’m getting the following error:
AttributeError: ‘LightException’ object has no attribute ‘Host’

Any idea what I’m doing wrong?

Hi Yaniv,

Pydev is not officially supported and people have had varying levels of success as you can see by searching this forum for “pydev”.

I just tried setting up pydev remote debugging following this workflow:

and I was able to step into your script.