Practice Workbook
This workbook is designed for use for Live instructor led training and for OnDemand training. The explanation,
demonstration, and narrative content are provided by the instructor in the classroom and in the OnDemand
eLearning version of this course available through Bentley LEARN (learn.bentley.com).
This exercise workbook is formatted for onscreen viewing using a PDF reader.
TRN020150-1/0001-PW01
3. Select the Base Unit tab in the Configure Program dialog. Then enter the following parameter:
6. Click on the (...) button and navigate to the location of the dataset. Then, click OK.
7. Click on the Next > button in the New dialog.
8. Click on the Finish button in the Where do you want to go? dialog.
9. Click on the Input Units icon tn the Structure toolbar.
10. Enter the following parameters in the Set Current Input Units dialog:
Initiate OpenSTAAD
Learn to create a new macro, initiate OpenSTAAD, and display the OpenSTAAD function in the Object Browser.
6. Right-click in the Macro Design Window and select Edit > References from the pop-up menu.
7. Check the STAADLibBentley (1.0) reference in the References dialog. Then, click OK.
8. Keep this model open for the next exercise.
2. Enter the following functions to determine the base units configuration that were specified in the STAAD.Pro Start Page.
Dim BaseUnit As Integer
BaseUnit = objSTAADGUI.GetBaseUnit
If BaseUnit = 1 Then
BaseLengthUnit = in
Else
BaseLengthUnit = m
End If
Note: If this function returns a value of 1, the units configuration in the main application is currently set to English, which would
correspond to inches and kilopounds. If this function returns a value of 2, the units configuration is currently set to Metric, which
would correspond to meters and kilonewtons.
3. Enter the following functions to determine the input length units that were specified in the STAAD.Pro main application:
Dim LengthUnit As Integer
LengthUnit = objSTAADGUI.GetInputUnitForLength
If LengthUnit = 0 Then
InputLengthUnit = "in"
ElseIf LengthUnit = 1 Then
InputLengthUnit = "ft"
ElseIf LengthUnit = 2 Then
InputLengthUnit = "ft"
ElseIf LengthUnit = 3 Then
InputLengthUnit = "cm"
ElseIf LengthUnit = 4 Then
InputLengthUnit = "m"
ElseIf LengthUnit = 5 Then
InputLengthUnit = "mm"
ElseIf LengthUnit = 6 Then
InputLengthUnit = "dm"
ElseIf LengthUnit = 7 Then
InputLengthUnit = "km"
End If
Then, click on the double right arrow button to enter the name of the dialog box.
5. Click on the Add Text icon in the UserDialog Editor. Click within the new dialog to define the text box location and then double-click within
the new text box.
6. Enter the following information into the Edit Text Properties dialog:
Quoted: (checked)
Click on the double right arrow button to enter the name of the field. Then, click Cancel.
Span Length:
Span Width:
Plate Thickness:
8. Click on the Add Text icon in the UserDialog Editor. Click within the new dialog to define the text location and then double-click within the
new text field.
9. Enter the following information into the Edit Text Properties dialog:
Caption: BaseLengthUnit
Quoted: (unchecked)
Click on the double right arrow button to enter the name of the field. Then, click Cancel.
10. Repeat this process to add the BaseLengthUnit and the InputLengthUnit variables adjacent to the appropriate fields:
11. Click on the Add TextBox icon in the UserDialog Editor. Click within the new dialog to define the text box location and then double-click
within the new text box.
12. Enter the following information into the Edit TextBox Properties dialog:
Field: nDivisions
Click on the double right arrow button to enter the name of the text box. Then, click Cancel.
13. Repeat this process to add the following text boxes to the dialog:
MaxHeight
MinHeight
SpanLength
SpanWidth
PlateThick
Note: The input variables in the Box Girder Variables dialog will be used to define the geometry of the parabolic box structure:
SpanWidth
engt
L
Span
MinHeight
MaxHeight
nDivisions = number of plates to be generated along each
side of the structure over the span length
Note: All of the variables used in this dialog, with the exception of the Plate Thickness, are interpreted by OpenSTAAD using the base
units configuration. The Plate Thickness, however, is interpreted using the current input unit for length.
14. Click on the Add OK Button icon in the New UserDialog Editor. Then, click within the new dialog to define the OK button.
15. Click on the Add Cancel Button icon in the New UserDialog Editor. Then, click within the new dialog to define the Cancel button.
16. Click on the Save and Edit icon in the New UserDialog Editor.
17. Delete the last line of this code (Dialog dlg).
18. Keep this model open for the next exercise.
10
2. Enter the following functions to define the input variables that were used in the Box Girder Variables dialog.
Dim nDivisions As Integer
Dim MaxHeight As Double
Dim MinHeight As Double
Dim SpanLength As Double
Dim SpanWidth As Double
Dim PlateThick As Double
3. Enter the following functions to instruct STAAD.Pro to get the input values if the OK button was clicked:
Dim dlgResult As Integer
dlgResult = Dialog(dlg)
If dlgResult = -1 Then
nDivisions = Abs(CInt(dlg.nDivisions))
MaxHeight = Abs(CDbl(dlg.MaxHeight))
MinHeight = Abs(CDbl(dlg.MinHeight))
SpanLength = Abs(CDbl(dlg.SpanLength))
SpanWidth = Abs(CDbl(dlg.SpanWidth))
PlateThick = Abs(CDbl(dlg.PlateThick))
4. Enter the following functions to instruct STAAD.Pro to cancel the operation of the Cancel button was clicked:
ElseIf dlgResult = 0 Then
Debug.Print Canel button Pressed
End If
11
Note: The first step in generating the geometry is to define the total number of nodes to be generated by this macro. The number of
divisions (nDivisions variable) was specified in the Box Girder Variables dialog. By multiplying the number of divisions (plus 1)
by 4, we will arrive at the total number of nodes required for the parabolic box girder structure.
12
3. Enter the following functions to calculate the Y values that make up the bottom side of the parabola.
Dim A As Double
A = -MinHeight / ((SpanLength/2)*(SpanLength/2))
Dim H As Double
H = SpanLength/2
Dim N As Integer
For N = 1 To NumOfNodes
NodeX(N) = (N-1)*SpanLength/nDivisions
NodeY(N) = ((NodeX(N)-H)*(NodeX(N)-H))*A + MinHeight
Note: For this exercise, we will use the following equation to define the parabola for the bottom surface of the structure:
Y = A (X - H)2 + K, where K = MinHeight.
13
4. Enter the following function to generate the nodes for the parabola at Z = 0:
objSTAADGUI.Geometry.AddNode(NodeX(N), NodeY(N),0)
5. Enter the following function to generate the nodes for the parabola at Z = Span Width:
objSTAADGUI.Geometry.AddNode(NodeX(N), NodeY(N), SpanWidth)
6. Enter the following function to generate the nodes for the straight top at Z = 0:
DO NOT DISTRIBUTE - Printing for Student use is Permitted
objSTAADGUI.Geometry.AddNode(NodeX(N), MaxHeight, 0)
7. Enter the following function to generate the nodes for the straight top at Z = Span Width:
objSTAADGUI.Geometry.AddNode(NodeX(N), MaxHeight, SpanWidth)
Next N
Note: Steps 4 - 7 will generate the nodes for each side of the parabolic box structure.
Step #6
Step #4
Step #7
Step #5
14
8. Enter the following functions to generate the Side Plates for each box section:
For N = 1 To NumOfNodes
objSTAADGUI.Geometry.AddPlate((2+4*(N-1)), (6+4*(N-1)), (8+4*(N-1)), (4+4*(N-1)))
objSTAADGUI.Geometry.AddPlate((1+4*(N-1)), (3+4*(N-1)), (7+4*(N-1)), (5+4*(N-1)))
9. Enter the following function to generate the Top Plate for each box section:
10. Enter the following function to generate the Bottom Plate for each box section:
objSTAADGUI.Geometry.AddPlate((1+4*(N-1)), (2+4*(N-1)), (6+4*(N-1)), (5+4*(N-1)))
Next N
Note: Steps 8 - 10 will generate the plates using the nodes that were generated through steps 4 - 7.
15
3. Enter the following functions to define the plate thickness in the Properties dialog:
Dim PlatePropertyNo As Long
PlatePropertyNo = objSTAADGUI.Property.CreatePlateThicknessProperty (PlateThick)
4. Enter the following functions to assign the plate thickness and concrete material to all of the plates in the model:
Dim P As Integer
For P = 1 To NumOfPlates
objSTAADGUI.Property.AssignPlateThickness(P, PlatePropertyNo)
objSTAADGUI.Property.AssignMaterialToPlate("CONCRETE",P)
Next P
16
3. Enter the following functions to assign the fixed support to the first four nodes:
Dim NodeNo As Long
For NodeNo = 1 To 4
objSTAADGUI.Support.AssignSupportToNode (NodeNo, SupportNo)
Next NodeNo
4. Enter the following functions to assign the fixed support to the last four nodes:
For NodeNo = (4 * NumOfNodes - 3) To (4 * NumOfNodes)
objSTAADGUI.Support.AssignSupportToNode (NodeNo, SupportNo)
Next NodeNo
17
4. Enter the following functions to update the structure and terminate the macro:
objSTAADGUI.UpdateStructure
Set objSTAADGUI = Nothing
End Sub
5. Click on the Save icon in the Macro Design Window. Then, close the Macro Design Window.
18
3. Click on the New (Insert) icon in the Customize User Defined Tools dialog.
4. Enter the name Training_Box Girder into the Menu Items window.
5. Click on the ... button adjacent to the Command string in the Customize User Defined Tools dialog.
6. Navigate to the Training_Box Girder.vbs file you just created in the Select File dialog. Then, click Open.
7. Click OK in the Customize User Defined Tools dialog.
8. Keep this model open for the next exercise.
19
2. Click on the User Tools icon in the File toolbar. Then, select Training_Box Girder from the pull down menu.
3. Enter the following parameters into the Box Girder Variables dialog:
Number of Divisions: 20
Click OK.
20
Notice that STAAD.Pro has successfully generated the nodes and plates for the parabolic box structure per the input parameters.
3. Click on the General tab and the Property sub-tab in the Page Control Area.
Notice that STAAD.Pro has successfully assigned the plate thickness and the concrete material to the plates in the structure.
4. Click on the General tab and the Support sub-tab in the Page Control Area.
Notice that STAAD.Pro has successfully assigned fixed supports to the end nodes of the structure.
5. Click on the General tab and the Load & Duration sub-tab in the Page Control Area.
Notice that STAAD.Pro has successfully assigned the dead load and the live load primary load cases.
21