Committing ink sketches using the controls ink commands


Purpose
This sample demonstrates how the Ink Sketch Commit options can be set and how the ink engine environment events are fired on either a desktop or Tablet PC. This sample is used in conjunction with the MapControl, ToolbarControl, and controls commands.

How to use

See How to use ArcGIS samples for help on compiling, setting up the debugger, and running the sample. If the sample has associated data, you will find that the sample's zip file includes a "data" folder alongside the language folders. However, you will need to update the sample to point to the location of the data once you have extracted all the files.

  1. Load some map data and navigate around using the tools and scroll bars in the application.
  2. Use the Ink Sketch Commit Options controls on the application form to set the ink sketch commit strategy (manual or automatic).
  3. Examine the Sketch Report on the application form to identify when the ink is being collected.

Additional information

The ink collection and sketches are managed by the singleton object called EngineInkEnvironment. One of its properties, ToolCommitType, is used to indicate whether the ink sketch is committed manually, automatically as a graphic, or automatically as text. Setting this commit strategy is done by clicking the appropriate buttons in the Ink Sketch Options on the application form.
Automatically committing an ink sketch as text is only available on a Tablet PC where a recognizer can convert the graphic to a TextElement. The application examines whether it is executing on a Tablet PC by making a Windows application programming interface (API) call to the GetSystemMetrics method in the User32.dll.
Feedback on the ink capture process is provided in the Report Sketch area on the application form. The GraphicsContainer of the MapControl is examined to determine how many InkGraphics are present. The Report Sketch area also indicates whether the ink collector is or is not collecting ink by listening to the OnStart and OnStop events of the EngineInkEnvironmentEvent class. Ink is collected when either the Ink tool, Highlight tool, or Eraser tool have been selected for use.


AssemblyInfo.cs Assembly information.
InkSketchCommit.cs Form file.
Download the C# files
AssemblyInfo.vb Assembly information.
InkSketchCommit.vb Form file.
Download the VB.NET files

Download the files for all languages

See Also:

EngineInkEnvironment Class
IEngineInkEnvironment Interface
IEngineInkEnvironmentEvents Interface




Development licensing Deployment licensing
Engine Developer Kit Engine
ArcGIS for Desktop Basic
ArcGIS for Desktop Standard
ArcGIS for Desktop Advanced