# Problem with SyncPathProcedureAsync method when I am trying to sync station paths to the VC

**URL:** <https://tech-community.robotics.abb.com/t/problem-with-syncpathprocedureasync-method-when-i-am-trying-to-sync-station-paths-to-the-vc/8192>\
**Category:** Developer Tools\
**Tags:** robotstudio-sdk, path, syncronization\
**Created:** [April 16, 2018, 11:46am UTC](https://tech-community.robotics.abb.com/t/problem-with-syncpathprocedureasync-method-when-i-am-trying-to-sync-station-paths-to-the-vc/8192 "2018-04-16T11:46:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![HugoRd](https://avatars.discourse-cdn.com/v4/letter/h/9d8465/32.png) [@HugoRd](https://tech-community.robotics.abb.com/u/HugoRd)\
**Post date:** [April 16, 2018, 11:46am UTC](https://tech-community.robotics.abb.com/t/problem-with-syncpathprocedureasync-method-when-i-am-trying-to-sync-station-paths-to-the-vc/8192/1 "2018-04-16T11:46:13Z")

</div>

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?

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()))  
{  
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
