algorithmic modeling for Rhino
Hello Everyone,
I am trying to create a spotlight using python and rhinoscriptsyntax. The first two inputs are as point3d item acces, and the slider is a float item access. I get the following error
1. Solution exception:'GrasshopperDocument' object has no attribute 'Lights'
and in the compiler:
Runtime error (MissingMemberException): 'GrasshopperDocument' object has no attribute 'Lights'
Traceback:
line 138, in AddSpotLight, "C:\Users\Gabriella\AppData\Roaming\McNeel\Rhinoceros\5.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rhinoscript\light.py"
line 3, in script
any help is appreciated :)
Gabriella
Tags:
Ok if anyone is interested, the correct code is the following:
import rhinoscriptsyntax as rs
import scriptcontext as sc
import Rhino
sc.doc = Rhino.RhinoDoc.ActiveDoc
a = rs.AddSpotLight(base,radius,apex)
kudos to tang li qun for the inspiration (from here http://www.grasshopper3d.com/forum/topics/lights-in-grasshopper)
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by