ModuleDeleteRapidData Method (String, String) |
Removes a specified RAPID data instance from the module.
Namespace:
ABB.Robotics.Controllers.RapidDomain
Assembly:
ABB.Robotics.Controllers (in ABB.Robotics.Controllers.dll) Version: 6.5.129.0
Syntax public bool DeleteRapidData(
string dataName,
string dataType
)
Parameters
- dataName
- Type: SystemString
Name of the RAPID data instance. - dataType
- Type: SystemString
Name of the data type.
Return Value
Type:
BooleanReturns true if the RAPID data instance was successfully deleted. Otherwise false or an exception.
Exceptions Remarks This method will never delete data if the execution context is lost. Then use the overloaded method with forceToDelete set to true.
Examples
This example deletes a user defined RAPID data instance provided the execution context is not lost.
If the execution context is lost an exception is thrown and it is up to the programmer to decide how to proceed.
A message box can be shown for example, explaining the situation to the user. If the user still want to delete,
use the overloaded
DeleteRapidData method with the
forceToDelete argument set to true.
using ABB.Robotics;
using ABB.Robotics.Controllers;
using ABB.Robotics.Controllers.RapidDomain;
...
Controller c = new Controller();
Task[] allTasks = c.Rapid.GetTasks();
Task firstTask = allTasks[0];
Module mod = _task.GetModule("Conveyor");
mod.DeleteRapidData("SubPath2","pointtype");
...
See Also