hi, everyone. m new to ghpython, and trying to bake some geometry to rhino with attributes.
after baking ,i want to select the newly baked objects. but i have no idea how to do that.
please give me some advices.
here is my bake code:
m using a button to trigger the baking , after click the bake button, bake = False, so i can not pass the “obj_id” out for further use.
i konw i could bake it to a layer, and select it by layerName. but there are other objects on that layer.
neither by the userString.
if (bake)
{var attr = new Rhino.DocObjects.ObjectAttributes();
var his = new Rhino.DocObjects.HistoryRecord(Rhino.Commands.Command.DisplayHelp, 0);
attr.SetUserString(key, value);
var id = Rhino.RhinoDoc.ActiveDoc.Objects.AddBrep(geo, attr, his, true, spit);
Rhino.RhinoDoc.ActiveDoc.Objects.Select(id);
}