/// <summary>
        /// Gets a list of the detail view objects associated with this layout.
        /// </summary>
        /// <returns>A detail view object array. This can be null, but not empty.</returns>
        public DetailViewObject[] GetDetailViews()
        {
            IntPtr ptr_list = UnsafeNativeMethods.CRhinoDetailViewArray_New();
            int    count    = UnsafeNativeMethods.CRhinoPageView_GetDetailViewObjects(RuntimeSerialNumber, ptr_list);

            if (count < 1)
            {
                UnsafeNativeMethods.CRhinoDetailViewArray_Delete(ptr_list);
                return(null);
            }

            var rc = new DetailViewObject[count];

            for (int i = 0; i < count; i++)
            {
                IntPtr ptr_detail = UnsafeNativeMethods.CRhinoDetailViewArray_Item(ptr_list, i);
                if (ptr_detail != IntPtr.Zero)
                {
                    uint sn = UnsafeNativeMethods.CRhinoObject_RuntimeSN(ptr_detail);
                    rc[i] = new DetailViewObject(sn);
                }
            }
            UnsafeNativeMethods.CRhinoDetailViewArray_Delete(ptr_list);
            return(rc);
        }
        /// <summary>
        /// Creates a detail view object that is displayed on this page and adds it to the doc.
        /// </summary>
        /// <param name="title">The detail view title.</param>
        /// <param name="corner0">Corners of the detail view in world coordinates.</param>
        /// <param name="corner1">Corners of the detail view in world coordinates.</param>
        /// <param name="initialProjection">The defined initial projection type.</param>
        /// <returns>Newly created detail view on success. null on error.</returns>
        /// <example>
        /// <code source='examples\vbnet\ex_addlayout.vb' lang='vbnet'/>
        /// <code source='examples\cs\ex_addlayout.cs' lang='cs'/>
        /// <code source='examples\py\ex_addlayout.py' lang='py'/>
        /// </example>
        public DetailViewObject AddDetailView(string title, Geometry.Point2d corner0, Geometry.Point2d corner1, DefinedViewportProjection initialProjection)
        {
            IntPtr           ptr_detail = UnsafeNativeMethods.CRhinoPageView_AddDetailView(RuntimeSerialNumber, corner0, corner1, title, (int)initialProjection);
            DetailViewObject rc         = null;

            if (ptr_detail != IntPtr.Zero)
            {
                uint sn = UnsafeNativeMethods.CRhinoObject_RuntimeSN(ptr_detail);
                rc = new DetailViewObject(sn);
            }
            return(rc);
        }