OpenStaad section properties for WEB TAPERED

the below code uses GetSectionPropertyValuesEx  which is not working .

refering to the previous thread 

https://communities.bentley.com/products/ram-staad/f/ram-staad-forum/119259/member-properties-for-web-tapered-sections-in-open-staad

"prop" array is still not getting populated

 the description of this function in excel object browser is 

Function GetSectionPropertyValuesEx(varProfRefNo, varPropType, varPropValues)

second argument  " varPropType" for that used GetBeamSectionPropertyTypeNo

the updated openstaad manual also doesnt cover this .

could someone please highlight where i am wrong ? 

*****************************************************************************************************************

Sub webTap_secprop()

Set OS = GetObject(, "StaadPro.OpenSTAAD")
Set OSGeometry = OS.Geometry
Set OSProperty = OS.Property

'****************************
Dim SelBeamsNo As Long
Dim SelBeams() As Long
'Get the application object --
'Get no. of selected beams
SelBeamsNo = OSGeometry.GetNoOfSelectedBeams
'Reallocate
ReDim SelBeams(SelBeamsNo - 1) As Long
OSGeometry.GetSelectedBeams SelBeams, 0
For i = 0 To (SelBeamsNo - 1)

'get section properties of tapred section
Dim Fone As Double, prop(0 To 6) As Double
Dim lBSPropertyTypeNo As Long
Dim lBSPropertyrefNo As Integer
lBSPropertyrefNo = OSProperty.GetBeamSectionPropertyRefNo(SelBeams(i))
lBSPropertyTypeNo = OSProperty.GetBeamSectionPropertyTypeNo(SelBeams(i))
OSProperty.GetSectionPropertyValuesEx lBSPropertyrefNo, lBSPropertyTypeNo, prop



Next i

End Sub

*****************************************************************************************************************

Parents
  • Can you please try with this function?

    GetBeamProperty (nBeamNo, varfWidth, varfDepth, varfAx, varfAy, varfAz, varfIx, varfIy, varfIz)

  • GetBeamProperty (nBeamNo, varfWidth, varfDepth, varfAx, varfAy, varfAz, varfIx, varfIy, varfIz)

    this function works well for tapers members , but we cannot get crossection size( flange width and thcikness from it ) . 

    Best Regards,

    Alex Immanuel Thainese

  • Please try with this function

    GetBeamPropertyAll (nBeamNo, varfWidth, varfDepth, varfAx, varfAy, varfAz, varfIx, varfIy, varfIz, varfTf, varfTw)

  • GetBeamPropertyAll (nBeamNo, varfWidth, varfDepth, varfAx, varfAy, varfAz, varfIx, varfIy, varfIz, varfTf, varfTw)

    this function too will not provide the required 

     it will not give flange width and thickness at top and bottom location , it can be used for double symmetric sections

    Best Regards,

    Alex Immanuel Thainese

  • dear shreyankar ,

    did you tried finding out about GetSectionPropertyValuesEx.

    is it a bug which needs to be corrected ? 

    i even tried it in connect edition in inbuilt macro editor , the code is running but it is not populating the values of Tapered I ,

    the values of F1 to F7 as shown  in figure below 

    below is the code from staad connect edition macro editor

    *****************************************************************************************************

    Option Explicit
    
    Sub Main() 'DESCRIPTION:Creates a new view from the selected beams. Dim objOpenSTAAD As Object Dim SelBeamsNo As Long Dim SelBeams() As Long 'Launch OpenSTAAD Object Set objOpenSTAAD = GetObject(,"StaadPro.OpenSTAAD") 'Get no. of selected beams SelBeamsNo = objOpenSTAAD.Geometry.GetNoOfSelectedBeams If (SelBeamsNo > 0) Then ReDim SelBeams(SelBeamsNo) As Long objOpenSTAAD.Geometry.GetSelectedBeams SelBeams, 1 Debug.Print SelBeams(0) Dim RetVal As Variant RetVal= objOpenSTAAD.Property.GetBeamSectionPropertyTypeNo(SelBeams(0)) Debug.Print "Value of RetVal- " & RetVal Dim lBSPropertyTypeNo As Long lBSPropertyTypeNo = objOpenSTAAD.Property. GetBeamSectionPropertyRefNo (SelBeams(0)) Debug.Print "Value of BeamSectionPropertyRefNo- " & lBSPropertyTypeNo Dim lBeamSectionName As String lBeamSectionName = objOpenSTAAD.Property.GetBeamSectionName (SelBeams(0)) Debug.Print "Name of BeamSection- " & lBeamSectionName Dim PropArray(0 To 6) As Double objOpenSTAAD.Property.GetSectionPropertyValuesEx lBSPropertyTypeNo,PropArray( ) Dim i As Integer For i = LBound(PropArray) To UBound(PropArray) Debug.Print PropArray(i) Next i End If Set objOpenSTAAD = Nothing End Sub


    *****************************************************************************************************

    Best Regards,

    Alex Immanuel Thainese

Reply
  • dear shreyankar ,

    did you tried finding out about GetSectionPropertyValuesEx.

    is it a bug which needs to be corrected ? 

    i even tried it in connect edition in inbuilt macro editor , the code is running but it is not populating the values of Tapered I ,

    the values of F1 to F7 as shown  in figure below 

    below is the code from staad connect edition macro editor

    *****************************************************************************************************

    Option Explicit
    
    Sub Main() 'DESCRIPTION:Creates a new view from the selected beams. Dim objOpenSTAAD As Object Dim SelBeamsNo As Long Dim SelBeams() As Long 'Launch OpenSTAAD Object Set objOpenSTAAD = GetObject(,"StaadPro.OpenSTAAD") 'Get no. of selected beams SelBeamsNo = objOpenSTAAD.Geometry.GetNoOfSelectedBeams If (SelBeamsNo > 0) Then ReDim SelBeams(SelBeamsNo) As Long objOpenSTAAD.Geometry.GetSelectedBeams SelBeams, 1 Debug.Print SelBeams(0) Dim RetVal As Variant RetVal= objOpenSTAAD.Property.GetBeamSectionPropertyTypeNo(SelBeams(0)) Debug.Print "Value of RetVal- " & RetVal Dim lBSPropertyTypeNo As Long lBSPropertyTypeNo = objOpenSTAAD.Property. GetBeamSectionPropertyRefNo (SelBeams(0)) Debug.Print "Value of BeamSectionPropertyRefNo- " & lBSPropertyTypeNo Dim lBeamSectionName As String lBeamSectionName = objOpenSTAAD.Property.GetBeamSectionName (SelBeams(0)) Debug.Print "Name of BeamSection- " & lBeamSectionName Dim PropArray(0 To 6) As Double objOpenSTAAD.Property.GetSectionPropertyValuesEx lBSPropertyTypeNo,PropArray( ) Dim i As Integer For i = LBound(PropArray) To UBound(PropArray) Debug.Print PropArray(i) Next i End If Set objOpenSTAAD = Nothing End Sub


    *****************************************************************************************************

    Best Regards,

    Alex Immanuel Thainese

Children
No Data