AttachmentCollection Class |
Namespace: ABB.Robotics.RobotStudio.Stations
public class AttachmentCollection : ICollection, IEnumerable, IEnumerable<Attachment>
The AttachmentCollection type exposes the following members.
Name | Description | |
---|---|---|
Add |
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.
| |
Contains | ||
CopyTo(Array, Int32) | ||
CopyTo(Attachment, Int32) | ||
Equals | (Inherited from Object.) | |
Finalize | (Inherited from Object.) | |
GetEnumerator | ||
GetHashCode | (Inherited from Object.) | |
GetType | (Inherited from Object.) | |
MemberwiseClone | (Inherited from Object.) | |
Remove |
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.
| |
ToArray | ||
ToString | (Inherited from Object.) |
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 }