Dear Bentley Team,
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, only following two commands work.
objOpenSTAAD.View.SetSectionView Plane, fmin, fmax
objOpenSTAAD.View.ShowAllMembers
Is there any specific problem with those commands? I guess, there is same problem in other "View Show....." commands also.