Class Station
The Station object is a set of objects with a spatial and/or logical relationship.
Implements
Inherited Members
Namespace: ABB.Robotics.RobotStudio.Stations
Assembly: ABB.Robotics.RobotStudio.Stations.dll
Syntax
sistent("Station")]
public sealed class Station : Project, IHasTransform, IHasGraphicComponents, IHasFrames, IHasIOSignals, IHasIOConnections, IHasPropertyBindings, IGfxObject, IHasAssets
Constructors
Station()
Creates and initiates a new Station object
Declaration
public Station()
Station(Boolean)
Creates and initiates a new Station object
Declaration
public Station(bool setAsActive)
Parameters
Type | Name | Description |
---|---|---|
Boolean | setAsActive | Set the new Station as ActiveProject if ActiveProject is currently null. |
Properties
ActiveStation
Gets the station that is currently active.
Declaration
public static Station ActiveStation { get; }
Property Value
Type | Description |
---|---|
Station | The Station that is currently active, if any. Only one station can be active at a given time. |
Remarks
This is equivalent to
Project.ActiveProject as Station
ActiveTask
Gets the active RsTask of the station.
Declaration
public RsTask ActiveTask { get; set; }
Property Value
Type | Description |
---|---|
RsTask |
Annotations
Gets a AnnotationCollection object that represents all the annotations in the station.
Declaration
public AnnotationCollection Annotations { get; }
Property Value
Type | Description |
---|---|
AnnotationCollection |
Assets
Gets an AssetCollection that represents all the assets in the station.
Declaration
public AssetCollection Assets { get; }
Property Value
Type | Description |
---|---|
AssetCollection |
Attachments
Gets an AttachmentCollection object that represents all the attachments in station.
Declaration
public AttachmentCollection Attachments { get; }
Property Value
Type | Description |
---|---|
AttachmentCollection |
Bindings
Gets a PropertyBindingCollection that contains all the SmartComponent property bindings in the station.
Declaration
public PropertyBindingCollection Bindings { get; }
Property Value
Type | Description |
---|---|
PropertyBindingCollection |
BuiltInDataRecorderSignals
Gets a BuiltInDataRecorderSignals that gives access to the identities of the built in data recorder signals.
Declaration
public BuiltInDataRecorderSignals BuiltInDataRecorderSignals { get; }
Property Value
Type | Description |
---|---|
BuiltInDataRecorderSignals |
Cameras
Gets a CameraCollection object that represents all the cameras in the station.
Declaration
public CameraCollection Cameras { get; }
Property Value
Type | Description |
---|---|
CameraCollection |
ClipPlanes
Gets a ClipPlaneCollection that contains all the clip planes in the station.
Declaration
public ClipPlaneCollection ClipPlanes { get; }
Property Value
Type | Description |
---|---|
ClipPlaneCollection |
ClosingTask
Declaration
public Task ClosingTask { get; }
Property Value
Type | Description |
---|---|
Task |
CollisionSets
Gets a CollisionSetCollection object that represents all the collision sets in the station.
Declaration
public CollisionSetCollection CollisionSets { get; }
Property Value
Type | Description |
---|---|
CollisionSetCollection |
Connections
Gets a IOConnectionCollection that contains all the IOSignal connections in the station.
Declaration
public IOConnectionCollection Connections { get; }
Property Value
Type | Description |
---|---|
IOConnectionCollection |
DefaultTask
Gets the default RsTask of the station.
Declaration
public RsTask DefaultTask { get; }
Property Value
Type | Description |
---|---|
RsTask |
Remarks
The default task is used when there is no robot in the station.
Documents
Gets the collection of ProjectDocuments associated with the station.
Declaration
public ProjectDocumentCollection Documents { get; }
Property Value
Type | Description |
---|---|
ProjectDocumentCollection |
Frames
Gets a FrameCollection object that represents all the graphical frames in the station.
Declaration
public FrameCollection Frames { get; }
Property Value
Type | Description |
---|---|
FrameCollection |
GraphicComponents
Gets a GraphicComponentCollection object that represents all the graphic components in the station.
Declaration
public GraphicComponentCollection GraphicComponents { get; }
Property Value
Type | Description |
---|---|
GraphicComponentCollection |
IOSignals
Gets the IOSignalCollection that represents virtual signals in the station.
Declaration
public IOSignalCollection IOSignals { get; }
Property Value
Type | Description |
---|---|
IOSignalCollection |
Irc5Controllers
Gets an RsIrc5ControllerCollection object that represents all the virtual controllers in the station.
Declaration
public RsIrc5ControllerCollection Irc5Controllers { get; }
Property Value
Type | Description |
---|---|
RsIrc5ControllerCollection |
IsLoading
Returns true if a station is currently being loaded, false otherwise
Declaration
public static bool IsLoading { get; }
Property Value
Type | Description |
---|---|
Boolean |
Lights
Gets a LightCollection that contains all the light sources in the station.
Declaration
public LightCollection Lights { get; }
Property Value
Type | Description |
---|---|
LightCollection |
Remarks
For the light sources to be used, AdvancedLighting must be enabled.
Markups
Gets a MarkupCollection object that contains all the markups in the station.
Declaration
public MarkupCollection Markups { get; }
Property Value
Type | Description |
---|---|
MarkupCollection |
Name
Gets the name of this Station object.
Declaration
public override string Name { get; }
Property Value
Type | Description |
---|---|
String |
Overrides
Remarks
Returns the name of project (or containing solution) file on disk.
ParticleSystems
Gets a ParticleSystemCollection that contains all the particle systems in the station.
Declaration
public ParticleSystemCollection ParticleSystems { get; }
Property Value
Type | Description |
---|---|
ParticleSystemCollection |
PhysicsConstraints
Gets a PhysicsConstraintCollection object that represents all the physics constraints in the station.
Declaration
public PhysicsConstraintCollection PhysicsConstraints { get; }
Property Value
Type | Description |
---|---|
PhysicsConstraintCollection |
PhysicsSimulationProperties
Gets or sets global properties of the physics simulation.
Declaration
public PhysicsSimulationProperties PhysicsSimulationProperties { get; set; }
Property Value
Type | Description |
---|---|
PhysicsSimulationProperties |
PointClouds
Gets a PointCloudCollection that contains all the point clouds in the station.
Declaration
public PointCloudCollection PointClouds { get; }
Property Value
Type | Description |
---|---|
PointCloudCollection |
SimulationConfigurations
Gets a SimulationConfigurationCollection object that represents all the simulation configurations in the station.
Declaration
public SimulationConfigurationCollection SimulationConfigurations { get; }
Property Value
Type | Description |
---|---|
SimulationConfigurationCollection |
Tags
Gets a ProjectObjectTagCollection object that represents all the object tags in the station.
Declaration
public ProjectObjectTagCollection Tags { get; }
Property Value
Type | Description |
---|---|
ProjectObjectTagCollection |
TemporaryGraphics
Gets the TemporaryGraphicCollection that represents all the temporary graphic objects in the station.
Declaration
public TemporaryGraphicCollection TemporaryGraphics { get; }
Property Value
Type | Description |
---|---|
TemporaryGraphicCollection |
Transform
Gets the graphical Transform of the station.
Declaration
public Transform Transform { get; }
Property Value
Type | Description |
---|---|
Transform |
Remarks
The station transform cannot be changed and will always have an identity matrix.
UCS
Sets or returns the Transform object defining the UCS (User Coordinate System) in the station. The UCS is defined by setting the UCS property to an Transform object.
Declaration
public Transform UCS { get; set; }
Property Value
Type | Description |
---|---|
Transform | The Transform object defining the UCS. |
Remarks
The UCS only affects the RobotStudio GUI and not the RobotStudio API. The UCS used in order to make manipulations in the GUI easier. The user can make manipulations relative to the UCS instead of the WCS (World Coordinate System).
VirtualSignals
Declaration
olete("Use IOSignals instead")]
public VirtualSignalCollection VirtualSignals { get; }
Property Value
Type | Description |
---|---|
VirtualSignalCollection |
Methods
AfterLoad(PimDocument)
Declaration
protected override void AfterLoad(PimDocument doc)
Parameters
Type | Name | Description |
---|---|---|
RobotStudio.API.Persistence.PimDocument | doc |
Overrides
BeforeSave(PimDocument)
Declaration
protected override void BeforeSave(PimDocument doc)
Parameters
Type | Name | Description |
---|---|---|
RobotStudio.API.Persistence.PimDocument | doc |
Overrides
BeforeSaveProject()
Declaration
protected override void BeforeSaveProject()
Overrides
Close()
Closes this Station object.
Declaration
public override void Close()
Overrides
FindGraphicComponentsByType(Type)
Gets all GraphicComponents of a specified type in the station.
Declaration
public GraphicComponent[] FindGraphicComponentsByType(Type type)
Parameters
Type | Name | Description |
---|---|---|
Type | type | Type that inherits from GraphicComponent |
Returns
Type | Description |
---|---|
GraphicComponent[] |
GetAllObjects()
Returns an array of all ProjectObjects that are a part of this station (including the Station itself). For performance reasons, geometry objects (all objects below Part) are excluded.
Declaration
public ProjectObject[] GetAllObjects()
Returns
Type | Description |
---|---|
ProjectObject[] |
Load(String, Boolean)
Loads a station from a file.
Declaration
public static Station Load(string fileName, bool asReadOnly)
Parameters
Type | Name | Description |
---|---|---|
String | fileName | The path of the station to be loaded. This must be an absolute path. |
Boolean | asReadOnly | If true, the station is loaded as read only. |
Returns
Type | Description |
---|---|
Station | A Station object. |
Exceptions
Type | Condition |
---|---|
ArgumentException | |
ArgumentNullException | |
DirectoryNotFoundException | |
FileNotFoundException | |
UnauthorizedAccessException | |
IOException |
Load(String, Boolean, ProgressNotification)
Loads a station from a file.
Declaration
public static Station Load(string fileName, bool asReadOnly, ProgressNotification progressDelegate)
Parameters
Type | Name | Description |
---|---|---|
String | fileName | The path of the station to be loaded. This must be an absolute path. |
Boolean | asReadOnly | If true, the station is loaded as read only. |
ProgressNotification | progressDelegate | Callback delegate for load progress notification |
Returns
Type | Description |
---|---|
Station | A Station object. |
Exceptions
Type | Condition |
---|---|
ArgumentException | |
ArgumentNullException | |
DirectoryNotFoundException | |
FileNotFoundException | |
UnauthorizedAccessException | |
IOException |
Load(String, Boolean, ProgressNotification, FileNotFoundNotification)
Loads a station from a file.
Declaration
public static Station Load(string fileName, bool asReadOnly, ProgressNotification progressDelegate, FileNotFoundNotification fileNotFoundDelegate)
Parameters
Type | Name | Description |
---|---|---|
String | fileName | The path of the station to be loaded. This must be an absolute path. |
Boolean | asReadOnly | If true, the station is loaded as read only. |
ProgressNotification | progressDelegate | Callback delegate for load progress notification |
FileNotFoundNotification | fileNotFoundDelegate | Callback delegate for file not found notification |
Returns
Type | Description |
---|---|
Station | A Station object. |
Exceptions
Type | Condition |
---|---|
ArgumentException | |
ArgumentNullException | |
DirectoryNotFoundException | |
FileNotFoundException | |
UnauthorizedAccessException | |
IOException |
Load(String, Boolean, ProgressNotification, FileNotFoundNotification, Boolean)
Loads a station from a file.
Declaration
public static Station Load(string fileName, bool asReadOnly, ProgressNotification progressDelegate, FileNotFoundNotification fileNotFoundDelegate, bool loadGeometry)
Parameters
Type | Name | Description |
---|---|---|
String | fileName | The path of the station to be loaded. This must be an absolute path. |
Boolean | asReadOnly | If true, the station is loaded as read only. |
ProgressNotification | progressDelegate | Callback delegate for load progress notification |
FileNotFoundNotification | fileNotFoundDelegate | Callback delegate for file not found notification |
Boolean | loadGeometry | If false, the station is loaded without gemoetries |
Returns
Type | Description |
---|---|
Station | A Station object. |
Exceptions
Type | Condition |
---|---|
ArgumentException | |
ArgumentNullException | |
DirectoryNotFoundException | |
FileNotFoundException | |
UnauthorizedAccessException | |
IOException |
LoadAsync(String, Boolean, ProgressNotification, Boolean, CancellationToken)
Asynchronous version of Load.
Declaration
public static Task<Station> LoadAsync(string fileName, bool asReadOnly, ProgressNotification progressDelegate, bool loadGeometry, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
String | fileName | |
Boolean | asReadOnly | |
ProgressNotification | progressDelegate | |
Boolean | loadGeometry | |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<Station> |
Remarks
Calling .Result or .Wait() on the returned task will cause a deadlock. Use await instead.
OnCreatingObject()
Declaration
protected override void OnCreatingObject()
Overrides
OnDelete()
Declaration
protected override void OnDelete()
Overrides
Save()
Saves the station to file.
Declaration
public override void Save()
Overrides
SaveAs(String)
Saves the station to a station file on a new location.
Declaration
public override void SaveAs(string fileName)
Parameters
Type | Name | Description |
---|---|---|
String | fileName | Path to the station file |
Overrides
Remarks
If the station has been saved before, the old station file will remain on the file system. When Save() is called next time, the station will be saved to the new location. To make a copy of the station, but then continue to use the original file, use SaveCopyAs(String, Boolean). SaveCopyAs(String, Boolean)
Exceptions
Type | Condition |
---|---|
ArgumentException | The specified file name is invalid. |
SaveAs(String, ProjectFormat)
Saves the station to a station file on a new location.
Declaration
public override void SaveAs(string fileName, ProjectFormat format)
Parameters
Type | Name | Description |
---|---|---|
String | fileName | Path to the station file |
ProjectFormat | format | Format of the saved station |
Overrides
Remarks
If the station has been saved before, the old station file will remain on the file system. When Save() is called next time, the station will be saved to the new location. To make a copy of the station, but then continue to use the original file, use SaveCopyAs(String, Boolean). SaveCopyAs(String, Boolean)
Exceptions
Type | Condition |
---|---|
ArgumentException | The specified file name is invalid. |
SaveCopyAs(String, Boolean)
Saves a copy of the station to file, optionally removing CAD Geometry from the saved station.
Declaration
public void SaveCopyAs(string fileName, bool removeGeometry)
Parameters
Type | Name | Description |
---|---|---|
String | fileName | |
Boolean | removeGeometry |
UpdateGraphics()
Ensures that the graphics gets updated to reflect recent changes.
Declaration
public static void UpdateGraphics()
Remarks
There is normally no need to call this function since the graphics are updated automatically during idle processing and simulation.
UpdateGraphics(Boolean)
Ensures that the graphics gets updated to reflect recent changes.
Declaration
public static void UpdateGraphics(bool forceRefresh)
Parameters
Type | Name | Description |
---|---|---|
Boolean | forceRefresh | Forces a full and immediate refresh. Use only if absolutely needed! |
Remarks
There is normally no need to call this function since the graphics are updated automatically during idle processing and simulation.
Events
ActiveTaskChanged
Occurs when the ActiveTask property has changed.
Declaration
public event ProjectObjectPropertyChangedEventHandler ActiveTaskChanged
Event Type
Type | Description |
---|---|
ProjectObjectPropertyChangedEventHandler |
IOSignalChanged
Raised whenever any property except Value changes on one of the signals in the IOSignals collection
Declaration
public event IOSignalChangedEventHandler IOSignalChanged
Event Type
Type | Description |
---|---|
IOSignalChangedEventHandler |
IOSignalValueChanged
Raised whenever the Value property changes on one of the IOSignals in the IOSignals collection
Declaration
public event IOSignalChangedEventHandler IOSignalValueChanged
Event Type
Type | Description |
---|---|
IOSignalChangedEventHandler |
UCSChanged
Occurs when the UCS property has changed.
Declaration
public event EventHandler UCSChanged
Event Type
Type | Description |
---|---|
EventHandler |