Class RsProcessDefinitionCollection
Inheritance
RsProcessDefinitionCollection
Assembly: ABB.Robotics.RobotStudio.Stations.dll
Syntax
public class RsProcessDefinitionCollection : ICollection, IEnumerable<RsProcessDefinition>, IEnumerable
Examples
RsProcessDefinitionCollection.
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();
}
Properties
Count
Declaration
public virtual int Count { get; }
Property Value
IsSynchronized
Declaration
public virtual bool IsSynchronized { get; }
Property Value
Item[Int32]
Declaration
public RsProcessDefinition this[int index] { get; }
Parameters
Type |
Name |
Description |
Int32 |
index |
|
Property Value
Item[String]
Declaration
public RsProcessDefinition this[string name] { get; }
Parameters
Type |
Name |
Description |
String |
name |
|
Property Value
Parent
Declaration
public ProjectObject Parent { get; }
Property Value
SyncRoot
Declaration
public virtual object SyncRoot { get; }
Property Value
Methods
Add(RsProcessDefinition)
Declaration
public void Add(RsProcessDefinition processDefinition)
Parameters
Examples
Add RsProcessDefinition.
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();
}
Clear()
Removes all items from the collection
Declaration
Contains(RsProcessDefinition)
Declaration
public bool Contains(RsProcessDefinition obj)
Parameters
Returns
Contains(String)
Check to see if a named item is part of the collection.
Declaration
public bool Contains(string name)
Parameters
Type |
Name |
Description |
String |
name |
The name to look for.
|
Returns
Type |
Description |
Boolean |
True if the named item is part of the collection, false otherwise.
|
Examples
RsProcessDefinitionCollection.
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();
}
CopyTo(RsProcessDefinition[], Int32)
Declaration
public void CopyTo(RsProcessDefinition[] array, int index)
Parameters
CopyTo(Array, Int32)
Declaration
public virtual void CopyTo(Array array, int index)
Parameters
GetEnumerator()
Declaration
public virtual IEnumerator GetEnumerator()
Returns
Remove(RsProcessDefinition)
Declaration
public void Remove(RsProcessDefinition processDefinition)
Parameters
Examples
Remove RsProcessDefinition.
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();
}
ToArray()
Declaration
public RsProcessDefinition[] ToArray()
Returns
TryGetProcessDefinition(String, out RsProcessDefinition)
Gets the definition with the specified name.
Declaration
public bool TryGetProcessDefinition(string name, out RsProcessDefinition processDefinition)
Parameters
Type |
Name |
Description |
String |
name |
The name of the definition to get.
|
RsProcessDefinition |
processDefinition |
When this method returns, contains the definition associated with the specified name,
if the name is found; otherwise, null.
|
Returns
Type |
Description |
Boolean |
true if the RsProcessDefinitionCollection contains an element with the specified name; otherwise, false.
|
Examples
TryGetProcessDefinition.
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();
}
Exceptions