Public Sub Example()
Dim SapModel As cSapModel
Dim EtabsObject As cOAPI
Dim ret As Integer = -1
Dim StartSec() As String
Dim EndSec() As String
Dim Length() As Double
Dim SegType() As Integer
Dim EI33() As Integer
Dim EI22() As Integer
Dim NumberItems As Integer
Dim MyStartSec() As String
Dim MyEndSec() As String
Dim MyLength() As Double
Dim MySegType() As Integer
Dim MyEI33() As Integer
Dim MyEI22() As Integer
Dim Color As Integer
Dim Notes As String
Dim GUID As String
EtabsObject = CreateObject("CSI.ETABS.API.ETABSObject")
ret = EtabsObject.ApplicationStart()
SapModel = EtabsObject.SapModel
ret = SapModel.InitializeNewModel()
ret = SapModel.File.NewSteelDeck(4,12,12,4,4,24,24)
ret = SapModel.PropFrame.SetISection("ISEC1", "A992Fy50", 24, 10, 0.5, 0.3, 14, 0.6)
ret = SapModel.PropFrame.SetISection("ISEC2", "A992Fy50", 36, 15, 1, 0.5, 121, 0.9)
ReDim StartSec(2)
ReDim EndSec(2)
ReDim Length(2)
ReDim SegType(2)
ReDim EI33(2)
ReDim EI22(2)
StartSec(0) = "ISEC2"
EndSec(0) = "ISEC1"
Length(0) = 60
SegType(0) = 2
EI33(0)= 2
EI22(0)= 1
StartSec(1) = "ISEC1"
EndSec(1) = "ISEC1"
Length(1) = 1
SegType(1) = 1
EI33(1)= 2
EI22(1)= 1
StartSec(2) = "ISEC1"
EndSec(2) = "ISEC2"
Length(2) = 60
SegType(2) = 2
EI33(2)= 2
EI22(2)= 1
ret = SapModel.PropFrame.SetNonPrismatic("NP1", 3, StartSec, EndSec, Length, SegType, EI33, EI22)
ret = SapModel.PropFrame.GetNonPrismatic("NP1", MyNumberItems, MyStartSec, MyEndSec, MyLength, MySegType, MyEI33, MyEI22, Color, Notes, GUID)
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
Dim StartSec() As String
Dim EndSec() As String
Dim Length() As Double
Dim SegType() As Integer
Dim EI33() As Integer
Dim EI22() As Integer
Dim NumberItems As Integer
Dim MyStartSec() As String
Dim MyEndSec() As String
Dim MyLength() As Double
Dim MySegType() As Integer
Dim MyEI33() As Integer
Dim MyEI22() As Integer
Dim Color As Integer
Dim Notes As String
Dim GUID As String
'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()
'create steel deck template model
ret = SapModel.File.NewSteelDeck(4,12,12,4,4,24,24)
'set new I-type frame section property
ret = SapModel.PropFrame.SetISection("ISEC1", "A992Fy50", 24, 10, 0.5, 0.3, 14, 0.6)
'set new I-type frame section property
ret = SapModel.PropFrame.SetISection("ISEC2", "A992Fy50", 36, 15, 1, 0.5, 121, 0.9)
'set new nonprismatic frame section property
ReDim StartSec(2)
ReDim EndSec(2)
ReDim Length(2)
ReDim SegType(2)
ReDim EI33(2)
ReDim EI22(2)
StartSec(0) = "ISEC2"
EndSec(0) = "ISEC1"
Length(0) = 60
SegType(0) = 2
EI33(0)= 2
EI22(0)= 1
StartSec(1) = "ISEC1"
EndSec(1) = "ISEC1"
Length(1) = 1
SegType(1) = 1
EI33(1)= 2
EI22(1)= 1
StartSec(2) = "ISEC1"
EndSec(2) = "ISEC2"
Length(2) = 60
SegType(2) = 2
EI33(2)= 2
EI22(2)= 1
ret = SapModel.PropFrame.SetNonPrismatic("NP1", 3, StartSec, EndSec, Length, SegType, EI33, EI22)
'get nonprismatic section data
ret = SapModel.PropFrame.GetNonPrismatic("NP1", MyNumberItems, MyStartSec, MyEndSec, MyLength, MySegType, MyEI33, MyEI22, Color, Notes, GUID)
'close ETABS
EtabsObject.ApplicationExit(False)
'clean up variables
SapModel = Nothing
EtabsObject = Nothing
End Sub