How to use
See How to use ArcGIS samples for help on compiling, setting up the debugger, and running the sample.
Data has been provided for your use with this sample. It can be found at
<Your ArcGIS Developer Kit Install directory>/Samples/data/MilitaryOverlayEditor/molebasemap.mxd.
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.
Running and using the sample
- Build the MoleSymbols solution and run MoleSymbols.exe. The application uses a MapControl, TOCControl, ToolbarControl, and LicenseControl.
- Click the Add MOLE Symbol button, then click the map a few times. Each time you click, the graphic whose ID appears in the Symbol ID code box appears on the map (see the following screen shot). You can edit the Symbol ID code in the box or let it be replaced randomly each time you click. You can change the size of the graphic by changing the value in the Symbol size box (the size is relative to the screen). Note: The GIS toolbar is disabled while the Add MOLE Symbol button is active (highlighted). When you're finished using the tool, click its button again to deactivate it and enable the GIS toolbar.
- Click the Add a Sample Line Graphic button a few times. Each time you click, a random fix task line appears in the current view extent.
- Click the Add a Sample Area Graphic button a few times. Each time you click, a random obstacle restricted area graphic appears in the current view extent.
- Click the Select and Drag Graphics button, click a graphic to select it (a selection frame appears around the graphic), and drag the graphic to move it. Click an empty part of the map to clear the selection. Note: The GIS toolbar is disabled while the Select and Drag Graphics button is active (highlighted). When you're finished using the tool, click its button again to deactivate it and enable the GIS toolbar.
- Click the Move Units button to move all graphics on the map ¾ degrees east and ¾ degrees north.
- Click the Add a Bunch of Graphics button to add several force element graphics to the map.
![MOLE Symbols toolbar, force element graphic, and selection frame](./bitmaps/2b0f4eab-21a1-4fdb-ab9c-95fdb5deb6371.png)
Modifying the sample
- In function/method tsbAdd200_Click, you can alter the number of graphics by changing the for loop’s limit. You can also change the radius ratio and the number of force elements in each circular arrangement.
- In tsbAddArea_Click(), uncomment the fill color and outline symbol settings to see more colorful and diverse areas.
- In tsbAddLine_Click(), uncomment the line color and width settings to see more colorful and diverse arrows.
- In tsbMoveUnits_Click(), experiment with different delta vectors or add a state machine to make the symbols follow a path.
- In DrawSymbol(), uncomment the fill setting and see what force elements look like with no fill.
- In GetLabels(), comment and uncomment various combinations of property settings and observe the results.
- In SelectElements(), experiment with different search tolerances. Zoom into a region of the world and observe the selection behavior. Compute a search tolerance relative to the current map extent.
Additional information
Many of the ArcGIS Military Analyst and MOLE extension application programming interface (API) objects you have used in the past have equivalent or near equivalent objects in the ArcGIS 10 ArcObjects API. These new objects should now be used and do not require a Military Analyst extension or MOLE extension license. See Migrating from Military Analyst and MOLE for information on how to accomplish tasks in ArcGIS 10 that previously required the Military Analyst and MOLE APIs.MainForm.vb | Main form of the application. |
MainForm.Designer.vb | Main form of the application. |
MainForm.resx | Resources for the application. |
DemoSIC.vb | Test Symbol ID generator. |
Program.vb | Entry point for the application. |
MainForm.cs | Main form of the application. |
MainForm.Designer.cs | Main form of the application. |
MainForm.resx | Resources for the application. |
DemoSIC.cs | Test Symbol ID generator. |
Program.cs | Entry point for the application. |
Download the files for all languages
See Also:
DefenseSolutions library overview - Managing MOLE Graphics as Standard ArcObjectsUsing military symbology and symbol-based graphics
Sample: Displaying symbol-based MOLE graphics on a MapControl
Sample: Decluttering MOLE graphics using leadering and stacking
Sample: Arranging MOLE graphics using manual decluttering
Development licensing | Deployment licensing |
---|---|
Engine Developer Kit: Military Overlay Editor | Engine Runtime: Military Overlay Editor |
ArcView: Military Overlay Editor | |
ArcEditor: Military Overlay Editor | |
ArcInfo: Military Overlay Editor |