How to get Member List for a particular plane (XZ/YZ/XY) using OpenSTAAD function


  
 Applies To 
  
 Product(s):STAAD.Pro
 Version(s):All
 Environment: N/A
 Area: OpenSTAAD
 Subarea: 
 Original Author:Bentley Technical Support Group, Shreyanka Bhattacharjee
  

Problem Description:

How to get Member List for a particular plane (XZ/YZ/XY) using OpenSTAAD function

Solution:

Primarily, you need use these three functions

Parameter of function Setsectionview:

[Input] Plane:  Variable identifying the section plane. 0= XY Plane; 1= YZ Plane; 2= ZX Plane;

[Input] MinCoordinateval: Minimum range of the cutting plane

[Input] MaxCoordinateval: Maximum range of the cutting plane

Parameter of function GetNoOfBeamsInView

[Return value]: Returns No of Beams In current View

Parameter of function GetBeamsInView

[Output] BeamList: Returns member number ID(s) In current View

Sample VBA Syntax:

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

Dim MinCoordinateval As Double

Dim MaxCoordinateval As Double

Dim Plane As Long

Dim BeamCountView As Long

Dim BeamList() As Long

Dim GroupName As String

Dim Group_Type As Long

Plane = 2 'for ZX plane

MinCoordinateval = 6.9 'Minimum range of the cutting plane

MaxCoordinateval = 7.1 'Maximum range of the cutting plane

objOpenSTAAD.View.setsectionview Plane, MinCoordinateval, MaxCoordinateval

BeamCountView = objOpenSTAAD.View.GetNoOfBeamsInView

ReDim BeamList(BeamCountView - 1)

objOpenSTAAD.View.GetBeamsInView BeamList

For i = 0 To BeamCountView - 1

Cells(2 + i, 1) = BeamList(i)

Next i

Output: