diff --git a/rhino3dm/cs/SampleCSViewports/Program.cs b/rhino3dm/cs/SampleCSViewports/Program.cs
index 087c094f..e698fad9 100644
--- a/rhino3dm/cs/SampleCSViewports/Program.cs
+++ b/rhino3dm/cs/SampleCSViewports/Program.cs
@@ -1,9 +1,13 @@
-using Rhino.DocObjects;
+using System.ComponentModel;
+using Rhino.DocObjects;
using Rhino.FileIO;
File3dm file3dm = File3dm.Read("../../models/Rhino_Logo_Mesh8_NamedViews.3dm");
+
+
Console.WriteLine("--- Views ---");
+Console.WriteLine("nº of views: {0}", file3dm.AllViews.Count);
for ( var i = 0; i < file3dm.AllViews.Count; i ++ ) {
var view = file3dm.AllViews[i];
Console.WriteLine(view.Name);
@@ -11,12 +15,18 @@
}
Console.WriteLine("--- Named Views ---");
+Console.WriteLine("nº of named views: {0}", file3dm.AllNamedViews.Count);
for ( var i = 0; i < file3dm.AllNamedViews.Count; i ++ ) {
var view = file3dm.AllNamedViews[i];
Console.WriteLine(view.Name);
ViewPortInfo(view.Viewport);
}
+// Add view to file
+ViewInfo vi = new ViewInfo();
+vi.Name = "Added from rhino3dm";
+file3dm.AllViews.Add(vi);
+
void ViewPortInfo(ViewportInfo vp) {
//Console.WriteLine("IsValidCameraFrame: {0}",vp.IsIsValidCameraFrame);
diff --git a/rhino3dm/cs/SampleCSViewports/SampleCSViewports.csproj b/rhino3dm/cs/SampleCSViewports/SampleCSViewports.csproj
index ab539e91..e3d4e399 100644
--- a/rhino3dm/cs/SampleCSViewports/SampleCSViewports.csproj
+++ b/rhino3dm/cs/SampleCSViewports/SampleCSViewports.csproj
@@ -7,8 +7,8 @@
enable
-
-
+
+