Hi all.
I’m very new to scripting in Grasshopper, and am hoping someone could give me a quick solution to why this isn’t working. I have a list of points, and am trying to write a python script to select the point with the highest Z value. I’ve added the script in the uploads:
import Rhino.Geometry as rg
# #Input points
points = [x]
# Initialize variables
max_z = None
max_z_point = None
# Find point with the greatest Z value
for point in points:
if max_z is None or point.Z > max_z:
max_z = point.Z
max_z_point = point
# Output the point with the greatest Z value
a = max_z_point
I’m getting an error: '1. Solution exception:‘Guid’ object has no attribute ‘Z’
How can an object not have an attribute Z?
Thanks in advance.