RoutineTextRange Property |
Namespace:
ABB.Robotics.Controllers.RapidDomain
Assembly:
ABB.Robotics.Controllers (in ABB.Robotics.Controllers.dll) Version: 6.5.129.0
Syntaxpublic TextRange TextRange { get; }Property Value
Type:
TextRange
Exceptions
ExamplesThis example uses the property
TextRange to retrieve the start row of a specified RAPID routine.
The start row is then used to create the
RapidEditorInitData needed to launch the Program Editor at the specified routine.
public void ShowRoutine(ABB.Robotics.Tps.Taf.ITpsViewLaunchServices iTpsSite, string taskName, Module mod, string routineName)
{
Routine routine = null;
int startRow = 0;
object cookie;
try
{
routine = mod.GetRoutine(routineName);
startRow = routine.TextRange.Begin.Row;
ABB.Robotics.Tps.Taf.RapidEditorInitData initData = new ABB.Robotics.Tps.Taf.RapidEditorInitData(taskName, mod.Name, startRow);
iTpsSite.LaunchView(ABB.Robotics.Tps.Taf.FpStandardView.RapidEditor, initData, true, out cookie);
}
catch (GeneralException ee)
{
}
catch (System.Exception ee)
{
}
finally
{
if (routine != null)
{
routine.Dispose();
routine = null;
}
}
}
See Also