Problem with SyncPathProcedureAsync method when I am trying to sync station paths to the VC
HugoRd
✭
Hi,
I have some problem with the SyncPathProcerdureAsync method from the Robotstudio API. I use that method to sync the paths from the station to the VC and the code is shown below and that code is executed on a button click. The problem is that not all paths are synchronized to the VC even though "SyncToController succeeded!" is displayed as many times as there are paths. "Module has been edited" is also displayed in the Logger as many times as there are paths. But when I open Module1, I see that not all paths have been synchronized. But sometimes the synchronization works and I cannot understand why this happen to me. I hope that someone can give me some advice about this. Maybe I am not the only one with this problem?
Regards,
Hugo
I have some problem with the SyncPathProcerdureAsync method from the Robotstudio API. I use that method to sync the paths from the station to the VC and the code is shown below and that code is executed on a button click. The problem is that not all paths are synchronized to the VC even though "SyncToController succeeded!" is displayed as many times as there are paths. "Module has been edited" is also displayed in the Logger as many times as there are paths. But when I open Module1, I see that not all paths have been synchronized. But sometimes the synchronization works and I cannot understand why this happen to me. I hope that someone can give me some advice about this. Maybe I am not the only one with this problem?
private async void StationToVC()
{
RsTask myTask = mainstation.ActiveTask;
RsPathProcedureCollection paths = myTask.PathProcedures;
foreach (RsPathProcedure rspp in paths)
{
if (Funcs.validPathName(rspp.Name))
{
try
{
if (await myTask.SyncPathProcedureAsync("Module1/" + rspp.Name, SyncDirection.ToController, new List<SyncLogMessage>()))
{
Logger.AddMessage(new LogMessage("SyncToController succeeded!"));
}
else
{
Logger.AddMessage(new LogMessage("SyncToController failed!"));
}
}
catch (Exception)
{
MessageBox.Show("Exception!");
}
}
else
MessageBox.Show(string.Format("One Rapid Symbol with the name '{0}' already exists, rename path.", rspp.Name));
}
} Regards,
Hugo
Tagged:
0
Categories
- All Categories
- 5.5K RobotStudio
- 394 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 249 ScreenMaker
- 2.7K Robot Controller
- 309 IRC5
- 59 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 783 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 4 Job listings