Create foundations. IRConcrFooting Interface.

Create foundations. IRConcrFooting Interface.

jmmarin
Advocate Advocate
1,234 Views
9 Replies
Message 1 of 10

Create foundations. IRConcrFooting Interface.

jmmarin
Advocate
Advocate

Hi all.

I'm trying to instantiate a "foundation" object for a project in VB.net.
Perhaps due to lack of knowledge, I am unable to declare the object and be able to access. Here's the code I've started:
 

 

        Dim roboFooting As IRConcrFooting

        roboFooting.CalculationOptions.Cover = 0.05
        roboFooting.Concrete.CharacteristicStrength = 30
        roboFooting.Ground.SoilLevel = -2
        roboFooting.Geometry.Type = IRConcrFootingType.I_CFT_FOOT_TYPE_FOOTING
        roboFooting.Geometry.Shape = IRConcrFootingShapeType.I_CFST_FOOT_SHAPE_RECT
        roboFooting.Geometry.PierType = IRConcrFootingPierType.I_CFT_FOOT_PIER_TYPE_DOWELED

        roboFooting.Verify(True)

 

The error message is the following:

 

https://learn.microsoft.com/en-us/dotnet/visual-basic/language-reference/error-messages/variable-var...

 

Any  guidance to understand the concept is welcome. I'm just a learner getting into the API.
 
Thanks in advance.
 
0 Likes
Accepted solutions (1)
1,235 Views
9 Replies
Replies (9)
Message 2 of 10

Stephane.kapetanovic
Mentor
Mentor

hi @jmmarin 

type is defined

Dim roboFooting As IRConcrFooting

but value is not set, create it by Create method from IRobotProjectComponentMngr

Best Regards

 

 

Stéphane Kapetanovic

Did you find this post helpful? If it gave you one or more solutions,
don't forget to accept the solution and leave a < like !
EESignature
Message 3 of 10

jmmarin
Advocate
Advocate

Hi @Stephane.kapetanovic.

 

Many thanks for your reply. It was very helpful because now object is created. However, I do not know how to call to the object created. I have tried "get" method but it throws an error (it seems I am trying to use the same way than VBA and COM libraries). This is the code:

 

Dim roboFooting As IRConcrFooting

        roboPro.ComponentMngr.Create(IRobotProjectComponentType.I_PCT_FOOT, "Footing", "axb")

        roboFooting = roboPro.Get(IRobotProjectComponentType.I_PCT_FOOT, "Footing")

 
I really don't know how to declare the object (footing) so I can modify it. Can you correct the current code or add what is needed?.

 

Thanks.

Message 4 of 10

Stephane.kapetanovic
Mentor
Mentor

hi @jmmarin 

