public static bool SetISection(HndzISectionProfile Isection, HndzStructuralMaterial material) { SAPISection sapISection = default(SAPISection); sapISection.ConvertFromHndzIProfile(Isection, material); return(SAP2000API.SetISection(sapISection)); }
/// <summary> /// This function assumes that an IBuiltUpSection consists of a start and end section, further development to send an array of sections is recommended /// </summary> /// <param name="IBuiltUpSection"></param> /// <returns></returns> public static bool SetITaperedSection(HndzITaperedProfile profile, HndzStructuralMaterial material) { SAPITaperedSection section = new SAPITaperedSection(); section.ConvertFromHndzTaperedI(profile, material); return(SAP2000API.SetITaperedSection(section)); }
public static bool AnalayzeModel(HndzRestraint analyzedDOFs) { SAPRestraint DOFs = new SAPRestraint(); DOFs.ConvertFromHndzRestraint(analyzedDOFs); return(SAP2000API.AnalayzeModel(DOFs)); }
public static bool SetPoint(HndzNode node) { SAPPoint point = new SAPPoint(); point.ConvertFromHndzNode(node); return(SAP2000API.SetPoint(point)); }
public static bool DefineCustomMaterial(HndzStructuralMaterial material) { SAPMaterial sapMaterial = default(SAPMaterial); sapMaterial.ConvertFromHndzMaterial(material); return(SAP2000API.DefineCustomMaterial(sapMaterial)); }
public static bool AddFrameElement(HndzExtrudedElement element, HndzSectionTypeEnum type) { SAPFrameElement sapElement = new SAPFrameElement(); sapElement.ConvertFromHndzElement(element, type); return(SAP2000API.AddFrameElement(sapElement)); }
public static bool SetRestraint(HndzNode node, HndzRestraint restraint) { SAPPoint point = new SAPPoint(); point.ConvertFromHndzNode(node); SAPRestraint sapRestraint = new SAPRestraint(); sapRestraint.ConvertFromHndzRestraint(restraint); return(SAP2000API.SetRestraint(point, sapRestraint)); }
/// <summary> /// Send a list/array of elements with the same section types, /// if you are sending different types then you have to call this function more than one time /// </summary> /// <param name="elements">Elements to be drawn and defined in SAP2000 Model</param> /// <param name="type">The type of all these elements</param> /// <returns></returns> public static bool AddFrameElement(IEnumerable <HndzExtrudedElement> elements, HndzSectionTypeEnum type) { HndzExtrudedElement[] elementsArr = elements.ToArray(); SAPFrameElement[] sapElementsArr = new SAPFrameElement[elementsArr.Length]; for (int i = 0; i < elementsArr.Length; i++) { sapElementsArr[i].ConvertFromHndzElement(elementsArr[i], type); } return(SAP2000API.AddFrameElement(sapElementsArr)); }
public static HndzMaterial[] SetDefaultMaterials() { SAPMaterial[] sapMaterials = SAP2000API.SetDefaultMaterials(); HndzMaterial[] hndzMaterials = new HndzMaterial[sapMaterials.Length]; for (int i = 0; i < sapMaterials.Length; i++) { sapMaterials[i].ConvertFromHndzMaterial((HndzStructuralMaterial)hndzMaterials[i]); } return(hndzMaterials); }
public static HndzISectionProfile GetISection(HndzISectionProfile profile, ref HndzStructuralMaterial material) { SAPISection section = new SAPISection(); section.ConvertFromHndzIProfile(profile, material); section = SAP2000API.GetISection(section); HndzISectionProfile hndzProfile = new HndzISectionProfile(); hndzProfile = section.ConvertToHndzIProfile(ref material); return(hndzProfile); }
public static bool SetPoint(IEnumerable <HndzNode> nodes) { foreach (HndzNode node in nodes) { SAPPoint point = new SAPPoint(); point.ConvertFromHndzNode(node); bool flag = SAP2000API.SetPoint(point); if (flag == false) { return(false); } } return(true); }
public static bool SetRestraint(IEnumerable <HndzNode> nodes, IEnumerable <HndzRestraint> restraints) { HndzNode[] nodesArr = nodes.ToArray(); HndzRestraint[] restraintsArr = restraints.ToArray(); for (int i = 0; i < nodesArr.Length; i++) { SAPPoint point = new SAPPoint(); point.ConvertFromHndzNode(nodesArr[i]); SAPRestraint sapRestraint = new SAPRestraint(); sapRestraint.ConvertFromHndzRestraint(restraintsArr[i]); bool flag = SAP2000API.SetRestraint(point, sapRestraint); if (flag == false) { return(false); } } return(true); }
public static bool AnalayzeModel(HndzAnalysisDOFs analyzedDOFs) { return(SAP2000API.AnalayzeModel((SAPAnalysisDOFs)analyzedDOFs)); }
public static bool AnalayzeModel() { return(SAP2000API.AnalayzeModel()); }
public static bool SaveModel(string modelName) { return(SAP2000API.SaveModel(modelName)); }
/// <summary> /// Changes the units of the current SAP2000 Interface /// </summary> /// <param name="newunits"></param> public static void ChangeUnits(HndzUnitsEnum newunits) { SAP2000API.ChangeUnits((eUnits)newunits); }
public static bool NewModel(HndzUnitsEnum units = HndzUnitsEnum.Ton_m_C) { return(SAP2000API.NewModel((eUnits)units)); }
public static bool CloseApplication() { return(SAP2000API.CloseApplication()); }
public static bool OpenModel(string modelName) { return(SAP2000API.OpenModel(modelName)); }
public static bool StartApplication(bool attachToInstance, bool isVisible, HndzUnitsEnum units = HndzUnitsEnum.Ton_m_C) { return(SAP2000API.StartApplication(attachToInstance, isVisible, (eUnits)units)); }