Simple Copy/Move Points in Python

script
ghpython
python
unhandled

#1

I’m just familiarizing myself with the Python APIs for Rhino (using grasshopper mostly) and don’t quite understand why the following script doesn’t work as expected:

import rhinoscriptsyntax as rs


passPoint = point
for i in range(10):
    
    # Get Coordinates From Last Point
    theCoords = rs.PointCoordinates(passPoint)
    
    # Make New Point
    passPoint = rs.CreatePoint(theCoords[0], theCoords[1], theCoords[2] + z)

point is grasshopper Point component passed into the script, along with z which is an integer.

The purpose of this script is to get a point and created 10 copies space units in height.

The above throws the following exception:
Runtime error (TypeErrorException): Parameter must be a Guid or string representing a Guid