OpenSTAAD V8i

Support.CreateSupportFixedBut

Creates fixed support with releases in specified directions or a spring support with spring constants in specified directions.

VB Syntax

Support.CreateSupportFixedBut ReleaseCodeArray, SpringConstantArray 

Where:

ReleaseCodeArray

Double array of six elements specifying releases in FX, FY, FZ, MX, MY, and MZ directions. Each element should have a value equal to 0.0 (Fixed) or 1.0 (Released).

SpringConstantArray

Double array of six elements specifying spring constants in FX, FY, FZ, MX, MY, and MZ directions.

Values should be in the current unit system.

Return Value

Long integer containing the reference number to the support created.

VB Example

Sub Main()
    Dim objOpenSTAAD As Object
    Dim stdFile As String
    
    'Launch OpenSTAAD Object
    Set objOpenSTAAD = GetObject(, "StaadPro.OpenSTAAD")

    'Load your STAAD file - make sure you have successfully run the file
    objOpenSTAAD.GetSTAADFile stdFile, "TRUE"
    If stdFile = "" Then
        MsgBox "This macro can only be run with a valid STAAD file loaded.", vbOkOnly
        Set objOpenSTAAD = Nothing
        Exit Sub
    End If

Dim SupNo As Long
Dim release(5) As Double
Dim spring(5) As Double

release (0) = 0.0 'FX
release (1) = 1.0 'FY
release (2) = 0.0 'FZ
release (3) = 0.0 'MX
release (4) = 0.0 'MY
release (5) = 0.0 'MZ

spring(0) = 0.0 'FX
spring(1) = 0.0 'FY
spring(2) = 0.0 'FZ
spring(3) = 0.0 'MX
spring(4) = 0.0 'MY
spring(5) = 0.0 'MZ

SupNo = objOpenSTAAD.Support.CreateSupportFixedBut (release, spring)

MsgBox Str$(SupNo)

Set objOpenSTAAD = Nothing

End Sub