Robot | Structural Analysis Api

IRobotApplication app = new RobotApplication(); app.Project.New(IRobotProjectType.I_PT_SLAB, true); // clear existing IRobotStructure structure = app.Project.Structure;

// Apply load case and load IRobotLoadCase loadCase = structure.Cases.Create(1, IRobotLoadCaseType.I_LCT_STATIC); loadCase.Name = "SelfWeight + Point Load"; IRobotLoadServer loadServer = app.Project.Loads; loadServer.Create(1, IRobotLoadType.I_LT_BAR_UNI, loadCase.Number); IRobotBarUniformLoad load = loadServer.Get(1, loadCase.Number) as IRobotBarUniformLoad; load.SetBar(2); // apply to beam load.PZ = -10.0; // kN/m downward robot structural analysis api

for (int i = 0; i <= divisionPoints; i++) double coord = (double)i / divisionPoints; // 0 to 1 along bar IRobotBarResult result = resServer.GetBarResult(barId, 1, coord, IRobotBarResultType.I_BRT_LOCAL); double my = result.My; // bending moment if (my > maxMy) maxMy = my; IRobotApplication app = new RobotApplication(); app

public void Run()

Console.WriteLine($"Maximum My on bar barId: maxMy kNm"); // Optional: save file app.Project.SaveAs(@"C:\Temp\portal_frame.rtd"); // Cleanup System.Runtime.InteropServices.Marshal.ReleaseComObject(app); IRobotApplication app = new RobotApplication()

// Create bars (steel section HEA200) structure.Bars.Create(1, 1, 2); // column left structure.Bars.Create(2, 2, 3); // beam structure.Bars.Create(3, 3, 4); // column right

Back
Top