algorithmic modeling for Rhino
Hello all,
I am trying to use C# and RhinoCommon to get a point, then extract its name and coordinates.
So my code look something like this:
ObjRef objRef = GetObject.Object(int index);
Point pt = objRef.Point()
and I am trying to do the following:
String name = pt.Name;
double x = pt.X;
After a few hours of search. I know its not quite as simple as what I am suggesting above. I was hoping that someone can help steer me in the right direction.
Thanks for your help,
Tags:
So here is what I figured out:
1. Get name for point:
RhinoObject rObj = objRef.Object(); // instead of the objRef.Point()
String name = rObject.Attributes.Name; // the RhinoObject as the Attributes property
2. Get the coordinates:
Point pt = objRef.Point();
Point3d pt3d = pt.Location;
double x = pt.X;
Welcome to
Grasshopper
© 2024 Created by Scott Davidson. Powered by