RsInstructionTemplateCollection Class |
Namespace: ABB.Robotics.RobotStudio.Stations
public class RsInstructionTemplateCollection : ICollection, IEnumerable, IEnumerable<RsInstructionTemplate>
The RsInstructionTemplateCollection type exposes the following members.
Name | Description | |
---|---|---|
Add |
Adds a RsInstructionTemplate object to the collection.
| |
Contains | ||
CopyTo(Array, Int32) | ||
CopyTo(RsInstructionTemplate, Int32) | ||
Equals | (Inherited from Object.) | |
Finalize | (Inherited from Object.) | |
GetEnumerator | ||
GetHashCode | (Inherited from Object.) | |
GetType | (Inherited from Object.) | |
MemberwiseClone | (Inherited from Object.) | |
Remove |
Removes a RsInstructionTemplate object from the collection.
| |
ToArray | ||
ToString | (Inherited from Object.) | |
TryGetInstructionDescription | Gets the template with the specified name. |
Project.UndoContext.BeginUndoStep("RsActionInstructionDescriptionExample"); try { Station station = Station.ActiveStation; RsInstructionDescription myInstrDesc; if (station.ActiveTask.InstructionDescriptions.TryGetInstructionDescription("ConfL", out myInstrDesc)) { // Cast myInstrDesc to a RsActionInstructionDescription. RsActionInstructionDescription myConfLDesc = (RsActionInstructionDescription)myInstrDesc; // Output to the logger. Logger.AddMessage(new LogMessage("The ActionInstructionDescription '" + myConfLDesc.Name + "' has the following property values:")); Logger.AddMessage(new LogMessage("InformationText: " + myConfLDesc.InformationText)); if (myConfLDesc.ActiveTemplate != null) { Logger.AddMessage(new LogMessage("ActiveTemplate: " + myConfLDesc.ActiveTemplate.Name)); } Logger.AddMessage(new LogMessage("The following instruction parameters:")); int i = 1; foreach (RsInstructionParameterGroup rspg in myConfLDesc.InstructionParameterGroups) { Logger.AddMessage(new LogMessage("In group " + i + ":")); i++; foreach (RsInstructionParameter rsip in rspg.InstructionParameters) { Logger.AddMessage(new LogMessage("Parameter Name: '" + rsip.Name + "' Optional: '" + rsip.Optional.ToString() + "' Pointtype: '" + rsip.PointType.ToString() + "' SyncReferencedData: '" + rsip.SyncReferencedData.ToString() + "'")); } } Logger.AddMessage(new LogMessage("The following instruction templates:")); foreach (RsInstructionTemplate rsit in myConfLDesc.InstructionTemplates) { Logger.AddMessage(new LogMessage("Template '" + rsit.Name + "'")); Logger.AddMessage(new LogMessage("Has the following InstructionArguments:")); foreach (RsInstructionArgument rsia in rsit.InstructionArguments) { Logger.AddMessage(new LogMessage("Argument Name: '" + rsia.Name + "' Enabled: '" + rsia.Enabled.ToString() + "' Value: '" + rsia.Value + "'")); } } } else { Logger.AddMessage(new LogMessage("Failed to get the IstructionDescription for 'ConfL'")); } } catch { Project.UndoContext.CancelUndoStep(CancelUndoStepType.Rollback); throw; } finally { Project.UndoContext.EndUndoStep(); }