|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IEngineEditSketch
Provides access to members that manage the edit sketch.
This interface is new at ArcGIS 9.3.
The purpose of the IEngineEditSketch interface is to manage the geometry that will be used by EngineEditor.
The EngineEditor automatically creates a new empty geometry (Geometry) with the same geometry type (GeometryType) as the target layer (IEngineEditLayers::TargetLayer). Use the AddPoint method to create the edit sketch geometry and finishSketch to signal to the current task (IEngineEditor::CurrentTask) that the geometry is ready for use. The current task takes the geometry and performs some action. For example, the Create New Feature task takes the geometry and stores it in the layer as a new feature.
Method Summary | |
---|---|
void |
addPoint(IPoint point,
boolean allowUndo)
Adds a point to the edit sketch. |
void |
finishSketch()
Completes the current edit sketch. |
void |
finishSketchPart()
Completes a part for the current edit sketch. |
double |
getCurrentZ()
Current Z value for the edit sketch. |
IPoint |
getEditLocation()
A point that can be used by any custom editing commands. |
IGeometry |
getGeometry()
Geometry stored in the edit sketch. |
int |
getGeometryType()
Type of the geometry stored in the edit sketch. |
IPoint |
getLastPoint()
The last point in the edit sketch. |
int |
getPart()
The index of the current part of the sketch. |
int |
getSegment()
The index of the current segment of the sketch. |
int |
getVertex()
The index of the current vertex of the sketch. |
boolean |
isZAware()
Indicates whether the edit sketch geometry can contain Zs. |
void |
modifySketch()
Notifies listeners that the sketch has been changed. |
void |
refreshSketch()
Invalidates the portion of the display that is occupied by the sketch. |
void |
setCurrentZ(double z)
Current Z value for the edit sketch. |
void |
setEditLocation(int x,
int y)
Sets the part, segment and vertex of the edit sketch at the x,y location. |
void |
setGeometryByRef(IGeometry geometry)
Geometry stored in the edit sketch. |
void |
setGeometryType(int geomType)
Type of the geometry stored in the edit sketch. |
void |
setZAware(boolean aware)
Indicates whether the edit sketch geometry can contain Zs. |
void |
vertexAdded(IPoint point)
Notifies listeners that a vertex has been added to the sketch. |
void |
vertexDeleted(IPoint point)
Notifies listeners that a vertex has been deleted from the sketch. |
void |
vertexMoved(IPoint point)
Notifies listeners that a vertex has been moved in the sketch. |
Method Detail |
---|
int getGeometryType() throws IOException, AutomationException
Use this property in conjunction with the IEngineEditSketch::Geometry property to manage the geometry inside the edit sketch. Setting GeometryType automatically initializes the IEngineEditSketch::Geometry property and vice versa. For example, if you set the GeometryType to esriGeometryPolygon, a new empty Polygon object will be created.
Valid esriGeometryType constants used by IEngineEditSketch are: esriGeometryPoint, esriGeometryMultipoint, esriGeometryPolyline, esriGeometryPolygon and esriGeometryNull.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setGeometryType(int geomType) throws IOException, AutomationException
geomType
- A com.esri.arcgis.geometry.esriGeometryType constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IGeometry getGeometry() throws IOException, AutomationException
This property sets the geometry that the EngineEditor works with and ultimately passes it to the current task. By default, the EngineEditor creates a new empty geometry any time an edit session is started, the target layer is changed, the GeometryType is reset, or a task is completed. There is generally no need, therefore, to set the Geometry property when you are building new geometries.
Do set the Geometry property, however, when you want to bring an existing feature into the edit sketch.
Valid esriGeometryType constants used by IEngineEditSketch are: esriGeometryPoint, esriGeometryMultipoint, esriGeometryPolyline, esriGeometryPolygon and esriGeometryNull.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setGeometryByRef(IGeometry geometry) throws IOException, AutomationException
geometry
- A reference to a com.esri.arcgis.geometry.IGeometry (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IPoint getEditLocation() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.int getPart() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.int getSegment() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.int getVertex() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void addPoint(IPoint point, boolean allowUndo) throws IOException, AutomationException
Use the AddPoint method to add a point to the geometry held in the edit sketch. The point parameter specifies the next point in the sketch. In all cases, new segments are added linking the edit sketch to the provided point, except where the geometry type is set to Point or the point represents the very first point in the edit sketch.
This method fires the IEngineEditEvents::OnVertexAdded, IEngineEditEvents::OnSketchModified and IEngineEditEvents::OnAfterDrawSketch events.
point
- A reference to a com.esri.arcgis.geometry.IPoint (in)allowUndo
- The allowUndo (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void refreshSketch() throws IOException, AutomationException
Call RefreshSketch to invalidate the portion of the display that is occupied by the sketch. Sometimes, however, it may be necessary to invalidate a larger portion of the display in order to get rid of unwanted artifacts. This situation can arise when you shorten the length of a segment since old data may still be erroneously displayed outside of the new sketch geometry.
This method fires the IEngineEditEvents::OnAfterDrawSketch event.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void finishSketch() throws IOException, AutomationException
The FinishSketch method finishes the edit sketch and notifies the EngineEditor's current task of this event which executes the IEngineEditTask::OnFinishSketch method. For example, the "Create New Feature" edit task will create a new feature using the IEngineEditSketch::Geometry. A number of events may be fired by the IEngineEditTask::OnFinishSketch method depending on the task being executed.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void finishSketchPart() throws IOException, AutomationException
The FinishSketchPart method finishes the edit sketch part during the creation of multi-part geometries.
This method fires the IEngineEditEvents::OnAfterDrawSketch event.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IPoint getLastPoint() throws IOException, AutomationException
Use this property to retrieve the last point in the edit sketch.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void modifySketch() throws IOException, AutomationException
Call ModifySketch if you are programmatically modifying an edit sketch. The ModifySketch method will programmatically fire the IEngineEditEvents::OnSketchModified event, thus ensuring that all listening clients are notified.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void vertexAdded(IPoint point) throws IOException, AutomationException
Call VertexAdded if you are programmatically adding a vertex to an edit sketch. The VertexAdded method will programmatically fire the IEngineEditEvents::OnVertexAdded event, thus ensuring that all listening clients are notified.
point
- A reference to a com.esri.arcgis.geometry.IPoint (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void vertexDeleted(IPoint point) throws IOException, AutomationException
Call VertexDeleted if you are programmatically deleting a vertex from an edit sketch. The VertexDeleted method will programmatically fire the IEngineEditEvents::OnVertexDeleted event, thus ensuring that all listening clients are notified.
point
- A reference to a com.esri.arcgis.geometry.IPoint (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void vertexMoved(IPoint point) throws IOException, AutomationException
Call VertexMoved if you are programmatically moving a vertex in an edit sketch. The VertexMoved method will programmatically fire the IEngineEditEvents::OnVertexMoved event, thus ensuring that all listening clients are notified.
point
- A reference to a com.esri.arcgis.geometry.IPoint (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setEditLocation(int x, int y) throws IOException, AutomationException
Call the SetEditLocation method to store the EditLocation, Vertex, Segment and/or Part of an edit sketch.
It is essential that this method is called prior to executing any of the following commands; ControlsEditingVertexInsertCommand, ControlsEditingVertexDeleteCommand, ControlsEditingVertexMoveCommand and ControlsEditingVertexMoveToCommand or popping up the ControlsEditingVertexContextMenu.
x
- The x (in)y
- The y (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.boolean isZAware() throws IOException, AutomationException
If the IEngineEditSketch::Geometry contains elevation (z) values, this property will return a boolean value of True.
To view the z values for the edit sketch display the edit sketch properties dialog using the ControlsEditingSketchPropertiesCommand and select the sketch. If the sketch is ZAware, an additional column will appear next to the y column showing the z values.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setZAware(boolean aware) throws IOException, AutomationException
aware
- The aware (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.double getCurrentZ() throws IOException, AutomationException
To view the z values for the edit sketch display the edit sketch properties dialog using the ControlsEditingSketchPropertiesCommand and select the sketch. If the sketch is ZAware, an additional column will appear next to the y column showing the z values.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setCurrentZ(double z) throws IOException, AutomationException
z
- The z (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |