Hi,
I am looking to write a script that inputs steel reinforcement parameters.
This includes defining the yield strength of the bar, bar diameter and concrete cover
Is this possible through API?
I have seen this post here https://forums.autodesk.com/t5/robot-structural-analysis-forum/api-bar-material-yield-strength-from-...
However I need to see some more code to be able to implement it myself as I am still relativity new to VBA.
Thanks in advance for the help,
Alex
Solved! Go to Solution.
Solved by Rafal.Gaweda. Go to Solution.
Hi @Anonymous
Some examples:
Private Sub CommandButton1_Click()
Dim robot As IRobotApplication
Dim monobjet As RobotObjObject
Dim Ferlabel As RobotLabel
Dim Ferlabledata As RConcr_BAEL_ReinforceData
Set robot = New RobotApplication
'ouverture
robot.Project.New I_PT_SHELL
'préference de l'affaire & Norme de calcul de ferraillage
Set ProjectPrefs = robot.Project.Preferences
ProjectPrefs.SetActiveCode I_CT_RC_THEORETICAL_REINF, "BAEL 91 mod. 99"
Set Ferlabel = robot.Project.Structure.Labels.Create(I_LT_PANEL_REINFORCEMENT, "BAEL2")
Set Ferlabledata = Ferlabel.Data
Ferlabledata.SetMainDirection I_CRD_ALONG_Z, 1, 1, 1 'Direction
Ferlabledata.Main.UnidirReinf = False 'Ferraillage dans une Direction
'=========parametre ELS
Ferlabledata.SLS_Deflection = True 'Etendue des calculs Fléche
Ferlabledata.SLS_DeflectionReinfCorrect = True 'Etendue des calculs Correction du ferrailage
Ferlabledata.CrackingBot = 3 'Fissuration - = autre
'Ferlabledata.CrackingBot = I_CBAELCT_OTHER 'Fissuration - = autre
Ferlabledata.CrackingTop = 3 'Fissuration + = autre
'Ferlabledata.CrackingTop = I_CBAELCT_OTHER 'Fissuration - = autre
'=========Ferraillage
Ferlabledata.BarDim_D1_Bot = 0.02
Ferlabledata.BarDim_D1_Up = 0.02
Ferlabledata.BarDim_D2_Up = 0.025
Ferlabledata.BarDim_D2_Bot = 0.032
robot.Project.Structure.Labels.Store Ferlabel
End Sub
Private Sub CommandButton1_Click()
Dim Robapp As New RobotApplication
Dim RC As RobotProjectComponent
Set RC = Robapp.Project.ComponentMngr.Create(I_PCT_BEAM, "B1", "1")
Dim IRCB As IRConcrBeam
Set IRCB = RC.Data
IRCB.Concrete.CharacteristicStrength = 20
IRCB.CalculationOptions.CoverBottom = 0.03
IRCB.Geometry.SpanNumber = 2
IRCB.LinearLoadsCount = 1
IRCB.LinearLoad(1).Case = 1
IRCB.LinearLoad(1).Nature = I_BLN_BEAM_NATURE_DEAD
IRCB.LinearLoad(1).Spans.Add 1
IRCB.LinearLoad(1).Spans.Add 2
IRCB.LinearLoad(1).Value1 = 1000
Dim IBS As IRConcrBeamSegment
Set IBS = IRCB.Geometry.Span(1).segment(1)
IBS.Dim(I_BSD_BEAM_SECTION_DIM_H1) = 1
IBS.Dim(I_BSD_BEAM_SECTION_DIM_B) = 0.5
Set IBS = IRCB.Geometry.Span(2).segment(1)
IBS.Dim(I_BSD_BEAM_SECTION_DIM_H1) = 1
IBS.Dim(I_BSD_BEAM_SECTION_DIM_B) = 0.5
End Sub
Thanks @Rafal.Gaweda that is very helpful, exactly what I was looking for.
Do you know if it is possible to turn off the minimum reinforcement required (see attached) through API?
I have been looking through the forum as well as the API manual but still can't figure it out.
Thanks again for your help,
Alex
Can't find what you're looking for? Ask the community or share your knowledge.