cDesignConcreteSetDesignSection Method |
Namespace: ETABS2016
int SetDesignSection( string Name, string PropName, bool LastAnalysis, eItemType ItemType = eItemType.Objects )
If this item is Objects, the assignment is made to the frame object specified by the Name item.
If this item is Group, the assignment is made to all frame objects in the group specified by the Name item.
If this item is SelectedObjects, the assignment is made to all selected frame objects and the Name item is ignored.
Public Sub Example() Dim SapModel As cSapModel Dim EtabsObject As cOAPI Dim ret As Integer = -1 'create ETABS object EtabsObject = CreateObject("CSI.ETABS.API.ETABSObject") 'start ETABS application ret = EtabsObject.ApplicationStart() 'create SapModel object SapModel = EtabsObject.SapModel 'initialize model ret = SapModel.InitializeNewModel() ret = SapModel.File.NewGridOnly(1, 10, 10, 2, 2, 10, 10) 'create new concrete frame section properties ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20, 12) ret = SapModel.PropFrame.SetRectangle("R2", "4000Psi", 20, 16) 'create a concrete column Dim FrameName1 As String ret = SapModel.FrameObj.AddByCoord(0, 0, 0, 0, 0, 10, FrameName1, "R1") 'run analysis ret = SapModel.File.Save("C:\ETABSAPI\example.edb") ret = SapModel.Analyze.RunAnalysis 'start concrete design ret = SapModel.DesignConcrete.StartDesign 'get design section Dim PropName As String ret = SapModel.DesignConcrete.GetDesignSection(FrameName1, PropName) 'set design section ret = SapModel.DesignConcrete.SetDesignSection(FrameName1, "R2", False) ret = SapModel.DesignConcrete.GetDesignSection(FrameName1, PropName) 'close ETABS EtabsObject.ApplicationExit(False) 'clean up variables SapModel = Nothing EtabsObject = Nothing End Sub