Grasshopper

algorithmic modeling for Rhino

Runtime error: Unable to add point to document (Getting Python Exception)

I am attempting to add a Point Geometry Object to my Rhino document using the rhinoscriptsyntax command 'rs.AddPoint()', where the inputs are three float numbers. However, I am getting the following runtime error:

Runtime error (PythonException): unable to add point to document Traceback: line 97, in AddPoint, "C:\Users\AKIDRIBM\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rhinoscript\geometry.py" line 136, in Point, "" line 47, in toGH, "" line 187, in RunScript, ""

Could anyone help me figure out what's causing it? The code for adding the point is below:

# Plots points/text dots
def Point(self, pointSource):
   print pointSource, type(pointSource)
   pt = rs.AddPoint(float(pointSource.value.x.value), float(pointSource.value.y.value),       float(pointSource.value.z.value))
   return pt

pointSource is a custom object that stores information about the point. Its only relevance here is to obtain the point coordinates. I do not get this error all the time, so I'm having trouble figuring out what is exactly causing it.

Views: 1022

Replies to This Discussion

I just encountered the same error message. It appears quite erratically when I try to create a circle with a python script.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service