Displaying MOLE symbology with the GlobeControl


Purpose
This sample demonstrates how to load, display, and update symbology generated by MOLE in a GlobeControl-based application, which contains some of the basic functionality available in ArcGlobe. The following include the concepts shown in this sample:
  • Loading a feature class as a MOLE force element layer in the GlobeControl.
  • Setting MOLE 3D display options, such as draped or extruded.
  • Updating the GlobeControl after adding a new feature to the MOLE feature class, or after moving and updating features from the MOLE feature class.
 
Windows Vista users—If this sample is run on a computer with Windows Vista, the labels on billboard or extruded MOLE graphics might not show correctly and might contain box-like characters or other unexpected characters. This is a known issue with the MOLE 3D application programming interface (API) when billboard or extruded modes are enabled. (This will be addressed in a future release.)

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/mole_globe.mdb.
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 the sample
  1. Build the MoleGlobeControlApp solution.
  2. Run MoleGlobeControlApp.exe. The application uses the GlobeControl, TOCControl, and ToolbarControl.
  3. In the application, click File, click Open Document, then open a .3dd file (without MOLE force elements in it). If you have ArcGlobe installed, open Default_Document.3dd located in <your ArcGIS Installation location>/ArcGlobeData. If you opened Default_Document.3dd, the application window resembles the first screen shot in this sample.
  4. Click the Zoom To Target button on the Globe Control application window, then click the southwestern United States region on the map display area (this region is shown in the second screen shot in this sample). The map display zooms in to the region.
  5. Click the Add Unit button. A new force element appears with a label of "Test Insert Unit 1” (you might have to wait to allow the display to refresh). Click the unit a few times to zoom in close enough to read its label and verify that the unit is using the draped-and-billboarded 3D display option.
  6. Click Add Unit again, click the Zoom In/Out button (in the first screen shot), then right-click and drag the mouse pointer up or down to zoom out until you see the force element added in this step.
  7. Click Add Unit a few more times. Every time you click Add Unit, a force element is added to a randomly selected location in the southwestern United States. Each graphic you add will have a different affiliation (four affiliations are cycled through; therefore, you should see a different fill color and in some cases, a different shape) than the one added before it.
  8. Click the Move Units button to move all MOLE graphics in the MOLE force element layer at once.


  9. Screen shot showing the Globe Control application window.


    Screen shot showing the southwestern United States region on the map display.

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.Designer.vb Form for displaying MOLE symbols using the GlobeControl.
MainForm.resx Resources for the form for displaying MOLE symbols using the GlobeControl.
MainForm.vb Form for displaying MOLE symbols using the GlobeControl.
Program.vb Secures and releases resources for the application.
Download the VB.NET files
MainForm.cs Form for displaying MOLE symbols using the GlobeControl.
MainForm.Designer.cs Form for displaying MOLE symbols using the GlobeControl.
MainForm.resx Resources for the form for displaying MOLE symbols using the GlobeControl.
Program.cs Secures and releases resources for the application.
Download the C# files

Download the files for all languages

See Also:

DefenseSolutions library overview–Managing MOLE graphics as MOLE layers
Using military symbology and symbol-based graphics
Using the GlobeControl
Sample: Displaying symbol-based MOLE graphics on a MapControl




Additional Requirements
  • A .mdb file containing a MOLE force element feature class, which is used in this sample, can be found at <Your ArcObjects Developer Kit Installation location>/Samples/Data/MilitaryOverlayEditor/mole_globe.mdb.

Development licensing Deployment licensing
Engine Developer Kit: Military Overlay Editor Engine Runtime: Military Overlay Editor, 3D
ArcView: Military Overlay Editor, 3D Analyst
ArcEditor: Military Overlay Editor, 3D Analyst
ArcInfo: Military Overlay Editor, 3D Analyst