Modifies the design section for all specified frame objects that have a concrete frame design procedure
Namespace: ETABS2015Assembly: ETABS2015 (in ETABS2015.dll) Version: 15.0.0.0 (15.0.0.0)
int SetDesignSection(
string Name,
string PropName,
bool LastAnalysis,
eItemType ItemType = eItemType.Objects
)
Function SetDesignSection ( _
Name As String, _
PropName As String, _
LastAnalysis As Boolean, _
Optional ItemType As eItemType = eItemType.Objects _
) As Integer
int SetDesignSection(
String^ Name,
String^ PropName,
bool LastAnalysis,
eItemType ItemType = eItemType::Objects
)
Parameters
- Name
- Type:
System String
The name of an existing frame object or group, depending on the value of the ItemType item
- PropName
- Type:
System String
The name of an existing frame section property
to be used as the design section for the specified frame objects.
This item applies only when LastAnalysis = False
- LastAnalysis
- Type:
System Boolean
If this item is True, the design section for the specified frame objects
is reset to the last analysis section for the frame object.
If it is False, the design section is set to that specified by PropName
- ItemType (Optional)
- Type: ETABS2015 eItemType
This is one of the following items in the eItemType enumeration:
- Object = 0
- Group = 1
- SelectedObjects = 2
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.
Return Value
Returns zero if the design section is successfully modified; otherwise it returns a nonzero value
Public Sub Example()
Dim SapModel As cSapModel
Dim EtabsObject As cOAPI
Dim ret As Integer = -1
EtabsObject = CreateObject("CSI.ETABS.API.ETABSObject")
ret = EtabsObject.ApplicationStart()
SapModel = EtabsObject.SapModel
ret = SapModel.InitializeNewModel()
ret = SapModel.File.NewGridOnly(1, 10, 10, 2, 2, 10, 10)
ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20, 12)
ret = SapModel.PropFrame.SetRectangle("R2", "4000Psi", 20, 16)
Dim FrameName1 As String
ret = SapModel.FrameObj.AddByCoord(0, 0, 0, 0, 0, 10, FrameName1, "R1")
ret = SapModel.File.Save("C:\ETABSAPI\example.edb")
ret = SapModel.Analyze.RunAnalysis
ret = SapModel.DesignConcrete.StartDesign
Dim PropName As String
ret = SapModel.DesignConcrete.GetDesignSection(FrameName1, PropName)
ret = SapModel.DesignConcrete.SetDesignSection(FrameName1, "R2", False)
ret = SapModel.DesignConcrete.GetDesignSection(FrameName1, PropName)
EtabsObject.ApplicationExit(False)
SapModel = Nothing
EtabsObject = Nothing
End Sub
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