generative modeling for Rhino
Rhino.DocObjects.RhinoObject[] srf; srf = doc.Objects.FindByLayer(layerName[0]); List<Rhino.DocObjects.RhinoObject> srfs = new List<Rhino.DocObjects.RhinoObject>(); foreach(Rhino.DocObjects.RhinoObject obj in srf) { obj.Select(true); srfs.Add(obj); }A = srfs;Tags: c#, select by layer
Permalink Reply by Andrea Polato on December 8, 2010 at 11:53am
List <int < srfs = new Listi <int <();
System.Collections.Generic.List < Guid < ids = new System.Collections.Generic.List <Guid<();
foreach(Rhino.DocObjects.RhinoObject obj in srf)
{
//obj.Select(true); //select objects in the layer
ids.Add(obj.Id);
}
if(del == true) //bool input
{
for(int i = 0; i < ids.Count; i++)
{
doc.Objects.Delete(ids[i], false);
}
} else
return;

Permalink Reply by Andrea Polato on December 8, 2010 at 3:50pm 
Permalink Reply by Andrea Polato on December 8, 2010 at 5:29pm 
Permalink Reply by Firat Aydin on December 28, 2011 at 9:19am i cannot run such codes. and i terribly need one of those. can you give me an example how to put entry etc and send?
THNX
© 2013 Created by Scott Davidson.
Powered by