public static FrameSection Factory(string uniqueName) { if (Registry.FrameSections.Keys.Contains(uniqueName)) { return(Registry.FrameSections[uniqueName]); } eFrameSectionType frameSectionType = GetType(uniqueName); FrameSection frameSection = null; switch (frameSectionType) { case eFrameSectionType.Rectangular: case eFrameSectionType.BucklingRestrainedBrace: frameSection = RectangleSection.Factory(uniqueName); break; default: return(null); } if (_frameSection != null) { frameSection.GetFrameType(); frameSection.GetSectionProperties(); } Registry.FrameSections.Add(uniqueName, frameSection); return(frameSection); }
public void GetNameInPropertyFile(string name, ref string nameInFile, ref string fileName, ref string nameMaterial, ref eFrameSectionType frameSectionType) { }
protected RectangleSection( ApiCSiApplication app, Materials.Materials material, string name, eFrameSectionType type = eFrameSectionType.BuiltUpUHybrid) : base(app, material, name, type) { }
public static RectangleSection Factory( string uniqueName, eFrameSectionType frameType, double t3, double t2, double tf, double tw, double t2b, double tfb, CSiApplication app = null) { if (Registry.FrameSections.Keys.Contains(uniqueName)) { return((RectangleSection)Registry.FrameSections[uniqueName]); } RectangleSection frameSection = (RectangleSection)FrameSection.Factory(uniqueName, t3, t2, tf, tw, t2b, tfb); if (app != null) { frameSection.GetRectangle(app); } Registry.FrameSections.Add(uniqueName, frameSection); return(frameSection); }
protected ColdHatSection( ApiCSiApplication app, Materials.Materials material, string name, eFrameSectionType type = eFrameSectionType.ColdHat) : base(app, material, name, type) { }
protected RectangleSection( ApiCSiApplication app, Materials.Materials material, string name, eFrameSectionType type = eFrameSectionType.PreCastConcreteGirderU) : base(app, material, name, type) { }
/// <summary> /// Initializes a new instance of the <see cref="FrameSection" /> class. /// </summary> /// <param name="app">The application.</param> /// <param name="material">The material.</param> /// <param name="name">The name.</param> /// <param name="type">The type.</param> protected FrameSection(ApiCSiApplication app, Materials.Materials material, string name, eFrameSectionType type = eFrameSectionType.All) : base(app, material, name, type) { _sectionProperties = new T(); }
/// <summary> /// Initializes a new instance of the <see cref="FrameSection" /> class. /// </summary> /// <param name="material">The material.</param> /// <param name="name">The name.</param> /// <param name="type">The type.</param> protected FrameSection( Materials.Materials material, string name, eFrameSectionType type = eFrameSectionType.All) : base(material, name, type) { _sectionProperties = new T(); }
public void GetNameList_By_Type_ISection() { eFrameSectionType frameType = eFrameSectionType.ISection; string[] names = _app.Model.Definitions.Properties.FrameSection.GetNameList(frameType); Assert.That(names.Length, Is.EqualTo(CSiDataLine.NumberOfSectionFramesExpected)); Assert.That(names.Contains(CSiDataLine.NameSectionFrame)); Assert.That(names.Contains(CSiDataLine.NameSectionFrameCol)); }
/// <summary> /// Gets all defined frame sections of a specified frame type. /// </summary> /// <returns>List<LoadPattern>.</returns> public static List <FrameSection> GetAll(eFrameSectionType frameType) { List <FrameSection> objects = new List <FrameSection>(); List <string> names = GetNameList(frameType); foreach (var name in names) { FrameSection frameSection = Factory(name); objects.Add(frameSection); } return(objects); }
/// <summary> /// Returns the names of all defined frame section properties of a specified type in a specified frame section property file. /// </summary> /// <param name="fileName">The name of the frame section property file from which to get the name list. /// In most cases, inputting only the name of the property file (e.g.Sections8.pro) is required, and the program will be able to find it. /// In some cases, inputting the full path to the property file may be necessary.</param> /// <param name="frameSectionType">Type of frame section to filter the list by. /// If no value is input for <paramref name="frameSectionType" />, names are returned for all frame section properties in the specified file regardless of type.</param> /// <exception cref="NotImplementedException"></exception> /// <exception cref="CSiException"></exception> internal void GetPropertyFileNameList(string fileName, eFrameSectionType frameSectionType = 0) { _apiFrameSection.GetPropertyFileNameList(fileName, out var sectionNames, out var frameSectionTypes, frameSectionType); throw new NotImplementedException(); //for (int i = 0; i < sectionNames.Length; i++) //{ // // TODO: Finish GetPropertyFileNameList & then make public // //// The property names obtained from the frame section property file. // //sectionNames[i]; // //// The frame section property type for each property obtained from the frame section property file. // //frameSectionTypes[i]; //} }
/// <summary> /// Gets all defined frame sections of a specified frame type. /// </summary> /// <param name="frameType">Type of the frame.</param> /// <returns>List<LoadPattern>.</returns> public List <FrameSection> FillAllItems(eFrameSectionType frameType) { List <FrameSection> items = new List <FrameSection>(); List <string> itemNames = GetNameList(frameType); foreach (var itemName in itemNames) { FrameSection item = FillItem(itemName); if (item == null) { continue; } items.Add(item); } return(items); }
public void GetPropertyFileNameList(string fileName, ref string[] sectionNames, ref eFrameSectionType[] frameSectionTypes, eFrameSectionType frameSectionType) { }
public eFrameSectionType GetType(string name) { eFrameSectionType frameSectionType = _app.Model.Definitions.Properties.FrameSection.GetType(CSiDataLine.NameSectionFrame); return(frameSectionType); }
/// <summary> /// Returns the names of all defined frame sections of the specified type. /// </summary> /// <param name="frameType">Type of the frame.</param> /// <returns>List<System.String>.</returns> /// <exception cref="T:MPT.CSI.API.Core.Support.CSiException">API_DEFAULT_ERROR_CODE</exception> public List <string> GetNameList(eFrameSectionType frameType) { return(FrameSection.GetNameList(_apiFrameSection, frameType)); }
protected ColdZSection( Materials.Materials material, string name, eFrameSectionType type = eFrameSectionType.ColdZ) : base(material, name, type) { }
public NonPrismaticSection(Materials.Materials material, string name, eFrameSectionType type = eFrameSectionType.Variable) : base(material, name, type) { }
/// <summary> /// Converts the type of to frame section. /// </summary> /// <param name="value">The value.</param> /// <returns>eFrameSectionType.</returns> private static string convertFromFrameSectionType(eFrameSectionType value) { switch (value) { case eFrameSectionType.ISection: return("I/Wide Flange"); case eFrameSectionType.BuiltUpICoverPlate: return("Built Up I"); case eFrameSectionType.SectionDesigner: return("SD Section"); case eFrameSectionType.Rectangular: return("Rectangular"); case eFrameSectionType.TSection: return("Tee"); case eFrameSectionType.Angle: return("Angle"); case eFrameSectionType.DoubleAngle: return("Double Angle"); case eFrameSectionType.DoubleChannel: return("Double Channel"); case eFrameSectionType.Circle: return("Circle"); case eFrameSectionType.Trapezoidal: return("Trapezoidal"); case eFrameSectionType.ColdC: return("Cold Formed C"); case eFrameSectionType.ColdZ: return("Cold Formed Z"); case eFrameSectionType.ColdHat: return("Cold Formed Hat"); case eFrameSectionType.Channel: return("Channel"); case eFrameSectionType.Pipe: return("Pipe"); case eFrameSectionType.Box: return("Box/Tube"); case eFrameSectionType.Joist: return("Joist"); case eFrameSectionType.Variable: return("Nonprismatic"); case eFrameSectionType.Auto: return("Auto Select"); default: return("All"); } }
public RectangleSection(string name, eFrameSectionType type = eFrameSectionType.Rectangular) : base(name, type) { }
public AutoSelectSection(Materials.Materials material, string name, eFrameSectionType type = eFrameSectionType.Auto) : base(material, name, type) { }
protected PrecastUSection( Materials.Materials material, string name, eFrameSectionType type = eFrameSectionType.PreCastConcreteGirderU) : base(material, name, type) { }
public TrapezoidalSection(Materials.Materials material, string name, eFrameSectionType type = eFrameSectionType.Trapezoidal) : base(material, name, type) { }
/// <summary> /// Returns the names of all defined frame properties of the specified type. /// </summary> /// <exception cref="T:MPT.CSI.API.Core.Support.CSiException">API_DEFAULT_ERROR_CODE</exception> public static List <string> GetNameList(eFrameSectionType frameType) { return(new List <string>(_frameSection.GetNameList(frameType))); }
protected FrameSection(string name, eFrameSectionType type = eFrameSectionType.All) : base(name) { Type = type; }
protected HybridUSection( Materials.Materials material, string name, eFrameSectionType type = eFrameSectionType.BuiltUpUHybrid) : base(material, name, type) { }
// eFrameType internal static CSiProgram.eFramePropType ToCSi(eFrameSectionType enumValue) { return((CSiProgram.eFramePropType)enumValue); }