Click or drag to resize
RsProcessTemplate Class
An RsProcessTemplate is an instance of a process definition. It contains a collection of 1-3 RsInstructionTemplates. The templates corresponds to the RsMoveInstructionDescriptions of the RsProcessDefinition that the RsProcessTemplate is a memeber of.
Inheritance Hierarchy
SystemObject
  ABB.Robotics.RobotStudioProjectObject
    ABB.Robotics.RobotStudio.StationsRsProcessTemplate

Namespace:  ABB.Robotics.RobotStudio.Stations
Assembly:  ABB.Robotics.RobotStudio.Stations (in ABB.Robotics.RobotStudio.Stations.dll) Version: 7.0.8747.636
Syntax
C#
public sealed class RsProcessTemplate : ProjectObject

The RsProcessTemplate type exposes the following members.

Constructors
  NameDescription
Public methodCode exampleRsProcessTemplate
Creates and initializes a new RsProcessTemplate object.
Top
Properties
  NameDescription
Public propertyCode exampleActiveMotionType
Gets or Sets the ActiveMotionType.
Public propertyAttributes
Returns a collection of dynamic attributes attached to the object
(Inherited from ProjectObject.)
Public propertyChildren
Enumerates all child objects.
(Inherited from ProjectObject.)
Public propertyContainingProject
Returns the Project that this object is a part of, or null if it is not part of a Project.
(Inherited from ProjectObject.)
Public propertyDisplayName
Gets the name of the the object that should be displayed in the GUI.
(Inherited from ProjectObject.)
Public propertyName
Gets or sets the name of the object
(Inherited from ProjectObject.)
Public propertyParent
Returns the objects parent, if it has one.
(Inherited from ProjectObject.)
Public propertyTypeDisplayName
Gets a localized name for the type of this object.
(Inherited from ProjectObject.)
Public propertyUIVisible
Gets or sets a value that indicates if this object should be displayed in GUI such as an object browser.
(Inherited from ProjectObject.)
Public propertyUniqueId
Gets a persisted, globally unique identifier for this object, that can be used to find the object using the GetObjectFromUniqueId(String) method.
(Inherited from ProjectObject.)
Top
Methods
  NameDescription
Public methodEquals (Inherited from Object.)
Public methodFindObjects
Recursively finds object that satisfy a condition.
(Inherited from ProjectObject.)
Public methodGetHashCode (Inherited from Object.)
Public methodCode exampleGetTemplate
Gets the RsProcessTemplate corresponding to the supplied MotionType.
Public methodGetType (Inherited from Object.)
Public methodCode exampleSetTemplate
Sets the supplied RsProcessTemplate as corresponding to the supplied MotionType.
Public methodToString (Inherited from ProjectObject.)
Top
Examples
RsProcessTemplate example.
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