Public Sub Example()
Dim SapModel As cSapModel
Dim EtabsObject As cOAPI
Dim ret As Integer = -1
Dim Name As String
Dim MyNumberLayers As Integer
Dim MyLayerName() As String
Dim MyDist() As Double
Dim MyThickness() As Double
Dim MyType() As Integer
Dim MyNumIntegrationPts() As Integer
Dim MyMatProp() As String
Dim MyMatAng() As Double
Dim MyS11Type() As Integer
Dim MyS22Type() As Integer
Dim MyS12Type() As Integer
Dim NumberLayers As Integer
Dim LayerName() As String
Dim Dist() As Double
Dim Thickness() As Double
Dim SType() As Integer
Dim MatProp() As String
Dim MatAng() As Double
Dim S11Type() As Integer
Dim S22Type() As Integer
Dim S12Type() As Integer
Dim NumIntegrationPts() As Integer
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.PropArea.SetShell_1("A1", 6, True, "", 0, 0, 0)
ret = SapModel.PropMaterial.AddQuick(Name, ETABS2013.eMatType.Rebar, , , , , ETABS2013.eMatTypeRebar.ASTM_A615Gr60)
MyNumberLayers = 5
ReDim MyLayerName(MyNumberLayers - 1)
ReDim MyDist(MyNumberLayers - 1)
ReDim MyThickness(MyNumberLayers - 1)
ReDim MyType(MyNumberLayers - 1)
ReDim MyNumIntegrationPts(MyNumberLayers - 1)
ReDim MyMatProp(MyNumberLayers - 1)
ReDim MyMatAng(MyNumberLayers - 1)
ReDim MyS11Type(MyNumberLayers - 1)
ReDim MyS22Type(MyNumberLayers - 1)
ReDim MyS12Type(MyNumberLayers - 1)
MyLayerName(0) = "Concrete"
MyDist(0) = 0
MyThickness(0) = 16
MyType(0) = 1
MyNumIntegrationPts(0) = 2
MyMatProp(0) = "4000Psi"
MyMatAng(0) = 0
MyS11Type(0) = 1
MyS22Type(0) = 1
MyS12Type(0) = 1
MyLayerName(1) = "Top Bar 1"
MyDist(1) = 6
MyThickness(1) = 0.03
MyType(1) = 1
MyNumIntegrationPts(1) = 1
MyMatProp(1) = Name
MyMatAng(1) = 0
MyS11Type(1) = 1
MyS22Type(1) = 1
MyS12Type(1) = 1
MyLayerName(2) = "Top Bar 2"
MyDist(2) = 6
MyThickness(2) = 0.03
MyType(2) = 1
MyNumIntegrationPts(2) = 1
MyMatProp(2) = Name
MyMatAng(2) = 90
MyS11Type(1) = 1
MyS22Type(1) = 1
MyS12Type(1) = 1
MyLayerName(3) = "Bot Bar 1"
MyDist(3) = -6
MyThickness(3) = 0.03
MyType(3) = 1
MyNumIntegrationPts(3) = 1
MyMatProp(3) = Name
MyMatAng(3) = 0
MyS11Type(1) = 1
MyS22Type(1) = 1
MyS12Type(1) = 1
MyLayerName(4) = "Bot Bar 2"
MyDist(4) = -6
MyThickness(4) = 0.03
MyType(4) = 1
MyNumIntegrationPts(4) = 1
MyMatProp(4) = Name
MyMatAng(4) = 90
MyS11Type(1) = 1
MyS22Type(1) = 1
MyS12Type(1) = 1
ret = SapModel.PropArea.SetShellLayer_1("A1", MyNumberLayers, MyLayerName, MyDist, MyThickness, MyType, MyNumIntegrationPts, MyMatProp, MyMatAng, MyS11Type, MyS22Type, MyS12Type)
ret = SapModel.PropArea.GetShellLayer_1("A1", NumberLayers, LayerName, Dist, Thickness, Stype, NumIntegrationPts, MatProp, MatAng, S11Type, S22Type, S12Type)
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 Name As String
Dim MyNumberLayers As Integer
Dim MyLayerName() As String
Dim MyDist() As Double
Dim MyThickness() As Double
Dim MyType() As Integer
Dim MyNumIntegrationPts() As Integer
Dim MyMatProp() As String
Dim MyMatAng() As Double
Dim MyS11Type() As Integer
Dim MyS22Type() As Integer
Dim MyS12Type() As Integer
Dim NumberLayers As Integer
Dim LayerName() As String
Dim Dist() As Double
Dim Thickness() As Double
Dim SType() As Integer
Dim MatProp() As String
Dim MatAng() As Double
Dim S11Type() As Integer
Dim S22Type() As Integer
Dim S12Type() As Integer
Dim NumIntegrationPts() As Integer
'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 area property
ret = SapModel.PropArea.SetShell_1("A1", 6, True, "", 0, 0, 0)
'add A615Gr60 rebar material
ret = SapModel.PropMaterial.AddQuick(Name, ETABS2013.eMatType.Rebar, , , , , ETABS2013.eMatTypeRebar.ASTM_A615Gr60)
'set area property layer parameters
MyNumberLayers = 5
ReDim MyLayerName(MyNumberLayers - 1)
ReDim MyDist(MyNumberLayers - 1)
ReDim MyThickness(MyNumberLayers - 1)
ReDim MyType(MyNumberLayers - 1)
ReDim MyNumIntegrationPts(MyNumberLayers - 1)
ReDim MyMatProp(MyNumberLayers - 1)
ReDim MyMatAng(MyNumberLayers - 1)
ReDim MyS11Type(MyNumberLayers - 1)
ReDim MyS22Type(MyNumberLayers - 1)
ReDim MyS12Type(MyNumberLayers - 1)
MyLayerName(0) = "Concrete"
MyDist(0) = 0
MyThickness(0) = 16
MyType(0) = 1
MyNumIntegrationPts(0) = 2
MyMatProp(0) = "4000Psi"
MyMatAng(0) = 0
MyS11Type(0) = 1
MyS22Type(0) = 1
MyS12Type(0) = 1
MyLayerName(1) = "Top Bar 1"
MyDist(1) = 6
MyThickness(1) = 0.03
MyType(1) = 1
MyNumIntegrationPts(1) = 1
MyMatProp(1) = Name
MyMatAng(1) = 0
MyS11Type(1) = 1
MyS22Type(1) = 1
MyS12Type(1) = 1
MyLayerName(2) = "Top Bar 2"
MyDist(2) = 6
MyThickness(2) = 0.03
MyType(2) = 1
MyNumIntegrationPts(2) = 1
MyMatProp(2) = Name
MyMatAng(2) = 90
MyS11Type(1) = 1
MyS22Type(1) = 1
MyS12Type(1) = 1
MyLayerName(3) = "Bot Bar 1"
MyDist(3) = -6
MyThickness(3) = 0.03
MyType(3) = 1
MyNumIntegrationPts(3) = 1
MyMatProp(3) = Name
MyMatAng(3) = 0
MyS11Type(1) = 1
MyS22Type(1) = 1
MyS12Type(1) = 1
MyLayerName(4) = "Bot Bar 2"
MyDist(4) = -6
MyThickness(4) = 0.03
MyType(4) = 1
MyNumIntegrationPts(4) = 1
MyMatProp(4) = Name
MyMatAng(4) = 90
MyS11Type(1) = 1
MyS22Type(1) = 1
MyS12Type(1) = 1
ret = SapModel.PropArea.SetShellLayer_1("A1", MyNumberLayers, MyLayerName, MyDist, MyThickness, MyType, MyNumIntegrationPts, MyMatProp, MyMatAng, MyS11Type, MyS22Type, MyS12Type)
'get area property layer parameters
ret = SapModel.PropArea.GetShellLayer_1("A1", NumberLayers, LayerName, Dist, Thickness, Stype, NumIntegrationPts, MatProp, MatAng, S11Type, S22Type, S12Type)
'close ETABS
EtabsObject.ApplicationExit(False)
'clean up variables
SapModel = Nothing
EtabsObject = Nothing
End Sub