Z management properties


This document was published with and applies to ArcGIS 9.3.
Purpose
This sample provides a number of commands and controls for use when editing Z values. The commands are placed on a toolbar called 'Z Management' and are also available individually under the 'Developer Samples' commands category. The controls are placed on an Editor property page called 'Z Capture'.
 
This property page works together with the Z Management toolbar to provide the ability to set the surface, turn on z snapping tolerance and enable draping and set a tolerance.
 
Commands on the toolbar are:
 
  • The Z Capture Mode drop-down menu - allows you to choose one of three z-capture modes. It sets the capture type property when you change the capture type.
  • Current Z - is the editor's CurrentZ control. Which allows you to set a constant z value. It is available in the Customize dialog box, but had been added to this toolbar.
  • Toggle draping - when this button is pressed in, the draping property is set to true. When it is not pressed in the draping property is set to false.
  • Toggle Z Snapping window - opens and closes the Z snapping dockable window. The Z Snapping window looks like the regular Snapping Environment window and provides a checklist box control listing the z-aware layers in the map. Checking a box next to the feature layer name will add z snapping if an x, y snap agent is already set for the feature class.
 
The two samples are packaged together to provide the ability to set and get z-editing properties from IEditorZ and utilize the ability to snap in the z dimension.

Development licensing Deployment licensing
ArcView ArcView
ArcInfo ArcEditor
ArcEditor ArcInfo

How to use

See Using the samples for help on compiling, setting up the debugger, and running the sample (either an exe or dll).

Set up
  1. Open and compile the sample project in Visual Studio. Set up debug application if needed.
  2. Open an existing ArcMap document or open a new document and load a feature class that is z-aware and a surface (TIN, terrain, raster) that overlaps the feature class. The surface will allow you to use the surface capture mode, as well as draping the sketch to the surface.
  3. Add the ZManagement toolbar by clicking View, Toolbars then ZManagement Toobar at the bottom of the list. The property page was registered as an Editor Property Page, so it is automatically placed on the Editing Options dialog box. (Click the Editor drop menu and click 'Options…')

Z Capture Mode control
  1. This is a drop-down control, so choosing from the three capture types will change the IEditorZ::ZCapturetype to the selected value.
  2. If you have more than one surface in your map, the Editor will search the table of contents and return the first surface that covers the display. This is refered to as the default surface when you open the property page.
  3. To change the surface to another one in the map, open the Z Capture property page (step 3 of Set up). Click the ZCapture and click the Surface drop-down, which contains the available surfaces in the map.
  4. The Surface combo box will only be enabled if the capture mode is set to surface.

Current Z Control
  1. To change the current z value, just enter the value in the text box. When you click outside the text box, the new value will be set.

Toggle Drape Command
  1. To enable this command, the z capture mode must be Surface and you must be in an edit session.
  2. This command button is a toggling command and when it is clicked on it becomes pressed in. This sets the IEditorZ::Draping property to true.
  3. To use and specify a tolerance for draping the sketch over a surface, open the ZCapture editor property page (step 3 of Set up).
  4. Check Use Draping tolerance and enter a value in the text box.
  5. Click OK or Apply at the bottom of the page.

Z Snapping Dockable Window
  1. To enable this command you must be in an edit session.
  2. Click the command to show the window. Click it again to hide the window.
  3. Once the z snap window is opened, the checked list box will only list feature classes that are z-aware.
  4. To set z snapping, make sure the layer already has x, y snapping set to either edge, vertex, or endpoint.
  5. To use and specify a tolerance for z-snapping open the ZCapture editor property page (step 3 of Set up).
  6. Check Snap Z Tolerance to set UseSnapZTolerance to true.
  7. Enter a value in the text box and click Ok.

Apply an offset to the sketch z value
  1. Open the ZCapture editor property page (Set up Step 3).
  2. Check the box next to the Offset label.
  3. Enter an offset value in the text box and click outside the text box.
  4. Click OK or Apply at the bottom of the page.

Additional information

The Z Snapping Dockable Window:
 
 
The Z Management toolbar:
 
The Z Management property page:
 
 


useDrapeCommand.cs The CSharp file containing the command use to toggle draping on the sketch.
zCaptureModeControl.cs The CSharp file containing the implementation for the z capture mode control.
ZManagementToolbar.cs The CSharp file containing the toolbar implementation.
zSnapDockableWindow.cs The dockable window definition class.
zSnapDockableWindowCommand.cs Command toggling visibility of dockable window
zPropertiesExtension.cs The CSharp file containing the extension used to persist the surface name.
zManagementPropertyPage.cs The CSharp editor property page implementation.
Download the C# files
ToggleDrapeVBNet.vb The VBNet file containing the command to toggle draping on the sketch.
ZCaptureModeControl.vb The VBNet file containing the implementation for the z capture mode control.
ZManagementToolbarVBNet.vb The VBNet file containing the toolbar implementation.
zSnapDockableWindow.vb The dockable window definition class.
zSnapDockableWindowCommand.vb The VBNet file containing the command toggling and setting up the dockable window.
zPropertiesExtension.vb The VBNet file containing the extension used to persist the surface name.
zManagementPropertyPage.vb The VBNet Editor Property Page implementation.
Download the VB.NET files

Download the files for all languages

See Also:

How to work with Z-values in the Editor
IEditorZ interface
ISnapEnvironment2 interface