Thanks Dale.
Something is wrong:
Is it possible - that lay.FullPath and lay.Name are the same, when a file is loaded via Rhino.FileIO ?
Seams like “FullPath” is only returning “Name” in the following example.
Or is there something like an additional layer-Nesting-Table i have to read before I get a correct “Fullpath-Info” ?
protected override Result RunCommand(RhinoDoc doc, RunMode mode)
{
OpenFileDialog openFileDialog1 = new OpenFileDialog();
openFileDialog1.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
openFileDialog1.Filter = "3dm Files (*.3dm)|*.3dm";
openFileDialog1.FilterIndex = 2;
openFileDialog1.RestoreDirectory = true;
if (openFileDialog1.ShowDialog() != DialogResult.OK)
return Result.Cancel;
File3dm doc3dm = File3dm.Read(openFileDialog1.FileName, File3dm.TableTypeFilter.Layer, File3dm.ObjectTypeFilter.Any);
if (null == doc3dm)
return Result.Failure;
foreach (Layer lay in doc3dm.Layers)
{
RhinoApp.WriteLine("full path is {0}",lay.FullPath);
RhinoApp.WriteLine("name is {0}", lay.Name);
}
doc3dm = null;
return Result.Success;
}