try this (don't forget to define loads, concrete strength, bottom reinforcement, etc.)

Sub CreateFooting()
    Dim RobApp As New RobotApplication

    Dim ComponentMngr As RobotProjectComponentMngr = RobApp.Project.ComponentMngr
    Dim ProjetComponent As RobotProjectComponent
    With ComponentMngr
        ProjetComponent = .Create(I_PCT_FOOT, "Footing", "axb")
        Select Case ProjetComponent.Type
            Case I_PCT_FOOT
                Dim ConcrFooting As IRConcrFooting = ProjetComponent.Data
                With ConcrFooting
                    .CalculationOptions.Cover = 0.05
                    .Concrete.CharacteristicStrength = 30
                    .Ground.SoilLevel = -2
                    '[...]
                    With .Geometry
                        .Type = I_CFT_FOOT_TYPE_FOOTING
                        .Shape = I_CFST_FOOT_SHAPE_RECT
                        .PierType = I_CFT_FOOT_PIER_TYPE_DOWELED
                        '[...]
                    End With
                    .Verify(True)
                End With
        End Select
    End With
    RobApp = Nothing
End Sub

Best Regards

 

 

Stéphane Kapetanovic

Did you find this post helpful? If it gave you one or more solutions,
don't forget to accept the solution and leave a < like !
EESignature
0 Likes
Message 5 of 10

Stephane.kapetanovic
Mentor
Mentor
Accepted solution

note that you can iterate over a collection of project components

Sub IterateOverFootingCollection()
    Dim RobApp As New RobotApplication

    Dim ComponentCollection As RobotProjectComponentCollection = RobApp.Project.ComponentMngr.Get(I_PCT_FOOT, "axb")
    Dim ProjetComponent As RobotProjectComponent
    Dim ConcrFooting As IRConcrFooting, ConcrContinuousFooting As IRConcrContinuousFooting
    For i = 1 To ComponentCollection.Count
        ProjetComponent = ComponentCollection.Get(i)
        Select Case ProjetComponent.Type
            Case I_PCT_FOOT
                ConcrFooting = ProjetComponent.Data
            Case I_PCT_CONTINUOUS_FOOT
                ConcrContinuousFooting = ProjetComponent.Data
        End Select
    Next i
    RobApp = Nothing
End Sub

Stéphane Kapetanovic

Did you find this post helpful? If it gave you one or more solutions,
don't forget to accept the solution and leave a < like !
EESignature
Message 6 of 10

jmmarin
Advocate
Advocate

Hi @Stephane.kapetanovic 

Many thanks! Thanks to your explanation I have understood what I was doing wrong. 

In addition, I have modified some parts of the code since I am developing in VB.NET and it is different to VBA in some aspects. For instance, "set" is not allowed.

Best regards.

Message 7 of 10

durducgeorge
Contributor
Contributor

Hello Mister Kapetanovic,

 

Do you know how can I define loads for the foundations?

 

The interface IRConcrFootingLoads doesn't have any methods....

 

Thank you

0 Likes
Message 8 of 10

Stephane.kapetanovic
Mentor
Mentor

hi @durducgeorge 

That was the thrust of my advice in the previous message (loads, concrete strength, reinforcement, etc.).

For loads, you can specify the nodes in your structure that correspond to your foundation.

With ConcrFooting
  '[...] Do something
  .CreateFromNodes "1"
  '[...] Do something
End With

for standalone mode, note that it is still possible to create two nodes, a support and a bar, and to apply loads.

Sub CreateColmunAndForces()
    Dim RobApp As New RobotApplication

    RobApp.Project.New(I_PT_FRAME_3D)
    With RobApp.Project.Structure
        With .Nodes
            .Create(1, 0, 0, 0)
            .Create(2, 0, 0, 1)
            .Get(1).SetLabel(I_LT_SUPPORT, "Fixed")
        End With
        With .Bars
            .Create(1, 1, 2)
            .Get(1).SetLabel(I_LT_BAR_SECTION, "IPE 100")
        End With

        Dim DL As RobotSimpleCase, LL As RobotSimpleCase
        Dim recDL As IRobotLoadRecord, recLL As IRobotLoadRecord
        Dim Cnvt As Double : Cnvt = 1000
        With .Cases
            Dim Tv() As IRobotNodeForceRecordValues = {I_NFRV_FX, I_NFRV_FY, I_NFRV_FZ, I_NFRV_CX, I_NFRV_CY, I_NFRV_CZ}

            Dim TbDL() As Double = {1.5, 1.5, -10, 0, 0, 0}
            DL = .CreateSimple(1, "DL - Footing Permanent", I_CN_PERMANENT, I_CAT_STATIC_LINEAR)
            recDL = DL.Records.Create(I_LRT_NODE_FORCE) : recDL.Objects.FromText("2")
            For i = 0 To 5 : recDL.SetValue(Tv(i), TbDL(i) * Cnvt) : Next

            Dim TbLL() As Double = {5, 5, -25, 0, 0, 0}
            LL = .CreateSimple(2, "LL - Footing Live", I_CN_EXPLOATATION, I_CAT_STATIC_LINEAR)
            recLL = LL.Records.Create(I_LRT_NODE_FORCE) : recLL.Objects.FromText("2")
            For i = 0 To 5 : recLL.SetValue(Tv(i), TbLL(i) * Cnvt) : Next
        End With
    End With
    RobApp.Project.CalcEngine.Calculate()
    RobApp = Nothing
End Sub

It would also be beneficial to add a CreateLike and Get method for iterating over collections.

 

Unfortunately I can't help you more about foundations than to give you some additional ideas and advice on how to get over the programming hurdles.


In the event of an update planned by Autodesk with the idea of replacing the CEB justifications by EN 1992-4 for steel column bases, it would be useful if the dimensioning of foundation blocks in the new Eurocodes could provide the additional reinforcement required for the anchor rods.

 

Best Regards

 

Stéphane Kapetanovic

Did you find this post helpful? If it gave you one or more solutions,
don't forget to accept the solution and leave a < like !
EESignature
Message 9 of 10

durducgeorge
Contributor
Contributor

Hello Mr. @Stephane.kapetanovic,

 

I thought that I can introduce directly my reactions into table loads of my footings already created in RC Elements Design (without creating nodes bars etc.).

 

Thank you very much for your solution and for the rapidity of your answer.

 

 

 

 

 

 

 

 

Message 10 of 10

ext_julien_lebertMYQZ9
Contributor
Contributor

Hello, thanks for all the explanation. It's really helpful. 

But I have a problem. I can't choose many parameters, like those who are in "Story Parameter" or "Footing Reinforcement". Can you help me, please? 

ext_julien_lebertMYQZ9_1-1731581827098.png

 

ext_julien_lebertMYQZ9_0-1731581803522.png

 

0 Likes