Пример #1
0
        /// <summary>
        /// Generates a model meant to send a viewpoint creation request to the BCF API from a Revit UI document.
        /// </summary>
        /// <param name="uiDocument">The Revit UI document</param>
        /// <returns>A BCF model for creating viewpoints.</returns>
        public static Viewpoint_POST GenerateViewpoint(this UIDocument uiDocument)
        {
            (Orthogonal_camera ortho, Perspective_camera perspective) = uiDocument.GetBcfCameraValues();

            return(new Viewpoint_POST
            {
                Clipping_planes = uiDocument.GetBcfClippingPlanes(),
                Snapshot = uiDocument.GetBcfSnapshotData(),
                Components = uiDocument.GetBcfComponents(),
                Orthogonal_camera = ortho,
                Perspective_camera = perspective
            });
        }