cPropLinkGetWeightAndMass Method |
Namespace: ETABS2016
int GetWeightAndMass( string Name, ref double W, ref double M, ref double R1, ref double R2, ref double R3 )
Public Sub Example() Dim SapModel As cSapModel Dim EtabsObject As cOAPI Dim ret As Integer = -1 Dim DOF() As Boolean Dim Fixed() As Boolean Dim Ke() As Double Dim Ce() As Double Dim w As Double Dim m As Double Dim R1 As Double Dim R2 As Double Dim R3 As Double '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) 'add link property ReDim DOF(5) ReDim Fixed(5) ReDim Ke(5) ReDim Ce(5) DOF(0) = True Ke(0) = 12 ret = SapModel.PropLink.SetLinear("L1", DOF, Fixed, Ke, Ce, 0, 0) 'set link property weight and mass ret = SapModel.PropLink.SetWeightAndMass("L1", 10, 0.26, 0.0012, 0.0014, 0.0016) 'get link property weight and mass ret = SapModel.PropLink.GetWeightAndMass("L1", w, m, R1, R2, R3) 'close ETABS EtabsObject.ApplicationExit(False) 'clean up variables SapModel = Nothing EtabsObject = Nothing End Sub