GetLoadDeformation



Your Ad Here

Syntax

SapObject.SapModel.LineElm.GetLoadDeformation

VB6 Procedure

Function GetLoadDeformation(ByVal Name As String, ByRef NumberItems As Long, ByRef LineName() As String, ByRef LoadCase() As String, ByRef dof1() As Boolean, ByRef dof2() As Boolean, ByRef dof3() As Boolean, ByRef dof4() As Boolean, ByRef dof5() As Boolean, ByRef dof6() As Boolean, ByRef U1() As Double, ByRef U2() As Double, ByRef U3() As Double, ByRef R1() As Double, ByRef R2() As Double, ByRef R3() As Double, Optional ByVal ItemTypeElm As eItemTypeElm = Element) As Long

Parameters

Name

The name of an existing line object, line element or group of objects, depending on the value of the ItemTypeElm item.

NumberItems

The total number of deformation loads retrieved for the specified line elements.

LineName

This is an array that includes the name of the line element associated with each deformation load.

LoadCase

This is an array that includes the name of the load case associated with each deformation load.

dof1, dof2, dof3, dof4, dof5, dof6

These are arrays of boolean values indicating if the considered degree of freedom has a deformation load.

dof1 = U1

dof2 = U2

dof3 = U3

dof4 = R1

dof5 = R2

dof6 = R3

U1, U2, U3, R1, R2, R3

These are arrays of deformation load values. The deformations specified for a given degree of freedom are applicable only if the corresponding DOF item for that degree of freedom is True.

U1 = U1 deformation [L]

U2 = U2 deformation [L]

U3 = U3 deformation [L]

R1 = R1 deformation [rad]

R2 = R2 deformation [rad]

R3 = R3 deformation [rad]

ItemTypeElm

This is one of the following items in the eItemTypeElm enumeration:

ObjectElm = 0

Element = 1

GroupElm = 2

SelectionElm = 3

 

If this item is ObjectElm, the load assignments are retrieved for the line elements corresponding to the line object specified by the Name item.

If this item is Element, the load assignments are retrieved for the line element specified by the Name item.

If this item is GroupElm, the load assignments are retrieved for the line elements corresponding to all line objects included in the group specified by the Name item.

If this item is SelectionElm, the load assignments are retrieved for line elements corresponding to all selected line objects, and the Name item is ignored.

Remarks

This function retrieves the deformation load assignments to line elements.

The function returns zero if the load assignments are successfully retrieved, otherwise it returns a nonzero value.

VBA Example

Sub GetLineElmDeformationLoad()
   'dimension variables
      Dim SapObject As Sap2000.SapObject
      Dim SapModel As cSapModel
      Dim ret As Long
      Dim DOF() As Boolean
      Dim d() As double
      Dim NumberItems As Long
      Dim LineName() As String
      Dim LoadCase() As String
      Dim dof1() As Boolean
      Dim dof2() As Boolean
      Dim dof3() As Boolean
      Dim dof4() As Boolean
      Dim dof5() As Boolean
      Dim dof6() As Boolean
      Dim U1() As Double
      Dim U2() As Double
      Dim U3() As Double
      Dim R1() As Double
      Dim R2() As Double
      Dim R3() As Double

   'create Sap2000 object
      Set SapObject = New SAP2000.SapObject

   'start Sap2000 application
      SapObject.ApplicationStart

   'create SapModel object
      Set SapModel = SapObject.SapModel

   'initialize model
      ret = SapModel.InitializeNewModel

   'create model from template
      ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

   'assign frame object deformation loads
      ReDim DOF(5)
      ReDim d(5)
      DOF(0) = True
      D(0) = 2
      ret = SapModel.FrameObj.SetLoadDeformation("ALL", "DEAD", DOF, d, Group)

   'assign frame object auto mesh options
      ret = SapModel.FrameObj.SetAutoMesh("ALL", True, False, False, 2, 0, Group)

   'create the analysis model
      ret = SapModel.Analyze.CreateAnalysisModel

   'get line element deformation loads
      ret = SapModel.LineElm.GetLoadDeformation("3-1", NumberItems, LineName, LoadCase, dof1, dof2, dof3, dof4, dof5, dof6, U1, U2, U3, R1, R2, R3)

   'close Sap2000
      SapObject.ApplicationExit False
      Set SapModel = Nothing
      Set SapObject = Nothing
End Sub

Release Notes

Initial release in version 11.00.

See Also

Return to SAP2000 Index


Your Ad Here