Exemplo n.º 1
0
        public static GCLevel CreateLevel(GCRevitDocument doc, double elev)
        {
#if (REVIT2015)
            Level lev = doc.Document.Create.NewLevel(elev);
#else
            var lev = Level.Create(doc.Document, elev);
#endif
            return(GCLevel.CreateGCLevel(lev));
        }
Exemplo n.º 2
0
        public static List <GCLevel> CreateLevels(GCRevitDocument doc, List <double> elevs)
        {
            var levs = new List <GCLevel>();

            foreach (var elev in elevs)
            {
#if (REVIT2015)
                Level lev = doc.Document.Create.NewLevel(elev);
#else
                var lev = Level.Create(doc.Document, elev);
#endif
                levs.Add(GCLevel.CreateGCLevel(lev));
            }
            return(levs);
        }
Exemplo n.º 3
0
        public static GCColumnSlanted CreateBrace(GCRevitDocument doc, Curve crv, FamilySymbol sym, GCLevel lev)
        {
            var inst = GCFrameCreator.CreateFrameByStructuralType(doc, crv, sym, lev, StructuralType.Column);

            return(GCColumnSlanted.CreateGCColumnSlanted(inst));
        }
Exemplo n.º 4
0
        public static GCColumnSlanted CreateSlantedColumn(GCRevitDocument doc, XYZ p1, XYZ p2, FamilySymbol sym, GCLevel lev)
        {
            var inst = GCFrameCreator.CreateFrameByStructuralType(doc, p1, p2, sym, lev, StructuralType.Column);

            return(GCColumnSlanted.CreateGCColumnSlanted(inst));
        }
Exemplo n.º 5
0
        public static GCColumnVertical CreateVerticalColumn(GCRevitDocument doc, XYZ p1, double height, FamilySymbol sym, GCLevel lev)
        {
            var p2   = new XYZ(p1.X, p1.Y, p1.Z + height);
            var inst = GCFrameCreator.CreateFrameByStructuralType(doc, p1, p2, sym, lev, StructuralType.Column);

            return(GCColumnVertical.CreateGCColumnVertical(inst));
        }
Exemplo n.º 6
0
 internal static FamilyInstance CreateFrameByStructuralType(GCRevitDocument doc, Curve crv, FamilySymbol sym, GCLevel lev, StructuralType type)
 {
     if (!sym.IsActive)
     {
         sym.Activate();
     }
     return(doc.Document.Create.NewFamilyInstance(crv, sym, lev.RevitLevel, type));
 }
Exemplo n.º 7
0
        internal static FamilyInstance CreateFrameByStructuralType(GCRevitDocument doc, XYZ p1, XYZ p2, FamilySymbol sym, GCLevel lev, StructuralType type)
        {
            var line = Line.CreateBound(p1, p2);

            return(CreateFrameByStructuralType(doc, line, sym, type));
        }
Exemplo n.º 8
0
        public static GCFrameBeam CreateBrace(GCRevitDocument doc, Curve crv, FamilySymbol sym, GCLevel lev)
        {
            var inst = CreateFrameByStructuralType(doc, crv, sym, lev, StructuralType.Brace);

            return(GCFrameBeam.CreateGCFrameBeam(inst));
        }
Exemplo n.º 9
0
        public static GCFrameBeam CreateBeam(GCRevitDocument doc, XYZ p1, XYZ p2, FamilySymbol sym, GCLevel lev)
        {
            var inst = CreateFrameByStructuralType(doc, p1, p2, sym, lev, StructuralType.Beam);

            return(GCFrameBeam.CreateGCFrameBeam(inst));
        }