method DocumentLockModeChangedEventArgs.Veto() is missing
Posted: Tue Mar 17, 2020 7:21 pm
Hi,
I would need to stop a particular command execution.
In AutoCAD by handling the event Application.DocumentManager.DocumentLockModeChanged and calling the event parameter DocumentLockModeChangedEventArgs.Veto() the command can be cancelled. (See for example https://www.keanw.com/2006/10/blocking_autoca.html)
However in the IntelliCAD implementation the Veto method is missing.
Would you able to recommend how to achieve the same in IntelliCAD?
Here is a code example. Args.Veto() can not be resolved
Kind regards
Geza
I would need to stop a particular command execution.
In AutoCAD by handling the event Application.DocumentManager.DocumentLockModeChanged and calling the event parameter DocumentLockModeChangedEventArgs.Veto() the command can be cancelled. (See for example https://www.keanw.com/2006/10/blocking_autoca.html)
However in the IntelliCAD implementation the Veto method is missing.
Would you able to recommend how to achieve the same in IntelliCAD?
Here is a code example. Args.Veto() can not be resolved
Code: Select all
private static void DocumentLockModeChanged(object sender, DocumentLockModeChangedEventArgs args)
{
_runCustomCommand = false;
Editor editor = Application.DocumentManager.MdiActiveDocument.Editor;
if (args.GlobalCommandName.Length > 0)
{
if (_selectedEntId != ObjectId.Null &&
!string.IsNullOrEmpty(_customCmd) &&
args.GlobalCommandName.ToUpper() != _customCmd.ToUpper())
{
editor.WriteMessage(
"\nCommand {0} is vetoed!", args.GlobalCommandName);
args.Veto(); <= can not resolve Veto
_runCustomCommand = true;
}
}
}
Kind regards
Geza