Top Banner

Click here to load reader

Staad Pro tips

Dec 27, 2015

ReportDownload

Documents

Staad pro tips. learn for FREE.latest instructions.

  • 24th May 2011

    STAAD.Pro Tips and Tricks

    Carlos Aguera

  • | 2

    The following are the topics to be covered in this workshop of STAAD.Pro Tips and Tricks

    1) Macros and OpenSTAAD

    2) Stage Construction

    3) Foundations

    4) Buckling Analysis

    5) Angle Profiles

    Agenda

  • | 4

    Objective To create a macro to review the results of a model and display the

    maximum displacement from a user selection of nodes.

    Create a VBA project

    Create and use an OpenSTAAD Object

    Test STAAD.Pro is open and a model loaded.

    Get analysis results from STAAD.Pro

    Display a dialog with results in STAAD.Pro

    1) Macro using OpenSTAAD and VBA

  • | 5

    What is OpenSTAAD?

    ASCII Input data (*.STD)

    Output data (*.ANL)

    Binary Results (*.BMD, REA, DSP..)

    Inside STAAD.Pro in a macro

    External using ANY suitable environment (but STAAD.Pro must be running locally in the background)

    OpenSTAAD

  • | 6

    To Create:- Menu, Edit>Create New VB Macro

    Menu, Edit>Edit Existing VB Macro

    To Use:- Menu, Tools>Configure User Tools

    Toolbar

    STAAD.Pro Macro GUI

  • | 7

    Start a new Project

    Open the STAAD example file, EXAMP08.STD

    Start a new VB Macro project from the menu Edit>Create New VB Macro

    Navigate to My Documents, enter the file name:- BE Together 2011.VBS and click New

  • | 8

    Create the macro

    'Create an instance of OpenSTAAD Object. Sub Main ()

    Dim oStd As Object

    Set oStd = GetObject(,"StaadPro.OpenSTAAD")

    ..

    Set oStd = Nothing

    Exit Sub

  • | 9

    Check your work, Test 1

    Add a break point by clicking on in the grey column to the right of the line:- Set oStd = Nothing

    Run the macro by clicking on the green arrow

  • | 10

    Check that a file is loaded

    Add the following after the line that creates the OpenSTAAD object:-

    Dim stdFile As String

    oStd.GetSTAADFile(stdFile,"TRUE")

    If stdFile = "" Then

    MsgBox "This macro can only be run with a valid STAAD file loaded.", vbOkOnly

    Set oStd = Nothing

    Exit Sub

    End If

    oStd.GetSTAADFile(stdFile,"TRUE") is the first use of the OpenSTAAD object created in the previous step.

  • | 11

    Check your work, Test 2

    Add a break point by clicking on in the grey column to the right of the line:- oStd.GetSTAADFile(stdFile, "TRUE")

    Run the macro by clicking on the green arrow

    Click on the Step Over icon on the toolbar and hover over the text stdFile. This should display the file name and path of the currently open STAAD file.

  • | 12

    Getting Load Case data

    Add the following after the End If test to see if a file is loaded:- Dim i as Integer

    Dim LCases As Integer

    Dim lstLoadNums() As Long

    Dim lstLoads() As String

    LCases = oStd.Load.GetPrimaryLoadCaseCount()

    ReDim lstLoadNums(LCases)

    ReDim lstLoads(LCases)

    oStd.Load.GetPrimaryLoadCaseNumbers lstLoadNums

    For i =0 To LCases-1

    lstLoads(i)= CStr(lstLoadNums(i)) &" : " & oStd.Load.GetLoadCaseTitle(lstLoadNums(i))

    Next i

  • | 13

    Add the following after the units:- Dim nResult As Integer

    Dim LCName As String

    Dim LoadCase As Long

    Then with the cursor located after these click on the Edit User Dialog icon on the toolbar to add a dialog

    Create a dialog to select a load case

  • | 14

    Add OK and Cancel buttons

    Add a text string, Double click on it and change the caption to Load Case

    Click on the >> button and change the caption of the dialog box to Select Load Case

    Click on the List box icon and add it onto the dialog box, resize it so that it better fits the space.

    Click on the Save and Exit Icon.

    Adding controls

  • | 15

    Note how the new commands have been added

    To display the load change:- ListBox 40,49,320,70,ListArray(),.ListBox1

    To ListBox 40,49,320,70,lstLoads(),.ListBox1

    Save and Run the macro:-

    Display the load case names

  • | 16

    To find out if a button was pressed change the line:- Dialog dlg

    To nResult = Dialog (dlg)

    Add the following immediately after:- If nResult -1 Then

    Set oStd = Nothing

    Exit Sub

    End If

    Handle a Cancel request

  • | 17

    If the cancel was not pressed, then the selected item in the list should be converted to the load case using the following:- LoadCase = lstLoadNums(dlg.ListBox1)

    LCName =lstLoads(dlg.ListBox1)

    Get the requested load case

  • | 18

    Dim NumSelectedNodes As Long

    Dim SelNodeArray() As Long

    NumSelectedNodes = oStd.Geometry.GetNoOfSelectedNodes ( )

    If NumSelectedNodes >0 Then

    ReDim SelNodeArray(NumSelectedNodes)

    oStd.Geometry.GetSelectedNodes ( SelNodeArray, 1)

    Else

    MsgBox Please Select Nodes, vbOkOnly

    Endif

    Get Selected Nodes

  • | 19

    Define the following variables after the check to make sure that there are indeed some nodes selected:- Dim j as Integer

    Dim NodeNo As Long

    Dim DisplArray(6) As Double

    Dim MaxDisplArray(6) As Double

    Dim NodeArray(6) As String

    Then.

    Get the results

  • | 20

    Add the following to get the displacement data:- For i=0 To NumSelectedNodes-1

    NodeNo = SelNodeArray(i)

    oStd.Output.GetNodeDisplacements (NodeNo, LoadCase, DisplArray())

    For j= 0 To 5

    If Abs(DisplArray(j)) > Abs(MaxDisplArray(j)) Then

    MaxDisplArray(j)= DisplArray(j)

    NodeArray(j)="N" & CStr(NodeNo)

    End If

    Next j

    Next i

    Get the results

  • | 21

    Dealing with units

    Add the following after the loop to build the name array Dim unit As Integer

    Dim DispLabel As String

    unit=oStd.GetBaseUnit

    Select Case unit

    Case 1

    DispLabel="in"

    Case 2

    DispLabel="met"

    Case Else

    DispLabel="???"

    End Select

  • | 22

    Create a new dialog box, dlg2, called Max Deflection

    Add an OK button and 14 text strings:- Text, "Load case:"

    Text, LCName

    Text,"X:, Text,"Y:, Text,"Z:"

    Text, CStr(MaxDisplArray(0)), Text, CStr(MaxDisplArray(1)), Text, CStr(MaxDisplArray(2))

    Text, X DispLabel, Text, Y DispLabel, Text, Z DispLabel

    Text, NodeArray(0), Text, NodeArray(1), Text, NodeArray(2)

    Display the result

  • | 23

    The dialog should be arranged thus:-

    Save and test the macro

    Display the result

  • | 24

    Click on the menu item Tools>Configure User Tools. Click on the icon New, and add the text Max Deflection to the

    name.

    Click on the button to the right of the Command string and navigate to the My Documents folder and select the BE Together macro

    Adding a Macro to your toolbar

  • | 25

    Sample

  • | 27

    Objective To create a model where the results of loading in 2 construction

    stages are combined

    Consider the model EXAMP08 constructed in 2 stages:-

    2) Stage Construction

  • | 28

    Stage 1 - Initial Stage 2 - Final

    Stages

  • | 29

    When considering stage construction, it is very important that the matrix for the initial model includes every DOF that will be active at some point.

    Each model/construction stage should be completed with an analysis and CHANGE command.

    Inactive members do not reduce the matrix size, but may leave nodes disconnected and warnings reported.

    Supports and releases can be changed for each stage

    With multiple models SET NL needs to be defined.

    Philosophy

  • | 30

    Objective To analyse a model built in 2 stages and combining the forces from

    both stages.

    Open file Examp08mod.STD

    Open the model in the Editor

    Run the analysis

    Review Output file Note warning messages

    View results in the Post-Processing Mode

    Example

  • | 31

    Load cases are unique in all models/stages, e.g. if load case 1 for say dead loads exists in the initial model, then it should not appear again in one of the other stages. An alternative load case number should be selected

    The GUI will display members which are INACTIVE as they may be active in some load cases, but not others.

    Notes

  • | 32

    If a self weight command is used in the different stages and the results combined, then this will include self weight on members in each of the stages. Consider the use of assigning self weight to only members added during that stage.

    The Member Query dialog does not display bending moments on members that are inactive in one or more load cases!

    Notes

  • | 34

    Objective To understand the methods available of accounting for a pad

    foundation as supports for a STAAD.Pro model

    Supports Point

    Traditional

    Spring

    Multi-linear spring

    Foundation

    Surface Elastic Mat

    Plate Mat

    STAAD.Foundation

    3) Foundation

  • | 35

    Basic Fixed, Pinned

    Spring Fixed But

    Multi-linear spring