×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Intermediate Forces in OpenSTAAD

Intermediate Forces in OpenSTAAD

Intermediate Forces in OpenSTAAD

(OP)
Hi. I'm new to OpenSTAAD. I wanted to output a table for Section Forces at given distance which is not covered by STAAD default increments(up to 12).

I know I could use "Print Member Sections Force List" Command and defining a custom section but the output is not usable in excel since it's not tabulated so I thought of utilizing STAAD's built-in macro.

Here's my code that doesn't work:

Sub Main()
'Description:Intermediate Forces

Dim objOpenSTAAD AS Object
Dim beam As Long
Dim dist As Double
Dim LC As Long
Dim Force(0 TO 5) As Double

Set objOpenSTAAD = GetObject(,"Staad.ProOpenSTAAD")

beam = 120
LC = 701
For dist = 0 TO 3 Step 0.467
'Get Intermediate Forces for Member 120 (Length=3m) at 1.4m for LC 701
objOpenSTAAD.Output.GetIntermediateMemberForcesAtDistance (beam, dist, LC, Force(0))
Next dist
Set objOpenSTAAD = Nothing

End Sub


Your suggestions are appreciated.

RE: Intermediate Forces in OpenSTAAD

(OP)
I just utilized convert text-to-column wizard of MsExcel instead and it was now able to tabulate staad output data to my worksheet.

Consider this as solved.

Structural Engineer

RE: Intermediate Forces in OpenSTAAD

Dear boyq

This is OpenSTAAD code in Excel for taking output results


Option Explicit

Sub Main()
'Description:Intermediate Forces

Dim objOpenSTAAD As Object
Dim BeamNo As Long
Dim Dist As Double
Dim LC As Long
Dim Force(0 To 5) As Double
Dim x As Integer

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

BeamNo = 230
LC = 3
x = 0

For Dist = 0 To 3 Step 0.467
'Get Intermediate Forces for Member 120 (Length=3m) at 1.4m for LC 701
objOpenSTAAD.Output.GetIntermediateMemberForcesAtDistance BeamNo, Dist, LC, Force()

Worksheets(ActiveSheet.Name).Cells(3 + x, 1).Value = Dist
Worksheets(ActiveSheet.Name).Cells(3 + x, 2).Value = Force(0) '******FX
Worksheets(ActiveSheet.Name).Cells(3 + x, 3).Value = Force(1) '******FY
Worksheets(ActiveSheet.Name).Cells(3 + x, 4).Value = Force(2) '******FZ
Worksheets(ActiveSheet.Name).Cells(3 + x, 5).Value = Force(3) '******MX
Worksheets(ActiveSheet.Name).Cells(3 + x, 6).Value = Force(4) '******MY
Worksheets(ActiveSheet.Name).Cells(3 + x, 7).Value = Force(5) '******MZ
x = x + 1
Next Dist

Worksheets(ActiveSheet.Name).Cells(3, 1).Value = "Dist"
Worksheets(ActiveSheet.Name).Cells(3, 2).Value = "FX"
Worksheets(ActiveSheet.Name).Cells(3, 3).Value = "FY"
Worksheets(ActiveSheet.Name).Cells(3, 4).Value = "FZ"
Worksheets(ActiveSheet.Name).Cells(3, 5).Value = "MX"
Worksheets(ActiveSheet.Name).Cells(3, 6).Value = "MY"
Worksheets(ActiveSheet.Name).Cells(3, 7).Value = "MZ"

Worksheets(ActiveSheet.Name).Range(Cells(3, 1), Cells(3, 7)).Font.Bold = True
Worksheets(ActiveSheet.Name).Range(Cells(3, 1), Cells(2 + x, 7)).HorizontalAlignment = xlCenter
Worksheets(ActiveSheet.Name).Range(Cells(3, 1), Cells(2 + x, 7)).VerticalAlignment = xlCenter
Worksheets(ActiveSheet.Name).Range(Cells(3, 1), Cells(2 + x, 7)).NumberFormat = "0.000"

Set objOpenSTAAD = Nothing

End Sub

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources