Applies To | |||
Product(s): | STAAD.Pro | ||
Version(s): | All | ||
Environment: | N/A | ||
Area: | OpenSTAAD | ||
Subarea: | Geometry, Group | ||
Original Author: | Bentley Technical Support Group, Shreyanka Bhattacharjee | ||
Problem Description:
How to create Member/ Floor Group with selected members using OpenSTAAD function
Solution:
Primarily, you need use these three functions
Parameter of function GetNoOfSelectedBeams
[Return value]: Number of selected member(s)
Parameter of function GetSelectedBeams
[Output] EntityList: Returns selected member number ID(s)
[Input] nIsSorted: The order of the selection(s): in sorted order (= 1), in the order of selection (= 0)
Parameter of function CreateGroupEx
[Input] grouptype: Type of entities in group. 1= Nodes; 2= Members; 3=Plates; 4=Solids; 5=Geometry; 6=Floor
[Input] groupname: Name of the group
[Input] EntityCount: Total count of entities
[Input] EntityList: Entity ID Numbers
Set objOpenStaad = GetObject(, "StaadPro.OpenSTAAD")
Dim SelBeamNos() As Long
Dim NoOfSelectedBeams As Long
NoOfSelectedBeams = objOpenStaad.Geometry.GetNoOfSelectedBeams
ReDim SelBeamNos(NoOfSelectedBeams - 1)
objOpenStaad.Geometry.GetSelectedBeams SelBeamNos, 0
Dim groupname As String
Dim grouptype As Long
grouptype = 6 'Floor Beam Group
groupname = "_Level1"
objOpenStaad.Geometry.CreateGroupEx grouptype, groupname, NoOfSelectedBeams, SelBeamNos
Output: