We have dockable window with textbox and a button. The button run click event but need this button as a tool to capture polygon then update the attribute value in the polygon featureclass field.
As per another forum discussion created a class 'Draw Tool : ESRI.ArcGIS.Desktop.AddIns.Tool' added 'Draw Tool' in 'Config.esriaddinx' under commands
<Button id="DataCapture_DrawTool" class="DrawTool"...>
Then get the IDs.DrawTool button click event code: SnippetUIDClass uid = new UIDClass(); uid.Value = ThisAddIn.IDs.DrawTool; ICommandItem commandItem = ArcMap.Application.Document.CommandBars.Find(uid, false, false); ArcMap.Application.CurrentTool = commandItem;
At last line it thrown an error.
Error description: An unhandled exception of type 'System.ArgumentException' occurred in DataCapture.dll
Additional information: Value does not fall within the expected range
Appreciate your help in advance.
No one here