function Leadtools.Annotations.Automation.AnnAutomation.cancel()
Cancels any operation currently being performed in this AnnAutomation. An operation can be:
(Design user mode) A AnnDrawDesigner is drawing a new object.
(Design user mode) A AnnEditDesigner is editing an existing object.
(Design user mode) The user is selecting a group of objects.
(Run user mode) A AnnRunDesigner is running an object.
To end the current operation with commiting, use EndDesigner.
Use the following code snippet to determine the type of operation currently being performed by this automation:
// Get the current designer
var designer = annAutomation.currentDesigner;
if(lt.Annotations.Automation.AnnDrawDesigner.isInstanceOfType(designer))
{
// Drawing. You can cast further to get the specific draw designer or check the object ID using designer.TargetObject.Id
// You can also use designer.hasStarted to check whether the designer has started working (is actually drawing an object)
}
else if(lt.Annotations.Automation.AnnEditDesigener.isInstanceOfType(designer))
{
// Edit. You can cast further to get the specific draw designer or check the object ID using designer.TargetObject.Id
// You can also use designer.hasStarted to check whether the designer has started working (is actually editing an object)
}
else if(lt.Annotations.Automation.AnnRunDesigener.isInstanceOfType(designer))
{
// Run. You can cast further to get the specific draw designer or check the object ID using designer.TargetObject.Id
}
else
{
// No operation
}