Click or drag to resize
AttachmentCollection Class
A Collection of Attchment objects.
Inheritance Hierarchy
SystemObject
  ABB.Robotics.RobotStudio.StationsAttachmentCollection

Namespace:  ABB.Robotics.RobotStudio.Stations
Assembly:  ABB.Robotics.RobotStudio.Stations (in ABB.Robotics.RobotStudio.Stations.dll) Version: 7.0.8747.636
Syntax
C#
public class AttachmentCollection : ICollection, 
	IEnumerable, IEnumerable<Attachment>

The AttachmentCollection type exposes the following members.

Properties
Methods
  NameDescription
Public methodCode exampleAdd
Used when moving Attachments from one station to another. If you want to add an attachment within a station use Attach method on the GraphicComponentGroup , Flange, Part or ToolDataInfo class instead.
Public methodContains
Public methodCopyTo(Array, Int32)
Public methodCopyTo(Attachment, Int32)
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetEnumerator
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodCode exampleRemove
Used when moving Attachments from one station to another. If you want to remove an attachment within a station use Detach method on the GraphicComponentGroup, Flange, Part or ToolDataInfo class instead.
Public methodToArray
Public methodToString (Inherited from Object.)
Top
Examples
Get Attchment Collection.
Attachments Properties Example
    Project.UndoContext.BeginUndoStep("Attachments Properties");
    try
    {
        // Instance active station.
        #region AttachmentsPropertiesStep1
        Station stn = Station.ActiveStation;
        #endregion

        // Enumerates the attachments in the station and outputs their info using the logger.
        Logger.AddMessage(new LogMessage("The station contains the following attachments:"));
        #region AttachmentsPropertiesStep2
        foreach (Attachment att in stn.Attachments)
        #endregion
        {
            // Get the attachments transform values.
            #region AttachmentsPropertiesStep3
            string transStr = "";

            transStr += "X: " + att.Offset.t.x;
            transStr += " Y: " + att.Offset.t.y;
            transStr += " Z: " + att.Offset.t.z;
            transStr += " RX: " + att.Offset.EulerZYX.x;
            transStr += " RY: " + att.Offset.EulerZYX.y;
            transStr += " RZ: " + att.Offset.EulerZYX.z;

            // Output the AttachmentParent, the AttachmentChild and the transform.  
            #region AttachmentsPropertiesStep4
            Logger.AddMessage(new LogMessage("Child: " + att.AttachmentChild.Name +
                " is attached to Parent: " + att.AttachmentParent.Name +
                " and has transform: '" + transStr + "'"));
            #endregion
        }
    }
    catch
    {
        Project.UndoContext.CancelUndoStep(CancelUndoStepType.Rollback);
        throw;
    }
    finally
    {
        Project.UndoContext.EndUndoStep();
    }
    #endregion
}
Version Information

Supported in: 1.0.0.0
See Also