Class StationServices
Contains high-level methods for working with stations.
Namespace: ABB.Robotics.RobotStudio.Stations
Assembly: ABB.Robotics.RobotStudio.Stations.dll
Syntax
public static class StationServices
Methods
PackAndGo(Station, String)
Creates a Pack & Go file which includes a station and its dependencies. If the station file is saved inside a Solution folder, additional folders in the solution folder will be included.
Declaration
public static PackAndGoResult PackAndGo(Station station, string path)
Parameters
Type | Name | Description |
---|---|---|
Station | station | Station to pack. |
String | path | Path to the Pack & Go (.rspag) file. |
Returns
Type | Description |
---|---|
PackAndGoResult |
Remarks
It is possible to add custom folders to a solution folder in addition to the folders created by RobotStudio, like Stations and Libraries. A developer of an Add-In which is creating, or reading from, such folders must make sure to use unique folder names to avoid conflicts with other Add-Ins, as well as with future standard folders of RobotStudio like, Stations, Libraries and Backups. It is strongly suggested to store Add-In specific content under a folder with the same name as the Add-Ins application ID. This method uses an undo step to roll back any changes made to the station. If the call is wrapped in an outer undo step, make sure it is closed immediately and does not contain any other changes.
PackAndGo(Station, String, PackAndGoLibraryCopyOptions, Boolean, Boolean, Boolean)
Creates a Pack & Go file which includes a station and its dependencies.
Declaration
public static PackAndGoResult PackAndGo(Station station, string path, PackAndGoLibraryCopyOptions libraryCopyOptions, bool abbLibraries, bool includeBackup, bool includeExternalMedia)
Parameters
Type | Name | Description |
---|---|---|
Station | station | Station to pack. |
String | path | Path to the Pack & Go (.rspag) file. |
PackAndGoLibraryCopyOptions | libraryCopyOptions | Specifies how libraries should be packed. |
Boolean | abbLibraries | Include standard ABB library files in the package. Normally this is not needed. |
Boolean | includeBackup | Include backups of controller systems. |
Boolean | includeExternalMedia | Include media for external controller options. |
Returns
Type | Description |
---|---|
PackAndGoResult |
Remarks
This method uses an undo step to roll back any changes made to the station. If the call is wrapped in an outer undo step, make sure it is closed immediately and does not contain any other changes.
UnpackAndWork(String, String, Boolean)
Declaration
olete("Use UnpackAndWorkAsync() instead")]
public static PackAndGoResult UnpackAndWork(string filePath, string destinationPath, bool overwrite)
Parameters
Type | Name | Description |
---|---|---|
String | filePath | |
String | destinationPath | |
Boolean | overwrite |
Returns
Type | Description |
---|---|
PackAndGoResult |
UnpackAndWork(String, String, String, Boolean, Boolean)
Declaration
olete("Use UnpackAndWorkAsync() instead")]
public static PackAndGoResult UnpackAndWork(string filePath, string destinationPath, string mediaPoolPath, bool restoreBackup, bool overwrite)
Parameters
Type | Name | Description |
---|---|---|
String | filePath | |
String | destinationPath | |
String | mediaPoolPath | |
Boolean | restoreBackup | |
Boolean | overwrite |
Returns
Type | Description |
---|---|
PackAndGoResult |
UnpackAndWorkAsync(String, String, String, Boolean, Boolean, Boolean)
Unpacks a Pack & Go and optonally loads the contained station.
Declaration
public static Task<PackAndGoResult> UnpackAndWorkAsync(string filePath, string destinationPath, string mediaPoolPath = "", bool restoreBackup = true, bool overwrite = true, bool loadStation = true)
Parameters
Type | Name | Description |
---|---|---|
String | filePath | |
String | destinationPath | |
String | mediaPoolPath | |
Boolean | restoreBackup | |
Boolean | overwrite | |
Boolean | loadStation | True if the unpacked station should be loaded in RobotStudio and become the active station, false to not load the station. |
Returns
Type | Description |
---|---|
Task<PackAndGoResult> | The |