This document is archived and information here might be outdated.  Recommended version.


INotifyZFinalize Interface (ArcObjects .NET 10.5 SDK)
ArcObjects Library Reference (Editor)  

INotifyZFinalize Interface

Provides access to a callback method the Editor will call if Z Attribution of a geometry fails.

Product Availability

Available with ArcGIS Desktop.

Description

This interface is new at ArcGIS 9.3.

Members

Description
Method Failed Callback is called when Z Capture fails, allows client an opportunity to set a custom Z.

[C#]
bool INotifyZFinalize.Failed(IGeometry Geometry)
{
  // When your Failed method is called, you have the opportunity to address the
  // failure case on the input geometry. If you choose to handle it you should
  // return TRUE to notify the editor that the client (your extension) 
  // handled it. Otherwise the editor will use its fallback logic (usually
  // apply current Z) prior to storage
  
  bool bHandled=false;
  if (Geometry.GeometryType == esriGeometryType.esriGeometryPoint)
{
IZAware zAware=(IZAware)Geometry;
zAware.ZAware=true;
((IPoint)Geometry).Z=5;
     bHandled=  true;
  
  }  
  else
{
IZ z=(IZ)Geometry;
z.CalculateNonSimpleZs();
bHandled=true; } return bHandled; }
[Visual Basic .NET]

Private Function Failed(ByVal Geometry As IGeometry) As Boolean Implements INotifyZFinalize.Failed
  ' When your Failed method is called, you have the opportunity to address the
  ' failure case on the input geometry. If you choose to handle it you should
  ' return TRUE to notify the editor that the client (your extension)
  ' handled it. Otherwise the editor will use its fallback logic (usually
  ' apply current Z) prior to storage  bool bHandled=false;
  If Geometry.GeometryType=esriGeometryType.esriGeometryPoint Then
   Dim zAware As IZAware=CType(Geometry, IZAware)
   zAware.ZAware=True
   CType(Geometry, IPoint).Z=5
   bHandled=True
  Else
    Dim z As IZ=CType(Geometry, IZ)
    z.CalculateNonSimpleZs()
    bHandled=True
  End If

  Return bHandled
End Function