Hi,
Here is a sample that shows how to add a point to the Rhino Document and assign a name to the point object:
// create a point
Rhino.Geometry.Point3d pt = new Rhino.Geometry.Point3d(1, 2, 3);
//name
String name = “ABC”;
//create new object attribute
var att = doc.CreateDefaultAttributes(); att.Name = name;
//add the point to the document
doc.Objects.AddPoint(pt, att);
Hi, thanks for the answer, but I need create 400 points, for example.
I would like set the name in the point constructor, and also, I need save the point reference in a List and query the name’s point
I can do this:
// create a point
Rhino.Geometry.Point3d pt = new Rhino.Geometry.Point3d(1, 2, 3);
//name
String name = “ABC”;
//create new object attribute
var att = doc.CreateDefaultAttributes(); att.Name = name;
//add the point to the document
doc.Objects.AddPoint(pt, att);