×
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

OpenSTAAD View functions

OpenSTAAD View functions

OpenSTAAD View functions

(OP)
Dear forum members,

I wrote following macro in Excel for OpenSTAAD.
Software versions used : STAAD. Pro V8i (SELECTseries 5) , 20.07.10.41
Microsoft Excel (Microsoft Office Professional Plus 2010), Version : 14.0.4760.1000 (32-bit)

-----------------------------------------------------------------------------------------------

Sub Get_Views1()


Dim objOpenSTAAD As Object, stdFile As String
Dim BaseUnit As Integer, Node As Integer, Row As Integer
Dim lNodeCnt As Long
Dim NodeNo As Long
Dim CoordX As Double
Dim CoordY As Double
Dim CoordZ As Double
Dim fmin As Double
Dim fmax As Double
Dim Plane As Integer

'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
' (0: XY Plane, 1: YZ Plane, 2: XZ Plane)
Plane = 1
fmin = -0.4
fmax = 0.4
objOpenSTAAD.View.ShowIsometric
objOpenSTAAD.View.ShowBottom
objOpenSTAAD.View.SetSectionView Plane, fmin, fmax
objOpenSTAAD.View.ShowBack
objOpenSTAAD.View.ShowRight
objOpenSTAAD.View.SpinRight 30
objOpenSTAAD.View.ShowAllMembers

End Sub

----------------------------------------------------------------------------------------------------------------------------------------------------------------

The following commands do not work in above macro. I tried with step by step Runing of macro (F8 button- Step into) OpenSTAAD.

objOpenSTAAD.View.ShowIsometric
objOpenSTAAD.View.ShowBottom
objOpenSTAAD.View.ShowBack
objOpenSTAAD.View.ShowRight
objOpenSTAAD.View.SpinRight 30


But, surprisingly, the following commands work.
objOpenSTAAD.View.SetSectionView Plane, fmin, fmax
objOpenSTAAD.View.ShowAllMembers

Is there any specific problem with these commands? I guess, there is same problem in other "View Show....." commands also.
Regards,
Satish Jethwani

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