Click or drag to resize
RsInstructionArgumentCollection Class
A collection of RsInstructionArgument objects.
Inheritance Hierarchy
SystemObject
  ABB.Robotics.RobotStudio.StationsRsInstructionArgumentCollection

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 RsInstructionArgumentCollection : ICollection, 
	IEnumerable, IEnumerable<RsInstructionArgument>

The RsInstructionArgumentCollection type exposes the following members.

Properties
Methods
  NameDescription
Public methodAdd
Add a RsInstructionArgument to the collection.
Public methodCode exampleContains(String)
Check to see if a named item is part of the collection.
Public methodContains(RsInstructionArgument)
Public methodCopyTo(Array, Int32)
Public methodCopyTo(RsInstructionArgument, 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 methodRemove
Removes a RsInstructionArgument from the collection.
Public methodToArray
Public methodToString (Inherited from Object.)
Public methodCode exampleTryGetInstructionArgument
Gets the argument with the specified name.
Top
Examples
InstructionArguments Collection.
RsInstructionArgument Example
Project.UndoContext.BeginUndoStep("RsInstructionArgumentExample");
try
{
    Station station = Station.ActiveStation;

    // Create a RsPathProcedure and add it to the ActiveTask.
    RsPathProcedure myPath = new RsPathProcedure("myPath");
    station.ActiveTask.PathProcedures.Add(myPath);

    // Create a new RobTarget and add it to the ActiveTask.
    RsRobTarget myRobTarget = new RsRobTarget();
    myRobTarget.Name = station.ActiveTask.GetValidRapidName("myRobTarget", "_", 1);
    station.ActiveTask.DataDeclarations.Add(myRobTarget);

    // Create a linear move instruction using the move definition and the default template.
    RsMoveInstruction myMoveL = new RsMoveInstruction(station.ActiveTask, "Move", "Default", MotionType.Linear, "wobj0", myRobTarget.Name, "tool0");
    myPath.Instructions.Add(myMoveL);

    // Output some information regarding the MoveInstruction to the logger.
    Logger.AddMessage(new LogMessage("The MoveInstruction'" + myMoveL.Name + "' has the following InstructionArguments"));

    foreach (RsInstructionArgument instrArg in myMoveL.InstructionArguments)
    {
        Logger.AddMessage(new LogMessage("The InstructionArgument '" + instrArg.Name +
                                         "' has value = '" + instrArg.Value +
                                         "' and is enabled:'" + instrArg.Enabled.ToString() + "'"));
    }

    if (myMoveL.InstructionArguments.Contains("ToPoint"))
    {
        Logger.AddMessage(new LogMessage("The collection contains the ToPoint argument!"));
    }
    else
    {
        Logger.AddMessage(new LogMessage("The collection does not contain the ToPoint argument!"));
    }

    RsInstructionArgument myInstrArg;
    if (myMoveL.InstructionArguments.TryGetInstructionArgument("ToPoint", out myInstrArg))
    {
        Logger.AddMessage(new LogMessage("The value of the ToPoint argument is: '" + myInstrArg.Value + "'"));
    }
    else
    {
        Logger.AddMessage(new LogMessage("Could not get the ToPoint argument!"));
    }
}
catch
{
    Project.UndoContext.CancelUndoStep(CancelUndoStepType.Rollback);
    throw;
}
finally
{
    Project.UndoContext.EndUndoStep();
}
Version Information

Supported in: 1.0.0.0
See Also