Click or drag to resize
RsInstructionCollection Class
A collection of RsInstruction objects.
Inheritance Hierarchy
SystemObject
  ABB.Robotics.RobotStudio.StationsRsInstructionCollection

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 RsInstructionCollection : IList<RsInstruction>, 
	ICollection<RsInstruction>, IEnumerable<RsInstruction>, IEnumerable, 
	ICollection

The RsInstructionCollection type exposes the following members.

Properties
Methods
  NameDescription
Public methodCode exampleAdd(RsInstruction)
Add an instruction to a path procedure.
Public methodCode exampleAdd(RsInstruction, RsInstruction)
Add an instruction to a path procedure.
Public methodClear
Public methodContains
Public methodCopyTo(Array, Int32)
Public methodCopyTo(RsInstruction, Int32)
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetEnumerator
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Public methodIndexOf
Public methodInsert
Protected methodMemberwiseClone (Inherited from Object.)
Public methodCode exampleRemove
Removes an instruction from a path procedure.
Public methodRemoveAt
Public methodToArray
Public methodToString (Inherited from Object.)
Top
Examples
InstructionCollection.
Create RsMoveInstruction Example
Project.UndoContext.BeginUndoStep("RsMoveInstructionCreate");
try
{
    Station station = Station.ActiveStation;

    // First import a robot (a mechanism) and add it to the station.
    // NOTE: Uncomment the following lines and use them insted of the third line with the load command.
    // NOTE: Be sure to change the path if this is not RobotStudio's installation directory.
    // string lib = @"C:\Program Files\ABB Industrial IT\Robotics IT\RobotStudio 5.13\ABB Library\Robots\IRB140_5_81__01.rslib";
    // GraphicComponentLibrary mechLib = GraphicComponentLibrary.Load(lib, true);
    GraphicComponentLibrary mechLib = GraphicComponentLibrary.Load(Path.Combine(RobotStudioAPI.DataDirectory, "ABB Library\\Robots\\IRB140_5_81__01.rslib"), true);
    Mechanism mechGfx = (Mechanism)mechLib.RootComponent.CopyInstance();
    mechGfx.Name = "IRB140_5_81__01";
    station.GraphicComponents.Add(mechGfx);
Version Information

Supported in: 1.0.0.0
See Also