Click or drag to resize

ModuleGetRoutine Method

Gets a Routine object to a specific RAPID routine.

Namespace:  ABB.Robotics.Controllers.RapidDomain
Assembly:  ABB.Robotics.Controllers (in ABB.Robotics.Controllers.dll) Version: 6.5.129.0
Syntax
C#
public Routine GetRoutine(
	string routineName
)

Parameters

routineName
Type: SystemString
Name of the routine.

Return Value

Type: Routine
A Routine object to access the routine. If the routine does not exist, the return value is null.
Exceptions
ExceptionCondition
ArgumentNullExceptionroutineName is null or empty.
Remarks
NOTE:When the returned instance is no longer needed you must call its Dispose method.
Examples
This example uses the method GetRoutine(String)to create a Routine object representing a RAPID routine.
private Routine GetMyRoutine(Module m, string stRoutName)
{
  Routine routine;
  try
  {
    // Create routine object
    routine = m.GetRoutine(stRoutName);
  }
  catch (GeneralException ee)
  {
    // TODO: Add error handling
  }
  catch (System.Exception ee)
  {
    // TODO: Add error handling
  }
  return routine;
}
See Also