GeneralizedDispl



Your Ad Here

Syntax

SapObject.SapModel.Results.GeneralizedDispl

VB6 Procedure

Function GeneralizedDispl(ByVal Name As String, ByRef NumberResults As Long, ByRef GD() As String, ByRef ACase() As String, ByRef StepType() As String, ByRef StepNum() As Double, ByRef DType() As String, ByRef Value() As Double) As Long

Parameters

Name

The name of an existing generalized displacement for which results are returned. If the program does not recognize this name as a defined generalized displacement, it returns results for all selected generalized displacements, if any. For example, entering a blank string (i.e., "") for the name will prompt the program to return results for all selected generalized displacements.

NumberResults

The total number of results returned by the program.

GD

This is an array that includes the generalized displacement name associated with each result.

ACase

This is an array that includes the name of the analysis case or response combination associated with each result.

StepType

This is an array that includes the step type, if any, for each result.

StepNum

This is an array that includes the step number, if any, for each result.

DType

This is an array that includes the generalized displacement type for each result. It is either Translation or Rotation.

Value

This is an array of the generalized displacement values for each result.[L] when DType is Translation , [rad] when DType is Rotation.

Remarks

This function reports the displacement values for the specified generalized displacements.

The function returns zero if the displacements are successfully recovered, otherwise it returns a nonzero value.

See Analysis Results Remarks for more information.

VBA Example

Sub GetGeneralizedDisplacements()
   'dimension variables
      
Dim SapObject As Sap2000.SapObject
      Dim SapModel As cSapModel
      Dim ret As Long
      Dim NumberResults As Long
      Dim GD() As String
      Dim ACase() As String
      Dim StepType() As String
      Dim StepNum() As Double
      Dim DType() As String
      Dim Value() As Double
      Dim SF() 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)

   'run analysis
      ret = SapModel.File.Save("C:\SapAPI\x.sdb")
      ret = SapModel.Analyze.RunAnalysis

   'clear all case and combo output selections
      ret = SapModel.Results.Setup.DeselectAllCasesAndCombosForOutput

   'set case and combo output selections
      ret = SapModel.Results.Setup.SetCaseSelectedForOutput("DEAD")

   'add generalized displacement
      ret = SapModel.GDispl.Add("GD1", 1)

   'add point to generalized displacement
      ReDim SF(5)
      SF(0) = 0.5
      ret = SapModel.GDispl.SetPoint("GD1", "3", SF)

   'get generalized displacement results
      ret = SapModel.Results.GeneralizedDispl("GD1",NumberResults, GD, ACase, StepType, StepNum, DType, Value)

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

Release Notes

Initial release in version 11.00.

See Also

JointDispl

JointDisplAbs

Return to SAP2000 Index


Your Ad Here