Modeling slab using VBA in ABD

Hi everyone. 

I tryed to find any similar question, but it doesnt succes. 

I cad model any section in ABD Connect Edition using VBA and STF library (AECOSimBuildingDesigner Structural 9.1 Library). The code uder helps model sections

Function CreateAMember(a As Long, b As Long, c As Long, d As Long, e As Long, f As Long, ang As Long, mySectionName As String, p as Byte)
    Dim myMember As STFLinearMember
    Dim section As STFSection
    Dim pPt As Point3d
    Dim qPt As Point3d
    pPt.x = a
    pPt.y = b
    pPt.z = c
    qPt.x = d
    qPt.y = e
    qPt.z = f
    Set myMember = New STFLinearMemberList
    Set section = New STFSectionList
    section.SetName mySectionName
    myMember.SetSTFSection section
    myMember.SetPartFamily "Steel_carbon"
    myMember.SetPartName "Beam"
    myMember.SetMaterial "Steel", "S355"
    myMember.SetPQPoints pPt, qPt
    myMember.SetPlacementPoint p
    myMember.SetRotation ang
    'myMember.SetJoistInstance "Beam"
    myMember.SetCrossSectionReflection True
    myMember.CreateTFFormRecipeList
    myMember.Save True
End Function
Sub aaaaa()
CreateAMember 0, 0, 0, 1500, 0, 0, 0, "L 90x90x7"
CreateAMember 1500, 0, 0, 1500, 1500, 0, 30, "[ 120 UPN"
CreateAMember 1500, 1500, 0, 0, 1500, 0, 60, "[ 160 UPN"
CreateAMember 0, 1500, 0, 0, 2000, 0, 90, "[ 240 UPN"
End Sub

But now i need to model slab in ABD. I am going to use STFSolid from the same library. Anybody have code  for this aim. I mean create a solid in ABD using VBA.

Parents
  • Hi,

    Please check whether the following code helps:

    Function CreateASlab(aX As Double, aY As Double, aZ As Double, bX As Double, bY As Double, bZ As Double, cX As Double, cY As Double, cZ As Double, dX As Double, _
                dY As Double, dZ As Double, Thickness As Double)
                
        'Set a vertex list array of Point3d to save the corners of the slab
        Dim vertexlist(0 To 3) As Point3d
        vertexlist(0).X = aX
        vertexlist(0).Y = aY
        vertexlist(0).Z = aZ
        vertexlist(1).X = bX
        vertexlist(1).Y = bY
        vertexlist(1).Z = bZ
        vertexlist(2).X = cX
        vertexlist(2).Y = cY
        vertexlist(2).Z = cZ
        vertexlist(3).X = dX
        vertexlist(3).Y = dY
        vertexlist(3).Z = dZ
        
        'Create variable with datatype STFSolid for the slab
        Dim mySlab As STFSolid
        
        'Initialize the variable
        Set mySlab = New STFSolidList
        
        'Assign further porperties for the slab to be created. This list is not exhaustive
        mySlab.SetFaceVertices vertexlist()
        mySlab.SetThickness Thickness
        mySlab.SetPartFamily "S-FloorSlabs"         'Change this to suit your requirement
        mySlab.SetPartName "S_BSUK_Slabs"           'Change this to suit your requirement
        
        'Create and save the slab
        mySlab.CreateTFFormRecipeList
        mySlab.Save True
        
    End Function
    
    Sub bbbbb()
        CreateASlab 0, 0, 0, 1500, 0, 0, 1500, 1500, 0, 0, 1500, 0, 125         'Pass the vertices and thickness to the function CreateASlab to create the slab
    End Sub

    Regards,

    Satadal

    Answer Verified By: Владислав Ахунджанов 

Reply Children
No Data