/// <summary> /// Initialize Robot /// </summary> /// <returns>True or false</returns> public void InitializeRobot() { Console.WriteLine("Initializing Robot..."); Application = new RobotApplication(); System.Threading.Thread.Sleep(20000); Console.WriteLine("Waiting for Robot..."); }
public bool Connect(RobotApplication robot_app, int add_in_id, bool first_time) { if (robot_app == null) { return(false); } this.robot_app = robot_app; return(true); }
public static void InitRobot() { robotApp = new RobotApplication(); nodeServer = robotApp.Project.Structure.Nodes; barServer = robotApp.Project.Structure.Bars; caseServer = robotApp.Project.Structure.Cases; labelServer = robotApp.Project.Structure.Labels; PrefrencesServer = robotApp.Project.Preferences; barForceServer = robotApp.Project.Structure.Results.Bars.Forces; }
static Robot_call() { if (robApp == null) { robApp = new RobotApplication(); robApp.Project.New(IRobotProjectType.I_PT_SHELL); if (robApp.Visible == 0) { robApp.Interactive = 1; robApp.Visible = 1; } } }
public static bool OpenConnection() { try { robApp = new RobotApplication(); return(true); } catch (Exception ex) { MessageBox.Show("Error: " + ex); return(false); } }
private void Init(IRobotApplication iapp) { if (iapp != null) { robot = iapp; } else { robot = new RobotApplication(); } str = robot.Project.Structure; Panel = new List <RSA_FE>(); PanelEdges = new List <Panel>(); ErrorList = new List <string>(); }
private double _windz = 0.0; //the wind vector /// <summary> /// Create the Robot model from scratch. /// </summary> /// <param name="_nodeInfo">A List of node objects.</param> /// <param name="_barInfo">A List of bar objects.</param> public RobotModel(IRobotApplication robot, IEnumerable <AnalyticalNode> nodeInfo, IEnumerable <AnalyticalBar> barInfo, IEnumerable <AnalyticalPlate> plateInfo) { robot.Project.New(RobotOM.IRobotProjectType.I_PT_SHELL); _project = robot.Project; if (_project == null) { throw new Exception("The robot project could not be initialized."); } //create the structure and the node and bar servers _structure = _project.Structure; _nodes = _structure.Nodes; _bars = _structure.Bars; _objects = _structure.Objects; List <int> forWindLoads = new List <int>(); List <int> forLiveLoads = new List <int>(); List <int> forBuildingLoads = new List <int>(); List <int> forDeadLoadsBars = new List <int>(); List <int> forDeadLoadsSlabs = new List <int>(); double windLoad = 0.0; double liveLoad = 0.0; double buildingLoad = 0.0; double fatManLoad = 300 * 4.45; //300lbs. -> Newton IRobotSimpleCase ll; IRobotSimpleCase dl; IRobotSimpleCase bl; IRobotSimpleCase wl; CreateLoadCases(out ll, out dl, out wl, out bl); CreateLoads(ll, dl, wl, bl); CreateBarEndRelease(_barInfo); CreateNodes(); CreateBars(forDeadLoadsBars); #region plates CreatePlates(liveLoad, forLiveLoads, windLoad, forWindLoads, buildingLoad, forBuildingLoads, forDeadLoadsSlabs, ll, wl, bl, fatManLoad, dl, forDeadLoadsBars); #endregion }
public Structure(int frames, double spam, double heigth, double offset) { //Parsing the main parameters this.numberOfFrames = frames; this.frameSpam = spam; this.frameHeigth = heigth; this.frameOffset = offset; //Start application robApp = RobotController.getRobot(); //Create a project RobotProjectController.createProject(robApp); //Create a structure str = robApp.Project.Structure; }
private double _windz = 0.0; //the wind vector #endregion Fields #region Constructors /// <summary> /// Create the Robot model from scratch. /// </summary> /// <param name="_nodeInfo">A List of node objects.</param> /// <param name="_barInfo">A List of bar objects.</param> public RobotModel(IRobotApplication robot, IEnumerable<AnalyticalNode> nodeInfo, IEnumerable<AnalyticalBar> barInfo, IEnumerable<AnalyticalPlate> plateInfo) { robot.Project.New(RobotOM.IRobotProjectType.I_PT_SHELL); _project = robot.Project; if (_project == null) throw new Exception("The robot project could not be initialized."); //create the structure and the node and bar servers _structure = _project.Structure; _nodes = _structure.Nodes; _bars = _structure.Bars; _objects = _structure.Objects; List<int> forWindLoads = new List<int>(); List<int> forLiveLoads = new List<int>(); List<int> forBuildingLoads = new List<int>(); List<int> forDeadLoadsBars = new List<int>(); List<int> forDeadLoadsSlabs = new List<int>(); double windLoad = 0.0; double liveLoad = 0.0; double buildingLoad = 0.0; double fatManLoad = 300 * 4.45; //300lbs. -> Newton IRobotSimpleCase ll; IRobotSimpleCase dl; IRobotSimpleCase bl; IRobotSimpleCase wl; CreateLoadCases(out ll, out dl, out wl, out bl); CreateLoads(ll,dl, wl, bl); CreateBarEndRelease(_barInfo); CreateNodes(); CreateBars(forDeadLoadsBars); #region plates CreatePlates(liveLoad, forLiveLoads, windLoad, forWindLoads, buildingLoad, forBuildingLoads, forDeadLoadsSlabs, ll, wl, bl, fatManLoad, dl, forDeadLoadsBars); #endregion }
private void Form1_Load(object sender, EventArgs e) { // connect to Robot //实例化一个ROBOT程序类 iapp = new RobotApplicationClass(); if (iapp.Project.IsActive == 0) { // we need an opened project to get names of available supports and bar sections // create a new project if not connected to existing one //创建一个2D框架的工程 iapp.Project.New(IRobotProjectType.I_PT_FRAME_2D); } for (int i = 0; i < 5; i++) { int index = dataGridViewInPut.Rows.Add(); dataGridViewInPut.Rows[index].Cells[0].Value = "第" + (i + 1).ToString() + "跨均布荷载"; dataGridViewInPut.Rows[index].Cells[1].Value = 1; dataGridViewInPut.Rows[index].Cells[2].Value = "均布荷载"; dataGridViewInPut.Rows[index].Cells[3].Value = (i + 1).ToString(); dataGridViewInPut.Rows[index].Cells[4].Value = -10000; } }
//窗体加载时 private void Form1_Load(object sender, EventArgs e) { // connect to Robot //实例化一个ROBOT程序类 iapp = new RobotApplicationClass(); if (iapp.Project.IsActive == 0) { // we need an opened project to get names of available supports and bar sections // create a new project if not connected to existing one //创建一个2D框架的工程 iapp.Project.New(IRobotProjectType.I_PT_FRAME_2D); } // fill combo-boxes with names of bar sections available in Robot //从ROBOT中获取断面库,然后给定义梁,柱的下拉列表赋值 IRobotNamesArray inames = iapp.Project.Structure.Labels.GetAvailableNames(IRobotLabelType.I_LT_BAR_SECTION); for (int i = 1; i < inames.Count; ++i) { comboColumns.Items.Add(inames.Get(i)); comboBeams.Items.Add(inames.Get(i)); } comboBeams.SelectedIndex = 0; comboColumns.SelectedIndex = 0; // fill combo-boxes with names of supports available in Robot //从Robot中获取支撑种类,填充到支撑下拉列表中 inames = iapp.Project.Structure.Labels.GetAvailableNames(IRobotLabelType.I_LT_SUPPORT); for (int i = 1; i < inames.Count; ++i) { comboSupportLeft.Items.Add(inames.Get(i)); comboSupportRight.Items.Add(inames.Get(i)); } comboSupportLeft.SelectedIndex = 0; comboSupportRight.SelectedIndex = 0; }
public GetSlabReinfResult(IRobotApplication iapp = null) { Services.RobotAppService.iapp = iapp; Init(iapp); }
public GetSlabReinfResult(CancellationToken ct, IRobotApplication iapp = null) { Services.RobotAppService.iapp = iapp; Init(iapp); }
public bool Disconnect() { iapp = null; return(true); }
public bool Connect(RobotApplication robot_app, int add_in_id, bool first_time) { iapp = robot_app; return(true); }
public RobotSelections(IRobotApplication robot) { this.robot = robot; }
public static void createProject(IRobotApplication app) { app.Project.New(IRobotProjectType.I_PT_FRAME_3D); }
public bool Disconnect() { robot_app = null; return(true); }
public void DisposeRobot() { Application.Quit(IRobotQuitOption.I_QO_DISCARD_CHANGES); Application = null; }
public void InitializeRobot() { Application = new RobotApplication(); Application.Interactive = 0; }
//Constructor private Structure() { iRobotApp = new RobotApplicationClass(); }