Load Function
-
Upload
gerry-triaz -
Category
Documents
-
view
173 -
download
2
Transcript of Load Function
Loads Functions
GetLoadCombinationCaseCount
VB Syntax
integer GetLoadCombinationCaseCount (integer pnCount)
Parameters
pnCount
An integer variable which the function will use to store the number of load combination cases.
Remarks
This function retrieves the number of load combination cases in the currently open STAAD file. It then stores that number in an integer variable passed to it as a parameter.
Example
Sub CountLCombs()
'Declare OpenSTAAD object variable As Output.
Dim objOpenSTAAD As Output
'Declare an integer variable for storing the function results.
Dim pnCount As Integer
'Run an instance of OpenSTAAD and open STAAD Example No. 1 (US).
Set objOpenSTAAD = CreateObject("OpenSTAAD.Output.1")
objOpenSTAAD.SelectSTAADFile "C:\SPRO2003\STAAD\Examp\US\examp01.std"
'Retrieve the number of load combinations and store that number in the
'pnCount variable.
objOpenSTAAD.GetLoadCombinationCaseCount pnCount
'Close the STAAD file and release the handles to the OpenSTAAD library.
objOpenSTAAD.CloseSTAADFile
Set objOpenSTAAD = Nothing
Page 1 of 42Loads Functions
6/18/2011file://C:\Users\MICHELLE\AppData\Local\Temp\~hh35A.htm
End Sub
See Also
GetPrimaryLoadCaseCount
GetLoadCombinationNumbers
VB Syntax
integer GetLoadCombinationNumbers (long nLoadCombs, integer pnLoadCombNumbers)
Parameters
nLoadCombs
A long variable which specifies the number of combination load cases for which the list of combination load case numbers is to be obtained by the function.
pnLoadCombNumbers
A dynamic integer array used by the function to store the list of combination load case numbers.
Remarks
This function retrieves a list of the combination load cases numbers for a given number of combination load cases. The combination load case numbers are stored in a dynamic array, since the size of the array will vary, depending on the number of combination load cases in the currently open STAAD file. The OpenSTAAD function GetLoadCombinationCaseCount can be used to retrieve the number of combination loads in the currently open STAAD file. Then, the VB ‘ReDim’ function can be used to size the array.
Example
'This code snippet retrieves a list of the combination load case numbers.
Sub GetLoadCombinationNumbers()
'Declare OpenSTAAD object variable.
Dim objOpenSTAAD As Output
'Declare variables for storing the function results.
Dim pnCount As Integer
Dim pnLoadCombNumbers() As Integer
Page 2 of 42Loads Functions
6/18/2011file://C:\Users\MICHELLE\AppData\Local\Temp\~hh35A.htm
'Run an instance of OpenSTAAD and open STAAD Example No. 4 (US).
Set objOpenSTAAD = CreateObject("OpenSTAAD.Output.1")
objOpenSTAAD.SelectSTAADFile "C:\SPRO2004\STAAD\Examp\US\EXAMP04.std"
'Retrieve the number of combination load cases in the file and store the results
'in the variable pnCount.
objOpenSTAAD.GetLoadCombinationCaseCount pnCount
'Redimension the pnLoadCombNumbers array with the known number of combination
'load cases.
ReDim pnLoadCombNumbers(1 To pnCount)
'Retrieve a list of the combination load case numbers and store the results in
'the array pnLoadCombNumbers.
objOpenSTAAD.GetLoadCombinationNumbers pnCount, pnLoadCombNumbers(1)
'Close the STAAD file and release the handles to the OpenSTAAD library.
objOpenSTAAD.CloseSTAADFile
Set objOpenSTAAD = Nothing
End Sub
See Also
GetLoadCombinationCaseCount GetPrimaryLoadNumbers GetNumberOfPrimaryLoadsInLoadComb
GetLoadCombinationInfo
VB Syntax
integer GetLoadCombinationInfo (long nLoadComb, long nPrimaryLoadCasesInComb, integer pnSRSS, double pdSRSSFactor, integer pnPrimaryLoadCaseNumbers, double pdPrimaryLoadFactors)
Parameters
Page 3 of 42Loads Functions
6/18/2011file://C:\Users\MICHELLE\AppData\Local\Temp\~hh35A.htm
nLoadComb
A long variable greater than or equal to one which specifies the combination load case number for which the combination load info is to be obtained by the function.
nPrimaryLoadCasesInComb
A long variable which specifies the number of primary load cases in the specified combination load case for which the combination load info is to be obtained by the function.
pnSRSS
An integer variable used by the function to store the SRSS value of the specified load combination.
pdSRSSFactor
A double variable used by the function to store the SRSS factor of the specified load combination.
pnPrimaryLoadCaseNumbers
An integer array used by the function to store a list of the primary load case numbers for the specified load combination.
pdPrimaryLoadFactors
A double array used by the function to store the primary load factors for the specified load combination.
Remarks
This function retrieves the combination load info for a given combination load case and number of primary load cases within the combination load case.
See Also
GetNumberOfPrimaryLoadsInLoadComb
GetPrimaryLoadCaseCount
VB Syntax
integer GetPrimaryLoadCaseCount (integer pnCount)
Parameters
pnCount
Page 4 of 42Loads Functions
6/18/2011file://C:\Users\MICHELLE\AppData\Local\Temp\~hh35A.htm
An integer variable which the function will use to store the number of primary load cases.
Remarks
This function retrieves the number of primary load cases in the currently open STAAD file. It then stores that number in an integer variable passed to it as a parameter.
Example
Sub CountLCs()
Dim objOpenSTAAD As Output
Dim pnCount As Integer
'Run an instance of OpenSTAAD and open STAAD Example No. 1 (US).
Set objOpenSTAAD = CreateObject("OpenSTAAD.Output.1")
objOpenSTAAD.SelectSTAADFile "C:\SPRO2003\STAAD\Examp\US\examp01.std"
'Retrieve the number of primary load cases and store that number in the pnCount
'variable.
objOpenSTAAD.GetPrimaryLoadCaseCount pnCount
'Close the STAAD file and release the handles to the OpenSTAAD library.
objOpenSTAAD.CloseSTAADFile
Set objOpenSTAAD = Nothing
End Sub
See Also
GetLoadCombinationCaseCount
GetPrimaryLoadNumbers
VB Syntax
integer GetPrimaryLoadNumbers (long nPrimaryLoadCases, integer pnPrimaryLoadCaseNumbers)
Parameters
nPrimaryLoadCases
Page 5 of 42Loads Functions
6/18/2011file://C:\Users\MICHELLE\AppData\Local\Temp\~hh35A.htm
A long variable which specifies the number of primary load cases for which the list of primary load case numbers is to be obtained by the function..
pnPrimaryLoadCaseNumbers
A dynamic integer array used by the function to store the list of primary load case numbers.
Remarks
This function retrieves a list of the primary load cases numbers for a given number of primary load cases. The primary load case numbers are stored in a dynamic array, since the size of the array will vary, depending on the number of primary load cases in the currently open STAAD file. The OpenSTAAD function GetPrimaryLoadCaseCount can be used to retrieve the number of primary loads in the currently open STAAD file. Then, the VB ‘ReDim’ function can be used to size the array.
Example
'This code snippet retrieves a list of the primary load case numbers.
Sub GetPrimaryLoadNumbers()
'Declare OpenSTAAD object variable.
Dim objOpenSTAAD As Output
'Declare variables for storing the function results.
Dim pnCount As Integer
Dim pnPrimaryLoadCaseNumbers() As Integer
'Run an instance of OpenSTAAD and open STAAD Example No. 4 (US).
Set objOpenSTAAD = CreateObject("OpenSTAAD.Output.1")
objOpenSTAAD.SelectSTAADFile "C:\SPRO2004\STAAD\Examp\US\EXAMP04.std"
'Retrieve the number of primary load cases in the file and store the results in
'the variable pnCount.
objOpenSTAAD.GetPrimaryLoadCaseCount pnCount
'Redimension the pnPrimaryLoadCaseNumbers array with the known number of primary
'load cases.
Page 6 of 42Loads Functions
6/18/2011file://C:\Users\MICHELLE\AppData\Local\Temp\~hh35A.htm
ReDim pnPrimaryLoadCaseNumbers(1 To pnCount)
'Retrieve a list of the primary load case numbers and store the results in the
'array pnPrimaryLoadCaseNumbers.
objOpenSTAAD.GetPrimaryLoadNumbers pnCount, pnPrimaryLoadCaseNumbers(1)
'Close the STAAD file and release the handles to the OpenSTAAD library.
objOpenSTAAD.CloseSTAADFile
Set objOpenSTAAD = Nothing
End Sub
See Also
GetPrimaryLoadCaseCount GetNumberOfPrimaryLoadsInLoadComb GetLoadCombinationNumbers
GetNumberOfPrimaryLoadsInLoadComb
VB Syntax
integer GetNumberOfPrimaryLoadsInLoadComb (long nLoadCombNo, integer pnPrimaryLoads)
Parameters
nLoadCombNo
A long variable greater than or equal to one which specifies the combination load case number for which the number of primary load cases in the combination load are to be obtained by the function.
pnPrimaryLoads
An integer variable used by the function to store the number of primary load cases in the specified combination load case
Remarks
This function retrieves the number of primary load cases in a given combination load case.
Example
'This code snippet retrieves the number of primary load cases in combination
Page 7 of 42Loads Functions
6/18/2011file://C:\Users\MICHELLE\AppData\Local\Temp\~hh35A.htm
'load case 4.
Sub GetNumberOfPrimaryLoadsInLoadComb()
'Declare OpenSTAAD object variable.
Dim objOpenSTAAD As Output
'Declare variable for storing the function results.
Dim pnPrimaryLoads As Integer
'Run an instance of OpenSTAAD and open STAAD Example No. 4 (US).
Set objOpenSTAAD = CreateObject("OpenSTAAD.Output.1")
objOpenSTAAD.SelectSTAADFile "C:\SPRO2004\STAAD\Examp\US\EXAMP04.std"
'Retrieve the number of primary load cases in combination load case 4 and store
'the results in pnPrimaryLoads.
objOpenSTAAD.GetNumberOfPrimaryLoadsInLoadComb 4, pnPrimaryLoads
'Close the STAAD file and release the handles to the OpenSTAAD library.
objOpenSTAAD.CloseSTAADFile
Set objOpenSTAAD = Nothing
End Sub
See Also
GetPrimaryLoadCaseCount
GetFirstLoadCase
VB Syntax
GetFirstLoadCase (integer pnLoad, string pstrLoadName)
Parameters
pnLoad
An integer variable for the function to use in storing the load case number it retrieves from STAAD.Pro.
pstrLoadName
Page 8 of 42Loads Functions
6/18/2011file://C:\Users\MICHELLE\AppData\Local\Temp\~hh35A.htm
A string variable for the function to use in storing the load case name it retrieves from STAAD.Pro.
Remarks
This function retrieves the first load case number and corresponding load case name for the currently open STAAD file. The function stores the first load case number and corresponding load case name in variables passed to it as parameters. The program stores the first load case number in the pnLoad integer variable and the corresponding load case name in the pstrLoadName string variable.
This function should always be used before the GetNextLoadCase function is called to determine the first load case number (load cases are not necessarily numbered consecutively, and the first load case number may not always be number 1).
Example
Sub FirstLC()
'Declare OpenSTAAD object variable As Output.
Dim objOpenSTAAD As Output
'Declare two variables for storing the function results.
Dim pnLoad As Integer
Dim pstrLoadName As String
'Run an instance of OpenSTAAD and open STAAD Example No. 1 (US).
Set objOpenSTAAD = CreateObject("OpenSTAAD.Output.1")
objOpenSTAAD.SelectSTAADFile "C:\SPRO2003\STAAD\Examp\US\examp01.std"
'Retrieve the first load case number and name.
objOpenSTAAD.GetFirstLoadCase pnLoad, pstrLoadName
'Close the STAAD file and release the handles to the OpenSTAAD library.
objOpenSTAAD.CloseSTAADFile
Set objOpenSTAAD = Nothing
End Sub
See Also
Page 9 of 42Loads Functions
6/18/2011file://C:\Users\MICHELLE\AppData\Local\Temp\~hh35A.htm
GetNextLoadCase
GetNextLoadCase
VB Syntax
GetNextLoadCase (integer nPrevLoadCase, integer pnLoad, string strLoadName)
Parameters
nPrevLoadCase
An integer value passed to the function to specify the load case number which directly precedes in numerical order the load case number and name we wish to retrieve.
pnLoad
An integer variable name passed to the function for it to use in storing the load case number it retrieves from STAAD.Pro.
strLoadName
A string variable name passed to the function for it to use in storing the load case name it retrieves from STAAD.Pro.
Remarks
This function retrieves the next load case number and load case name when given the previous load case number. Before this function is called, the GetFirstLoadCase function should be used to obtain the load case number for the first load case. This function can then be used to obtain the load case number and name for successive load cases.
Example
Sub getLCs()
'Declare OpenSTAAD object variable As Output.
Dim objOpenSTAAD As Output
'Declare variables for storing the function results.
Dim pnPriCount As Integer
Dim pnCombCount As Integer
Dim pnCount As Integer
Page 10 of 42Loads Functions
6/18/2011file://C:\Users\MICHELLE\AppData\Local\Temp\~hh35A.htm
Dim pnLoad1 As Integer
Dim pnLoad As Integer
Dim nPrevLoadCase As Integer
Dim pstrLoadName As String
'Run an instance of OpenSTAAD and open STAAD Example No. 1 (US).
Set objOpenSTAAD = CreateObject("OpenSTAAD.Output.1")
objOpenSTAAD.SelectSTAADFile "C:\SPRO2003\STAAD\Examp\US\examp01.std"
'Retrieve the number of primary load cases and store that number in the
'pnPriCount variable.
objOpenSTAAD.GetPrimaryLoadCaseCount pnPriCount
'Retrieve the number of load combinations and store that number in the
'pnCombCount variable.
objOpenSTAAD.GetLoadCombinationCaseCount pnCombCount
'Calculate the total number of load cases.
pnCount = pnPriCount + pnCombCount
'Retrieve the first load case number and name.
objOpenSTAAD.GetFirstLoadCase pnLoad1, pstrLoadName
'Set the previous load case number for the GetNextLoadCase function
'equal to the first case load number.
nPrevLoadCase = pnLoad1
'Iterate through the load cases and plot their load case numbers and names
'in an Excel worksheet.
For i = 1 to pnCount
objOpenSTAAD.GetNextLoadCase nPrevLoadCase, pnLoad, strLoadName
Cells(31 + i, 11).Value = pnLoad
Cells(31 + i, 12).Value = strLoadName
Page 11 of 42Loads Functions
6/18/2011file://C:\Users\MICHELLE\AppData\Local\Temp\~hh35A.htm
'Set the previous load case number equal to the load case the function
'just retrieved, so we can go on to the next load case.
nPrevLoadCase = pnLoad
Next i
'Close the STAAD file and release the handles to the OpenSTAAD library.
objOpenSTAAD.CloseSTAADFile
Set objOpenSTAAD = Nothing
End Sub
See Also
GetFirstLoadCase
GetJointLoadCountOnNode
VB Syntax
integer GetJointLoadCountOnNode (long nNodeNo, long nLC, integer pnLoadCount)
Parameters
nNodeNo
A long variable greater than or equal to one which specifies the node number for which the joint load count is to be obtained by the function.
nLC
A long variable greater than or equal to one which specifies the load case number for which the joint load count is to be obtained by the function.
pnLoadCount
An integer variable used by the function to store the number of joint loads.
Remarks
This function retrieves the number of joints loads for a given node and load case.
Example
'This code snippet retrieves the number of joints loads for node 11, load case 2.
Page 12 of 42Loads Functions
6/18/2011file://C:\Users\MICHELLE\AppData\Local\Temp\~hh35A.htm
Sub GetJointLoadCountOnNode()
'Declare OpenSTAAD object variable.
Dim objOpenSTAAD As Output
'Declare variable for storing the function results.
Dim pnLoadCount As Integer
'Run an instance of OpenSTAAD and open STAAD Example No. 9 (US).
Set objOpenSTAAD = CreateObject("OpenSTAAD.Output.1")
objOpenSTAAD.SelectSTAADFile "C:\SPRO2004\STAAD\Examp\US\EXAMP09.std"
'Retrieve the number of joint loads for node 11, load case 2 and store the
'result in the variable pnLoadCount.
objOpenSTAAD.GetJointLoadCountOnNode 11, 2, pnLoadCount
'Close the STAAD file and release the handles to the OpenSTAAD library.
objOpenSTAAD.CloseSTAADFile
Set objOpenSTAAD = Nothing
End Sub
See Also
GetJointLoadValueOnNode
GetJointLoadValueOnNode
VB Syntax
integer GetJointLoadValueOnNode (long nNodeNo, long nLC, long nIndex, double pdValues)
Parameters
nNodeNo
A long variable greater than or equal to one which specifies the node number for which the joint load values are to be obtained by the function.
nLC
A long variable greater than or equal to one which specifies the load case
Page 13 of 42Loads Functions
6/18/2011file://C:\Users\MICHELLE\AppData\Local\Temp\~hh35A.htm
number for which the joint load values are to be obtained by the function.
nIndex
A long variable which specifies the index number of the load within the particular load case for which the joint load values are to be obtained by the function.
pdValues
An array of 6 double values used by the function to store the joint load values.
Remarks
This function retrieves the joint load values for a given node, load case, and load. It returns 6 values (Fx, Fy, Fz, Mx, My, and Mz) and stores them in an array variable name passed to it as a parameter.
The joint load values will be stored in the pdValues array in the following order:
pdValues (0) = Fx
pdValues (1) = Fy
pdValues (2) = Fz
pdValues (3) = Mx
pdValues (4) = My
pdValues (5) = Mz
All values are given in units of kips and inches.
Example
'This code snippet retrieves the joint load values for node 22, load case 2, index 1.
Sub GetJointLoadValueOnNode()
'Declare OpenSTAAD object variable.
Dim objOpenSTAAD As Output
'Declare an array for storing the function results.
Dim pdValues(1 To 6) As Double
'Run an instance of OpenSTAAD and open STAAD Example No. 9 (US).
Set objOpenSTAAD = CreateObject("OpenSTAAD.Output.1")
Page 14 of 42Loads Functions
6/18/2011file://C:\Users\MICHELLE\AppData\Local\Temp\~hh35A.htm
objOpenSTAAD.SelectSTAADFile "C:\SPRO2004\STAAD\Examp\US\EXAMP09.std"
'Retrieve the joint load values for node 22, load case 2, index 1 and store the
'results in the variable pdValues.
objOpenSTAAD.GetJointLoadValueOnNode 22, 2, 1, pdValues(1)
'Close the STAAD file and release the handles to the OpenSTAAD library.
objOpenSTAAD.CloseSTAADFile
Set objOpenSTAAD = Nothing
End Sub
See Also
GetJointLoadCountOnNode
GetUDLCountOnMember
VB Syntax
integer GetUDLCountOnMember (long nMemberNo, long nLC, integer pnLoadCount)
Parameters
nMemberNo
A long variable greater than or equal to one which specifies the member number for which the uniform distributed load count is to be obtained by the function.
nLC
A long variable greater than or equal to one which specifies the load case number for which the uniform distributed load count is to be obtained by the function.
pnLoadCount
An integer variable used by the function to store the number of uniform distributed loads.
Remarks
This function retrieves the number of uniform distributed loads for a given member and load case.
Page 15 of 42Loads Functions
6/18/2011file://C:\Users\MICHELLE\AppData\Local\Temp\~hh35A.htm
Example
'This code snippet retrieves the number of uniform distributed loads for member 7, load case 1.
Sub GetUDLCountOnMember()
'Declare OpenSTAAD object variable.
Dim objOpenSTAAD As Output
'Declare variable for storing the function results.
Dim pnLoadCount As Integer
'Run an instance of OpenSTAAD and open STAAD Example No. 3 (US).
Set objOpenSTAAD = CreateObject("OpenSTAAD.Output.1")
objOpenSTAAD.SelectSTAADFile "C:\SPRO2004\STAAD\Examp\US\EXAMP03.std"
'Retrieve the number of uniform distributed loads for member 7, load case 1 and
'store the result in the variable pnLoadCount.
objOpenSTAAD.GetUDLCountOnMember 7, 1, pnLoadCount
'Close the STAAD file and release the handles to the OpenSTAAD library.
objOpenSTAAD.CloseSTAADFile
Set objOpenSTAAD = Nothing
End Sub
See Also
GetUDLValuesOnMember
GetUDLValuesOnMember
VB Syntax
integer GetUDLValuesOnMember (long nMemberNo, long nLC, long nIndex, double pdIntensity, double pdStartPos, double pdEndPos, integer pnDirection)
Parameters
nMemberNo
A long variable greater than or equal to one which specifies the member number
Page 16 of 42Loads Functions
6/18/2011file://C:\Users\MICHELLE\AppData\Local\Temp\~hh35A.htm
for which the uniform distributed load values are to be obtained by the function.
nLC
A long variable greater than or equal to one which specifies the load case number for which the uniform distributed load values are to be obtained by the function.
nIndex
A long variable which specifies the index number of the load within the particular load case for which the uniform distributed load values are to be obtained by the function.
pdIntensity
A double variable used by the function to store the intensity of the uniform distributed load.
pdStartPos
A double variable used by the function to store the distance from the start of the specified member to the start of the load.
pdEndPos
A double variable used by the function to store the distance from the start of the specified member to the end of the load.
pnDirection
An integer variable used by the function to store the direction of the uniform distributed load.
Remarks
This function retrieves the uniform distributed load values for a given member, load case, and load. The function returns an integer number between 0 and 8 corresponding to the direction of the uniform distributed load and stores it in the pnDirection variable.
0 = Local X 5 = Global Z 1 = Local Y 6 = Proj X 2 = Local Z 7 = Proj Y 3 = Global X 8 = Proj Z 4 = Global Y
Example
'This code snippet retrieves the uniform distributed load values for member 5, 'load case 1, index 1.
Page 17 of 42Loads Functions
6/18/2011file://C:\Users\MICHELLE\AppData\Local\Temp\~hh35A.htm
Sub GetUDLValuesOnMember()
'Declare OpenSTAAD object variable.
Dim objOpenSTAAD As Output
'Declare variables for storing the function results.
Dim pdIntensity As Double
Dim pdStartPos As Double
Dim pdEndPos As Double
Dim pnDirection As Integer
'Run an instance of OpenSTAAD and open STAAD Example No. 22 (US).
Set objOpenSTAAD = CreateObject("OpenSTAAD.Output.1")
objOpenSTAAD.SelectSTAADFile "C:\SPRO2004\STAAD\Examp\US\EXAMP22.std"
'Retrieve the uniform distributed load values for member 5, load case 1, index 1
'and store the results in the variables pdIntensity, pdStartPos, pdEndPos, and pnDirection.
objOpenSTAAD.GetUDLValuesOnMember 5, 1, 1, pdIntensity, pdStartPos, _
pdEndPos, pnDirection
'Close the STAAD file and release the handles to the OpenSTAAD library.
objOpenSTAAD.CloseSTAADFile
Set objOpenSTAAD = Nothing
End Sub
See Also
GetUDLCountOnMember
GetTrapLoadCountOnMember
VB Syntax
integer GetTrapLoadCountOnMember (long nMemberNo, long nLC, integer pnLoadCount)
Parameters
Page 18 of 42Loads Functions
6/18/2011file://C:\Users\MICHELLE\AppData\Local\Temp\~hh35A.htm
nMemberNo
A long variable greater than or equal to one which specifies the member number for which the trapezoidal load count is to be obtained by the function.
nLC
A long variable greater than or equal to one which specifies the load case number for which the trapezoidal load count is to be obtained by the function.
pnLoadCount
An integer variable used by the function to store the number of trapezoidal loads.
Remarks
This function retrieves the number of trapezoidal loads for a given member and load case.
See Also
GetTrapLoadValuesOnMember
GetTrapLoadValuesOnMember
VB Syntax
integer GetTrapLoadValuesOnMember (long nMemberNo, long nLC, long nIndex, double pdStartIntensity, double pdEndIntensity, double pdStartPos, double pdEndPos, integer pnDirection)
Parameters
nMemberNo
A long variable greater than or equal to one which specifies the member number for which the trapezoidal load values are to be obtained by the function.
nLC
A long variable greater than or equal to one which specifies the load case number for which the trapezoidal load values are to be obtained by the function.
nIndex
A long variable which specifies the index number of the load within the particular load case for which the trapezoidal load values are to be obtained by the function.
pdStartIntensity
Page 19 of 42Loads Functions
6/18/2011file://C:\Users\MICHELLE\AppData\Local\Temp\~hh35A.htm
A double variable used by the function to store the intensity at the start of the trapezoidal load.
pdEndIntensity
A double variable used by the function to store the intensity at the end of the trapezoidal load.
pdStartPos
A double variable used by the function to store the distance from the start of the specified member to the start of the load.
pdEndPos
A double variable used by the function to store the distance from the start of the specified member to the end of the load.
pnDirection
An integer variable used by the function to store the direction of the trapezoidal load.
Remarks
This function retrieves the trapezoidal load values for a given member, load case, and load. The function returns an integer number between 0 and 8 corresponding to the direction of the trapezoidal load and stores it in the pnDirection variable.
0 = Local X 5 = Global Z 1 = Local Y 6 = Proj X 2 = Local Z 7 = Proj Y 3 = Global X 8 = Proj Z 4 = Global Y
See Also
GetTrapLoadCountOnMember
GetConcLoadCountOnMember
VB Syntax
integer GetConcLoadCountOnMember (long nMemberNo, long nLC, integer pnLoadCount)
Parameters
nMemberNo
Page 20 of 42Loads Functions
6/18/2011file://C:\Users\MICHELLE\AppData\Local\Temp\~hh35A.htm
A long variable greater than or equal to one which specifies the member number for which the concentrated force load count is to be obtained by the function.
nLC
A long variable greater than or equal to one which specifies the load case number for which the concentrated force load count is to be obtained by the function.
pnLoadCount
An integer variable used by the function to store the number of concentrated force loads.
Remarks
This function retrieves the number of concentrated force loads for a given member and load case.
Example
'This code snippet retrieves the number of concentrated force loads for member 5, load case 1.
Sub GetConcLoadCountOnMember()
'Declare OpenSTAAD object variable.
Dim objOpenSTAAD As Output
'Declare variable for storing the function results.
Dim pnLoadCount As Integer
'Run an instance of OpenSTAAD and open STAAD Example No. 11 (US).
Set objOpenSTAAD = CreateObject("OpenSTAAD.Output.1")
objOpenSTAAD.SelectSTAADFile "C:\SPRO2004\STAAD\Examp\US\EXAMP11.std"
'Retrieve the number of concentrated force loads for member 5, load case 1 and
'store the result in the variable pnLoadCount.
objOpenSTAAD.GetConcLoadCountOnMember 5, 1, pnLoadCount
'Close the STAAD file and release the handles to the OpenSTAAD library.
objOpenSTAAD.CloseSTAADFile
Set objOpenSTAAD = Nothing
Page 21 of 42Loads Functions
6/18/2011file://C:\Users\MICHELLE\AppData\Local\Temp\~hh35A.htm
End Sub
See Also
GetConcLoadValueOnMember
GetConcLoadValueOnMember
VB Syntax
integer GetConcLoadValueOnMember (long nMemberNo, long nLC, long nIndex, double pdIntensity, double pdDistance, integer pnDirection)
Parameters
nMemberNo
A long variable greater than or equal to one which specifies the member number for which the concentrated force load values are to be obtained by the function.
nLC
A long variable greater than or equal to one which specifies the load case number for which the concentrated force load values are to be obtained by the function.
nIndex
A long variable which specifies the index number of the load within the particular load case for which the concentrated force load values are to be obtained.
pdIntensity
A double variable used by the function to store the intensity of the concentrated force load.
pdDistance
A double variable used by the function to store the distance from the start of the specified member to the point at which the concentrated force load is applied .
pnDirection
An integer variable used by the function to store the direction of the concentrated force load.
Remarks
This function retrieves the concentrated force load values for a given member, load case, and load. The function returns an integer number between 0 and 8
Page 22 of 42Loads Functions
6/18/2011file://C:\Users\MICHELLE\AppData\Local\Temp\~hh35A.htm
corresponding to the direction of the concentrated force load and stores it in the pnDirection variable.
0 = Local X 5 = Global Z 1 = Local Y 6 = Proj X 2 = Local Z 7 = Proj Y 3 = Global X 8 = Proj Z 4 = Global Y
Example
'This code snippet retrieves the concentrated force load values for member 5, load case 1, index 1.
Sub GetConcLoadValueOnMember()
'Declare OpenSTAAD object variable.
Dim objOpenSTAAD As Output
'Declare variables for storing the function results.
Dim pdIntensity As Double
Dim pdDistance As Double
Dim pnDirection As Integer
'Run an instance of OpenSTAAD and open STAAD Example No. 11 (US).
Set objOpenSTAAD = CreateObject("OpenSTAAD.Output.1")
objOpenSTAAD.SelectSTAADFile "C:\SPRO2004\STAAD\Examp\US\EXAMP11.std"
'Retrieve the concentrated force load values for member 5, load case 1, index 1
'and store the results in the variables pdIntensity, pdDistance, and 'pnDirection.
objOpenSTAAD.GetConcLoadValueOnMember 5, 1, 1, pdIntensity, _
pdDistance, pnDirection
'Close the STAAD file and release the handles to the OpenSTAAD library.
objOpenSTAAD.CloseSTAADFile
Set objOpenSTAAD = Nothing
End Sub
See Also
Page 23 of 42Loads Functions
6/18/2011file://C:\Users\MICHELLE\AppData\Local\Temp\~hh35A.htm
GetConcLoadCountOnMember
GetConcMomentCountOnMember
VB Syntax
integer GetConcMomentCountOnMember (long nMemberNo, long nLC, integer pnLoadCount)
Parameters
nMemberNo
A long variable greater than or equal to one which specifies the member number for which the concentrated moment load count is to be obtained by the function.
nLC
A long variable greater than or equal to one which specifies the load case number for which the concentrated moment load count is to be obtained by the function.
pnLoadCount
An integer variable used by the function to store the number of concentrated moment loads.
Remarks
This function retrieves the number of concentrated moment loads for a given member and load case.
See Also
GetConcMomentValueOnMember
GetConcMomentValueOnMember
VB Syntax
integer GetConcMomentValueOnMember (long nMemberNo, long nLC, long nIndex, double pdIntensity, double pdDistance, integer pnDirection)
Parameters
nMemberNo
A long variable greater than or equal to one which specifies the member number for which the concentrated moment load values are to be obtained by the function.
Page 24 of 42Loads Functions
6/18/2011file://C:\Users\MICHELLE\AppData\Local\Temp\~hh35A.htm
nLC
A long variable greater than or equal to one which specifies the load case number for which the concentrated moment load values are to be obtained by the function.
nIndex
A long variable which specifies the index number of the load within the particular load case for which the concentrated moment load values are to be obtained.
pdIntensity
A double variable used by the function to store the intensity of the concentrated moment load.
pdDistance
A double variable used by the function to store the distance from the start of the specified member to the point at which the concentrated moment load is applied.
pnDirection
An integer variable used by the function to store the direction of the concentrated moment load.
Remarks
This function retrieves the concentrated moment load values for a given member, load case, and load. The function returns an integer number between 0 and 8 corresponding to the direction of the concentrated moment load and stores it in the pnDirection variable.
0 = Local X 5 = Global Z 1 = Local Y 6 = Proj X 2 = Local Z 7 = Proj Y 3 = Global X 8 = Proj Z 4 = Global Y
See Also
GetConcMomentCountOnMember
GetLinearLoadCountOnMember
VB Syntax
integer GetLinearLoadCountOnMember (long nMemberNo, long nLC, integer pnLoadCount)
Page 25 of 42Loads Functions
6/18/2011file://C:\Users\MICHELLE\AppData\Local\Temp\~hh35A.htm
Parameters
nMemberNo
A long variable greater than or equal to one which specifies the member number for which the linear load count is to be obtained by the function.
nLC
A long variable greater than or equal to one which specifies the load case number for which the linear load count is to be obtained by the function.
pnLoadCount
An integer variable used by the function to store the number of linear loads.
Remarks
This function retrieves the number of linear loads for a given member and load case.
See Also
GetLinLoadValuesOnMember
GetLinLoadValuesOnMember
VB Syntax
integer GetLinLoadValuesOnMember (long nMemberNo, long nLC, long nIndex, double pdStartIntensity, double pdEndIntensity, double pdMidIntensity, integer pnIsTriangular, integer pnDirection)
Parameters
nMemberNo
A long variable greater than or equal to one which specifies the member number for which the linear varying load values are to be obtained by the function.
nLC
A long variable greater than or equal to one which specifies the load case number for which the linear varying load values are to be obtained by the function.
nIndex
A long variable which specifies the index number of the load within the particular load case for which the linear varying load values are to be obtained.
Page 26 of 42Loads Functions
6/18/2011file://C:\Users\MICHELLE\AppData\Local\Temp\~hh35A.htm
pdStartIntensity
A double variable used by the function to store the intensity at the start of the linear varying load.
pdEndIntensity
A double variable used by the function to store the intensity at the end of the linear varying load.
pdMidIntensity
A double variable used by the function to store the intensity at the middle of the linear varying load.
pnIsTriangular
An integer variable used by the function to store whether the load is triangular. A value of 0 indicates the load is linearly increasing or decreasing and a value of 1 indicates the load is triangular.
pnDirection
An integer variable used by the function to store the direction of the linear varying load.
Remarks
This function retrieves the linear varying load values for a given member, load case, and load. If the load is triangular, the function returns an integer value of 1 for pnIsTriangular and returns a value for pdMidIntensity. If the load is not triangular, the function returns an integer value of 0 for pnIsTriangular and returns values for pdStartIntensity and pdEndIntensity. In addition, the function returns an integer number between 0 and 8 corresponding to the direction of the linear varying load and stores it in the pnDirection variable.
0 = Local X 5 = Global Z 1 = Local Y 6 = Proj X 2 = Local Z 7 = Proj Y 3 = Global X 8 = Proj Z 4 = Global Y
See Also
GetLinearLoadCountOnMember
GetUniformMomentCountOnMember
VB Syntax
Page 27 of 42Loads Functions
6/18/2011file://C:\Users\MICHELLE\AppData\Local\Temp\~hh35A.htm
integer GetUniformMomentCountOnMember (long nMemberNo, long nLC, integer pnLoadCount)
Parameters
nMemberNo
A long variable greater than or equal to one which specifies the member number for which the uniform moment load count is to be obtained by the function.
nLC
A long variable greater than or equal to one which specifies the load case number for which the uniform moment load count is to be obtained by the function.
pnLoadCount
An integer variable used by the function to store the number of uniform moment loads.
Remarks
This function retrieves the number of uniform moment loads for a given member and load case.
See Also
GetUniformMomentValuesOnMember
GetUniformMomentValuesOnMember
VB Syntax
integer GetUniformMomentValuesOnMember (long nMemberNo, long nLC, long nIndex, double pdIntensity, double pdStartPos, double pdEndPos, integer pnDirection)
Parameters
nMemberNo
A long variable greater than or equal to one which specifies the member number for which the uniform moment load values are to be obtained by the function.
nLC
A long variable greater than or equal to one which specifies the load case number for which the uniform moment load values are to be obtained by the function.
Page 28 of 42Loads Functions
6/18/2011file://C:\Users\MICHELLE\AppData\Local\Temp\~hh35A.htm
nIndex
A long variable which specifies the index number of the load within the particular load case for which the uniform moment load values are to be obtained by the function.
pdIntensity
A double variable used by the function to store the intensity of the uniform moment load.
pdStartPos
A double variable used by the function to store the distance from the start of the specified member to the start of the load.
pdEndPos
A double variable used by the function to store the distance from the start of the specified member to the end of the load.
pnDirection
An integer variable used by the function to store the direction of the uniform moment load.
Remarks
This function retrieves the uniform moment load values for a given member, load case, and load. The function returns an integer number between 0 and 8 corresponding to the direction of the uniform moment load and stores it in the pnDirection variable.
0 = Local X 5 = Global Z 1 = Local Y 6 = Proj X 2 = Local Z 7 = Proj Y 3 = Global X 8 = Proj Z 4 = Global Y
See Also
GetUniformMomentCountOnMember
GetPressureLoadCountOnPlate
VB Syntax
integer GetPressureLoadCountOnPlate (long nPlateNo, long nLC, integer pnLoadCount)
Page 29 of 42Loads Functions
6/18/2011file://C:\Users\MICHELLE\AppData\Local\Temp\~hh35A.htm
Parameters
nPlateNo
A long variable greater than or equal to one which specifies the plate number for which the pressure load count is to be obtained by the function.
nLC
A long variable greater than or equal to one which specifies the load case number for which the pressure load count is to be obtained by the function.
pnLoadCount
An integer variable used by the function to store the number of pressure loads.
Remarks
This function retrieves the number of pressure loads for a given plate and load case.
Example
'This code snippet retrieves the number of pressure loads for plate 471, load case 1.
Sub GetPressureLoadCountOnPlate()
'Declare OpenSTAAD object variable.
Dim objOpenSTAAD As Output
'Declare variable for storing the function results.
Dim pnLoadCount As Integer
'Run an instance of OpenSTAAD and open STAAD Example No. 28 (US).
Set objOpenSTAAD = CreateObject("OpenSTAAD.Output.1")
objOpenSTAAD.SelectSTAADFile "C:\SPRO2004\STAAD\Examp\US\EXAMP28.std"
'Retrieve the number of pressure loads for plate 471, load case 1 and store the
'result in the variable pnLoadCount.
objOpenSTAAD.GetPressureLoadCountOnPlate 471, 1, pnLoadCount
'Close the STAAD file and release the handles to the OpenSTAAD library.
objOpenSTAAD.CloseSTAADFile
Page 30 of 42Loads Functions
6/18/2011file://C:\Users\MICHELLE\AppData\Local\Temp\~hh35A.htm
Set objOpenSTAAD = Nothing
End Sub
See Also
GetPressureLoadOnPlate
GetPressureLoadOnPlate
VB Syntax
integer GetPressureLoadOnPlate (long nPlateNo, long nLC, long nIndex, integer pnWholeArea, integer pnConcLoad, double pdIntensity, double pdX1, double pdX2, double pdY1, double pdY2, integer pnDirection)
Parameters
nPlateNo
A long variable greater than or equal to one which specifies the plate number for which the pressure load values are to be obtained by the function.
nLC
A long variable greater than or equal to one which specifies the load case number for which the pressure load values are to be obtained by the function.
nIndex
A long variable which specifies the index number of the load within the particular load case for which the pressure load values are to be obtained by the function.
pnWholeArea
An integer variable used by the function to store whether the pressure load is applied to the entire plate. A value of 0 indicates the pressure load is applied to a specified portion of the plate and a value of 1 indicates the pressure load is applied to the entire plate.
pnConcLoad
An integer variable used by the function to store whether the pressure load is concentrated and applied to a specified point on the plate. A value of 0 indicates the pressure load is not applied to a specified point on the plate and a value of 1 indicates the pressure load is applied to a specified point on the plate.
pdIntensity
A double variable used by the function to store the intensity of the pressure load.
Page 31 of 42Loads Functions
6/18/2011file://C:\Users\MICHELLE\AppData\Local\Temp\~hh35A.htm
pdX1
A double variable used by the function to store the first coordinate position on the local X axis that specifies the rectangular area on which the pressure load is applied.
pdX2
A double variable used by the function to store the second coordinate position on the local X axis that specifies the rectangular area on which the pressure load is applied.
pdY1
A double variable used by the function to store the first coordinate position on the local Y axis that specifies the rectangular area on which the pressure load is applied.
pdY2
A double variable used by the function to store the second coordinate position on the local Y axis that specifies the rectangular area on which the pressure load is applied.
pnDirection
An integer variable used by the function to store the direction of the pressure load.
Remarks
This function retrieves the pressure load values for a given plate, load case, and load. If the pressure load is applied to the whole plate, a value of 1 is returned and stored in pnWholeArea. If the pressure load is applied to a specified portion of the plate, a value of 0 is returned and stored in pnWholeArea. Additionally, the coordinate points defining the specified portion that the pressure load is applied to are stored in the variables pdX1, pdX2, pdY1, and pdY2.
If the pressure load is concentrated and applied to a specified point on the plate, a value of 1 is returned and stored in pnConcLoad. Additionally, the coordinate points defining the specified point that the pressure load is applied to are stored in the variables pdX1 and pdY1.
In addition, the function returns an integer number between 2 and 5 corresponding to the direction of the pressure load and stores it in the pnDirection variable.
2 = Local Z 3 = Global X 4 = Global Y
Page 32 of 42Loads Functions
6/18/2011file://C:\Users\MICHELLE\AppData\Local\Temp\~hh35A.htm
5 = Global Z Example
'This code snippet retrieves the pressure load values for plate 471, load case 1, index 1.
Sub GetPressureLoadOnPlate()
'Declare OpenSTAAD object variable.
Dim objOpenSTAAD As Output
'Declare variables for storing the function results.
Dim pnWholeArea As Integer
Dim pnConcLoad As Integer
Dim pdIntensity As Double
Dim pdX1 As Double
Dim pdX2 As Double
Dim pdY1 As Double
Dim pdY2 As Double
Dim pnDirection As Integer
'Run an instance of OpenSTAAD and open STAAD Example No. 28 (US).
Set objOpenSTAAD = CreateObject("OpenSTAAD.Output.1")
objOpenSTAAD.SelectSTAADFile "C:\SPRO2004\STAAD\Examp\US\EXAMP28.std"
'Retrieve the pressure load values for plate 471, load case 1, index 1 and store
'the results in the variables pnWholeArea, pnConcLoad, pdIntensity, pdX1, pdX2,
'pdY1, pdY2, and pnDirection.
objOpenSTAAD.GetPressureLoadOnPlate 471, 1, 1, pnWholeArea, _
pnConcLoad, pdIntensity, pdX1, pdX2, pdY1, pdY2, pnDirection
'Close the STAAD file and release the handles to the OpenSTAAD library.
objOpenSTAAD.CloseSTAADFile
Page 33 of 42Loads Functions
6/18/2011file://C:\Users\MICHELLE\AppData\Local\Temp\~hh35A.htm
Set objOpenSTAAD = Nothing
End Sub
See Also
GetPressureLoadCountOnPlate
GetTrapezoidalPressureLoadCountOnPlate
VB Syntax
integer GetTrapezoidalPressureLoadCountOnPlate (long nPlateNo, long nLC, integer pnLoadCount)
Parameters
nPlateNo
A long variable greater than or equal to one which specifies the plate number for which the trapezoidal pressure load count is to be obtained by the function.
nLC
A long variable greater than or equal to one which specifies the load case number for which the trapezoidal pressure load count is to be obtained by the function.
pnLoadCount
An integer variable used by the function to store the number of trapezoidal pressure loads.
Remarks
This function retrieves the number of trapezoidal pressure loads for a given plate and load case.
See Also
GetTrapezoidalPressureLoadOnPlate
GetTrapezoidalPressureLoadOnPlate
VB Syntax
integer GetTrapezoidalPressureLoadOnPlate (long nPlateNo, long nLC, long nIndex, double pdStartIntensity, double pdEndIntensity, integer pnDirection)
Parameters
Page 34 of 42Loads Functions
6/18/2011file://C:\Users\MICHELLE\AppData\Local\Temp\~hh35A.htm
nPlateNo
A long variable greater than or equal to one which specifies the plate number for which the trapezoidal pressure load values are to be obtained by the function.
nLC
A long variable greater than or equal to one which specifies the load case number for which the trapezoidal pressure load values are to be obtained by the function.
nIndex
A long variable which specifies the index number of the load within the particular load case for which the trapezoidal pressure load values are to be obtained by the function.
pdStartIntensity
A double variable used by the function to store the intensity at the start of the trapezoidal pressure load.
pdEndIntensity
A double variable used by the function to store the intensity at the end of the trapezoidal pressure load.
pnDirection
An integer variable used by the function to store the direction of the trapezoidal pressure load.
Remarks
This function retrieves the trapezoidal pressure load values for a given plate, load case, and load. The function returns an integer number between 0 and 8 corresponding to the direction of the trapezoidal pressure load and stores it in the pnDirection variable.
See Also
GetTrapezoidalPressureLoadCountOnPlate
GetTemperatureLoadCount
VB Syntax
integer GetTemperatureLoadCount (long nObjectNo, long nLC, integer pnLoadCount)
Parameters
Page 35 of 42Loads Functions
6/18/2011file://C:\Users\MICHELLE\AppData\Local\Temp\~hh35A.htm
nObjectNo
A long variable greater than or equal to one which specifies the object (member or element) number for which the temperature load count is to be obtained by the function.
nLC
A long variable greater than or equal to one which specifies the load case number for which the temperature load count is to be obtained by the function.
pnLoadCount
An integer variable used by the function to store the number of temperature loads.
Remarks
This function retrieves the number of temperature loads for a given object (member or element) and load case.
Example
'This code snippet retrieves the number of temperature loads for member 1, load case 1.
Sub GetTemperatureLoadCount()
'Declare OpenSTAAD object variable.
Dim objOpenSTAAD As Output
'Declare variable for storing the function results.
Dim pnLoadCount As Integer
'Run an instance of OpenSTAAD and open STAAD Verification No. 11 (US).
Set objOpenSTAAD = CreateObject("OpenSTAAD.Output.1")
objOpenSTAAD.SelectSTAADFile "C:\SPRO2004\STAAD\Examp\US\VER11.std"
'Retrieve the number of temperature loads for member 1, load case 1 and store
'the result in the variable pnLoadCount.
objOpenSTAAD.GetTemperatureLoadCount 1, 1, pnLoadCount
'Close the STAAD file and release the handles to the OpenSTAAD library.
objOpenSTAAD.CloseSTAADFile
Page 36 of 42Loads Functions
6/18/2011file://C:\Users\MICHELLE\AppData\Local\Temp\~hh35A.htm
Set objOpenSTAAD = Nothing
End Sub
See Also
GetTemperatureLoad
GetTemperatureLoad
VB Syntax
integer GetTemperatureLoad (long nObjectNo, long nLC, long nIndex, integer pnTempType, double pdTempDeltaForAxialElong, double pdTempDeltaTopBot, double pdTempDeltaSide, double pdStrain)
Parameters
nObjectNo
A long variable greater than or equal to one which specifies the object (member or element) number for which the temperature load values are to be obtained by the function.
nLC
A long variable greater than or equal to one which specifies the load case number for which the temperature load values are to be obtained by the function.
nIndex
A long variable which specifies the index number of the load within the particular load case for which the temperature load values are to be obtained by the function.
pnTempType
An integer variable used by the function to store the type of the load. A value of 0 indicates the load is a temperature load, a value of 1 indicates the load is a strain load, and a value of 2 indicates the load is a strain rate load.
pdTempDeltaForAxialElong
A double variable used by the function to store the change in temperature which will cause axial elongation in members or uniform volume expansion in plates and solids.
pdTempDeltaTopBot
A double variable used by the function to store the temperature differential from the top to the bottom of the specified member or plate.
Page 37 of 42Loads Functions
6/18/2011file://C:\Users\MICHELLE\AppData\Local\Temp\~hh35A.htm
pdTempDeltaSide
A double variable used by the function to store the temperature differential from side to side of the specified member.
pdStrain
A double variable used by the function to store the strain or strain rate.
Remarks
This function retrieves the temperature load values for a given object (member or element), load case, and load. The function returns an integer between 0 and 2 depending on the type of the temperature load and stores it in the pnTempTypevariable.
0 = Temp 1 = Strain (Only for Members) 2 = Strain Rate (Only for Members)
If the temperature type is 0, the function will return values for pdTempDeltaForAxialElong, pdTempDeltaTopBot, and pdTempDeltaSide. If the temperature type is 1 or 2, the function will only return a value for pdStrain.
Example
'This code snippet retrieves the temperature load values for member 1, load case 1, load 1.
Sub GetTemperatureLoad()
'Declare OpenSTAAD object variable.
Dim objOpenSTAAD As Output
'Declare variables for storing the function results.
Dim pnTempType As Integer
Dim pdTempDeltaForAxialElong As Double
Dim pdTempDeltaTopBot As Double
Dim pdTempDeltaSide As Double
Dim pdStrain As Double
'Run an instance of OpenSTAAD and open STAAD Verification No. 11 (US).
Set objOpenSTAAD = CreateObject("OpenSTAAD.Output.1")
objOpenSTAAD.SelectSTAADFile "C:\SPRO2004
Page 38 of 42Loads Functions
6/18/2011file://C:\Users\MICHELLE\AppData\Local\Temp\~hh35A.htm
\STAAD\Examp\US\VER11.std"
'Retrieve the temperature load values for member 1, load case 1, index 1 and
'store the results in the variables pnTempType, pdTempDeltaForAxialElong,
'pdTempDeltaTopBot, and pdStrain.
objOpenSTAAD.GetTemperatureLoad 1, 1, 1, pnTempType, _
pdTempDeltaForAxialElong, pdTempDeltaTopBot, pdTempDeltaSide, pdStrain
'Close the STAAD file and release the handles to the OpenSTAAD library.
objOpenSTAAD.CloseSTAADFile
Set objOpenSTAAD = Nothing
End Sub
See Also
GetTemperatureLoadCount
GetSelfweightCountInLoadCase
VB Syntax
integer GetSelfweightCountInLoadCase (long nLC, integer pnSelfweights)
Parameters
nLC
A long variable greater than or equal to one which specifies the load case number for which the selfweight load count is to be obtained by the function.
pnSelfweights
An integer variable used by the function to store the number of selftweight loads in the specified load case.
Remarks
This function retrieves the number of selfweight loads in a given load case.
Example
'This code snippet retrieves the number of selfweight loads in load case 1.
Sub GetSelfweightCountInLoadCase()
Page 39 of 42Loads Functions
6/18/2011file://C:\Users\MICHELLE\AppData\Local\Temp\~hh35A.htm
'Declare OpenSTAAD object variable.
Dim objOpenSTAAD As Output
'Declare variable for storing the function results.
Dim pnSelfweights As Integer
'Run an instance of OpenSTAAD and open STAAD Example No. 3 (US).
Set objOpenSTAAD = CreateObject("OpenSTAAD.Output.1")
objOpenSTAAD.SelectSTAADFile "C:\SPRO2004\STAAD\Examp\US\EXAMP03.std"
'Retrieve the number of selfweight loads in load case 1 and store the results in pnSelfweights.
objOpenSTAAD.GetSelfweightCountInLoadCase 1, pnSelfweights
'Close the STAAD file and release the handles to the OpenSTAAD library.
objOpenSTAAD.CloseSTAADFile
Set objOpenSTAAD = Nothing
End Sub
See Also
GetSelfweightValuesInLoadCase
GetSelfweightValuesInLoadCase
VB Syntax
integer GetSelfweightValuesInLoadCase (long nLC, long nIndex, integer pnDirection, double pdFactor)
Parameters
nLC
A long variable greater than or equal to one which specifies the load case number for which the selfweight load values are to be obtained by the function.
nIndex
A long variable which specifies the index number of the load within the particular load case for which the selfweight load values are to be obtained by the function.
Page 40 of 42Loads Functions
6/18/2011file://C:\Users\MICHELLE\AppData\Local\Temp\~hh35A.htm
pnDirection
An integer variable used by the function to store the direction of the selfweight load.
pdFactor
A double variable used by the function to store the factor of the selfweight load.
Remarks
This function retrieves the selfweight load values for a given load case and load. The function returns an integer number between 0 and 2 corresponding to the direction of the selfweight load and stores it in the pnDirection variable.
0 = Local X 1 = Local Y 2 = Local Z
Example
'This code snippet retrieves the selfweight load values for load case 1, index 1.
Sub GetSelfweightValuesInLoadCase()
'Declare OpenSTAAD object variable.
Dim objOpenSTAAD As Output
'Declare variables for storing the function results.
Dim pnDirection As Integer
Dim pdFactor As Double
'Run an instance of OpenSTAAD and open STAAD Example No. 3 (US).
Set objOpenSTAAD = CreateObject("OpenSTAAD.Output.1")
objOpenSTAAD.SelectSTAADFile "C:\SPRO2004\STAAD\Examp\US\EXAMP03.std"
'Retrieve selfweight load values for load case 1, index 1 and store the results
'in pnDirection and pdFactor.
objOpenSTAAD.GetSelfweightValuesInLoadCase 1, 1, pnDirection, pdFactor
'Close the STAAD file and release the handles to the OpenSTAAD library.
objOpenSTAAD.CloseSTAADFile
Page 41 of 42Loads Functions
6/18/2011file://C:\Users\MICHELLE\AppData\Local\Temp\~hh35A.htm
Set objOpenSTAAD = Nothing
End Sub
See Also
GetSelfweightCountInLoadCase
Page 42 of 42Loads Functions
6/18/2011file://C:\Users\MICHELLE\AppData\Local\Temp\~hh35A.htm