Exemplo n.º 1
0
        /// <summary>
        /// Convert a Revit floor to Elements.Floor(s) for use in Hypar models.
        /// Sometimes a single floor in Revit needs to be converted to multiple Hypar floors.
        /// </summary>
        /// <param name="revitFloor">The floor to be exported.</param>
        /// <returns name="Floors">The Hypar floors.</returns>
        public static Elements.Floor[] FromRevitFloor(DynamoRevit.Floor revitFloor)
        {
            var revitFloorElement = (Autodesk.Revit.DB.Floor)revitFloor.InternalElement;

            // wrapped exception catching to deliver more meaningful message in Dynamo
            try
            {
                return(Create.FloorsFromRevitFloor(DocumentManager.Instance.CurrentDBDocument, revitFloorElement));
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }
Exemplo n.º 2
0
 public static Floor Wrap(Autodesk.Revit.DB.Floor ele, bool isRevitOwned)
 {
     return(Floor.FromExisting(ele, isRevitOwned));
 }