Click or drag to resize
RsProcessDefinitionCollection Class
A collection of RsProcessDefinition objects.
Inheritance Hierarchy
SystemObject
  ABB.Robotics.RobotStudio.StationsRsProcessDefinitionCollection

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 RsProcessDefinitionCollection : ICollection, 
	IEnumerable, IEnumerable<RsProcessDefinition>

The RsProcessDefinitionCollection type exposes the following members.

Properties
Methods
  NameDescription
Public methodCode exampleAdd
Adds a RsProcessDefinition to the collection.
Public methodClear
Removes all items from the collection
Public methodCode exampleContains(String)
Check to see if a named item is part of the collection.
Public methodContains(RsProcessDefinition)
Public methodCopyTo(Array, Int32)
Public methodCopyTo(RsProcessDefinition, 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
Removes a RsProcessDefinition from the collection.
Public methodToArray
Public methodToString (Inherited from Object.)
Public methodCode exampleTryGetProcessDefinition
Gets the definition with the specified name.
Top
Examples
RsProcessDefinitionCollection.
RsProcessDefinition Example
Project.UndoContext.BeginUndoStep("RsProcessDefinitionExample");
try
{
    Station station = Station.ActiveStation;

    // Create a new RsProcessDefinition.
    RsProcessDefinition myProcDef = new RsProcessDefinition("", "SearchL", "");

    // Name it "SearchL".
    myProcDef.Name = "SearchL";

    // Create a new RsInstructionTemplate.
    RsInstructionTemplate mySearchLInstrTempl = new RsInstructionTemplate();

    // Name it "SearchL".
    mySearchLInstrTempl.Name = "SearchL";

    // Create the instruction arguments for the InstructionTemplate, and add them to it.
    RsInstructionArgument myArg = new RsInstructionArgument("Stop", "");
    myArg.Enabled = true;
    mySearchLInstrTempl.InstructionArguments.Add(myArg);
    myArg = new RsInstructionArgument("PStop", "");
    myArg.Enabled = false;
    mySearchLInstrTempl.InstructionArguments.Add(myArg);
    myArg = new RsInstructionArgument("SStop", "");
    myArg.Enabled = false;
    mySearchLInstrTempl.InstructionArguments.Add(myArg);
    myArg = new RsInstructionArgument("Sup", "");
    myArg.Enabled = false;
    mySearchLInstrTempl.InstructionArguments.Add(myArg);
    myArg = new RsInstructionArgument("Signal", "di1");
    myArg.Enabled = true;
    mySearchLInstrTempl.InstructionArguments.Add(myArg);
    myArg = new RsInstructionArgument("Flanks", "");
    myArg.Enabled = false;
    mySearchLInstrTempl.InstructionArguments.Add(myArg);
    myArg = new RsInstructionArgument("SearchPoint", "");
    myArg.Enabled = true;
    mySearchLInstrTempl.InstructionArguments.Add(myArg);
    myArg = new RsInstructionArgument("ToPoint", "");
    myArg.Enabled = true;
    mySearchLInstrTempl.InstructionArguments.Add(myArg);
    myArg = new RsInstructionArgument("ID", "");
    myArg.Enabled = false;
    mySearchLInstrTempl.InstructionArguments.Add(myArg);
    myArg = new RsInstructionArgument("Speed", "v1000");
    myArg.Enabled = true;
    mySearchLInstrTempl.InstructionArguments.Add(myArg);
    myArg = new RsInstructionArgument("V", "");
    myArg.Enabled = true;
    mySearchLInstrTempl.InstructionArguments.Add(myArg);
    myArg = new RsInstructionArgument("T", "");
    myArg.Enabled = false;
    mySearchLInstrTempl.InstructionArguments.Add(myArg);
    myArg = new RsInstructionArgument("Tool", "");
    myArg.Enabled = true;
    mySearchLInstrTempl.InstructionArguments.Add(myArg);
    myArg = new RsInstructionArgument("WObj", "");
    myArg.Enabled = false;
    mySearchLInstrTempl.InstructionArguments.Add(myArg);
    myArg = new RsInstructionArgument("Corr", "");
    myArg.Enabled = false;
    mySearchLInstrTempl.InstructionArguments.Add(myArg);

    // Create a RsProcessTemplate using the RsInstructionTemplate.
    // Use null arguments since it does not support circular or joint motions.
    RsProcessTemplate myDefaultSearchLProcTempl = new RsProcessTemplate(null, mySearchLInstrTempl, null);

    // Name it "Default".
    myDefaultSearchLProcTempl.Name = "Default";

    // Set the ActiveMotionType to linear.
    myDefaultSearchLProcTempl.ActiveMotionType = MotionType.Linear;

    // Add the process template to the ProcessDefinition.
    myProcDef.ProcessTemplates.Add(myDefaultSearchLProcTempl);

    // Set the process template as the ActiveProcessTemplate. 
    myProcDef.ActiveProcessTemplate = myProcDef.ProcessTemplates[0];

    // Finally add the ProcessDefinition to the ActiveTask.
    station.ActiveTask.ProcessDefinitions.Add(myProcDef);
}
catch
{
    Project.UndoContext.CancelUndoStep(CancelUndoStepType.Rollback);
    throw;
}
finally
{
    Project.UndoContext.EndUndoStep();
}
Version Information

Supported in: 1.0.0.0
See Also