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)); }
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); }
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)); }
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)); }
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)); }
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)); }
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)); }
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)); }
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)); }