com.esri.arcgis.schematic
Interface INgDrawing

All Superinterfaces:
Serializable
All Known Implementing Classes:
INgDrawingProxy, NgDrawing

public interface INgDrawing
extends Serializable

Provides access to members that control the graphic drawing.

Description

Drawings are used to introduce additional graphic or text information related to the network being represented; that is, they are used to add nonnetworked graphics information to the schematic diagrams. Examples of a drawing include title blocks, neatlines, text, and North arrows.

A drawing can be a basic (line, rectangle, circle, polygon, or text) or a complex graphic object made up of several basic graphic objects. A drawing is created using a CGM-compliant graphic file. Drawings are often defined as nonnetwork nodes, but this definition is too simplistic. In fact, some ArcGIS Schematics tools have a different impact on drawings and nodes. For example, in a schematic view, the increase and decrease symbol tools increase or decrease the size of all nodes displayed in the view but keep the current size of drawings contained in the view. A drawing exists only in run time (that is, no parameters can be predefined for a given drawing through your Designer environment). The common properties of a drawing are stored and defined by its related drawing element type.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

See Also:
INgElement, ISchematicDrawing

Method Summary
 Object getCurrentEffect(int effect)
          Returns the current 'effValue' value for the effect 'effect' set for the drawing (see esriNgDrawingEffect).
 INgDiagram getDiagram()
          Diagram that contains the drawing.
 Object getEffect(int effect)
          Returns the effect 'effect' set for the drawing (see esriNgDrawingEffect).
 INgElementType getElementType()
          Element type that implements the drawing.
 INgPoint getInitialPosition()
          Initial position of the drawing.
 double getInitialRotation()
          Initial rotation of the drawing.
 String getName()
          Name of the drawing.
 boolean getPortPosition(INgView view, int numPort, int type, INgPoint[] point)
          Returns the position 'point' of the port 'numPort', of type 'type' (see esriNgPortType) associated with the drawing in the view 'view'.
 double getX()
          X cartesian coordinate of the drawing.
 double getY()
          Y cartesian coordinate of the drawing.
 boolean isEffectSet(int effect)
          Indicates if the effect 'effect' related to the drawing is set (see esriNgDrawingEffect).
 void move(double x, double y, int moveMode)
          Moves the drawing to the (X,Y) relative or absolute position.
 void removeEffect(int effect)
          Removes the effects or restores the default effect 'effect' set for the drawing.
 void removeSubSymbolEffect(String subName, int effect)
          Removes the effect 'effect' set for the sub-symbol named 'subName' that composes the symbol used to represent the drawing.
 void restoreInitialPosition(int modeIfNotSet, int modeIfSet)
          Restores the drawing to its initially defined position.
 void setEffect(int effect, Object effValue)
          Modifies the effect 'effect' set for the drawing (see esriNgDrawingEffect).
 void setInitialPosition(INgPoint pVal)
          Initial position of the drawing.
 void setInitialRotation(double pVal)
          Initial rotation of the drawing.
 void setSubSymbolEffect(String subName, int effect, Object effValue)
          Sets the effect 'effect' for the sub-symbol 'subName' that composes the symbol used to represent the drawing (see esriNgSubSymbolEffect).
 

Method Detail

getElementType

INgElementType getElementType()
                              throws IOException,
                                     AutomationException
Element type that implements the drawing.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Returns:
A reference to a com.esri.arcgis.schematic.INgElementType
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getName

String getName()
               throws IOException,
                      AutomationException
Name of the drawing.

Description

This name is defined when the drawing is created:

- either by triggering the INgDiagram CreateDrawing method or INgProjectEvents NameOfDigitDrawing event in the code,

- or when the drawing element type is created through ArcGIS Schematics Designer.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Returns:
The pVal
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getX

double getX()
            throws IOException,
                   AutomationException
X cartesian coordinate of the drawing.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Returns:
The pVal
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getY

double getY()
            throws IOException,
                   AutomationException
Y cartesian coordinate of the drawing.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Returns:
The pVal
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDiagram

INgDiagram getDiagram()
                      throws IOException,
                             AutomationException
Diagram that contains the drawing.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Returns:
A reference to a com.esri.arcgis.schematic.INgDiagram
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

move

void move(double x,
          double y,
          int moveMode)
          throws IOException,
                 AutomationException
Moves the drawing to the (X,Y) relative or absolute position.

Description

The values taken by the moveMode parameter are detailed in the esriNgMoveModeConstants section. The default value for moveMode is esriNgAbsoluteMove, which means that, by default, the drawing is moved to the (X,Y) absolute position.

Remarks

If there are schematic relations between schematics objects contained in a schematic diagram, itís the developer responsibility to call the appropriate ISchematicRelationController or ISchematicRelationManager methods for the related objects as the containers to be automatically redrawn when he uses the INgDrawing:Move method. Please also note that programming the relations redraw on the INgProjectEvents::OnMoveElements or ISchematicRelationControllerEvent::OnMoveElements events will be completely unuseful because these events are only triggered when schematic elements are moved using the GUI tools; that is when end-users move schematic elements using the mouse or the keyboard arrows. So when elements are moved by programming using any "Move" method, the custom code specified on these events will be not fired. In this case, you must either force the redraw at the end of the move operations sequences in your custom procedure or customize the SchematicAlgorithmEvents::AfterExecuteAlgorithm event (when the "Move" methods are called during a custom algorithm).

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
x - The x (in)
y - The y (in)
moveMode - A com.esri.arcgis.schematic.esriNgMoveMode constant (in, optional, pass 2085 if not required)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
INgProjectEvents.onMoveElements(com.esri.arcgis.schematic.INgProjectEventsOnMoveElementsEvent)

getEffect

Object getEffect(int effect)
                 throws IOException,
                        AutomationException
Returns the effect 'effect' set for the drawing (see esriNgDrawingEffect).

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
effect - A com.esri.arcgis.schematic.esriNgDrawingEffect constant (in)
Returns:
A Variant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
INgDrawing.setEffect(int, java.lang.Object), INgDrawing.isEffectSet(int), INgDrawing.getCurrentEffect(int), INgDrawing.removeEffect(int)

setEffect

void setEffect(int effect,
               Object effValue)
               throws IOException,
                      AutomationException
Modifies the effect 'effect' set for the drawing (see esriNgDrawingEffect).

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
effect - A com.esri.arcgis.schematic.esriNgDrawingEffect constant (in)
effValue - A Variant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
INgDrawing.getEffect(int), INgDrawing.isEffectSet(int), INgDrawing.removeEffect(int)

removeEffect

void removeEffect(int effect)
                  throws IOException,
                         AutomationException
Removes the effects or restores the default effect 'effect' set for the drawing.

Description

Note that removing an effect that is always set, returns the drawing effect to the default effect value and removing an effect that is not set by default, really removes the drawing effect.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
effect - A com.esri.arcgis.schematic.esriNgDrawingEffect constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
INgDrawing.getEffect(int), INgDrawing.setEffect(int, java.lang.Object), INgDrawing.isEffectSet(int)

isEffectSet

boolean isEffectSet(int effect)
                    throws IOException,
                           AutomationException
Indicates if the effect 'effect' related to the drawing is set (see esriNgDrawingEffect).

Description

By default, Schematics automatically sets default values for some drawing effects (see the List of the drawing effect default values, below). For all these effects, the IsEffectSet method returns TRUE.

For the others effects (those that are not set by default), the IsEffectSet method returns TRUE only if the effect was set by calling the INgDrawing SetEffect method in the project.

Note that even if the IsEffectSet method returns FALSE for a given effect (for example, esriNgDrawingXScaling), the GetCurrentEffect method can return a value! GetCurrentEffect returns the effect currently set for the drawing. This effect may have been set either through the effect definition for its associated element type, or through the effect definition for its associated properties.


List of the drawing effect default values for the effects that are already set

esriNgDrawingDetectability: esriNgDetectable.

esriNgDrawingHighlightedState: esriNgHighlighted

esriNgDrawingMobility: esriNgMovable.

esriNgDrawingPriority: 202 or more

esriNgDrawingResizability: esriNgResizable

esriNgDrawingSelectability: esriNgSelectable

esriNgDrawingVisibility: esriNgVisible

For more details, see Drawing Effects Constants Definition.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
effect - A com.esri.arcgis.schematic.esriNgDrawingEffect constant (in)
Returns:
The isSet
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
INgDrawing.getEffect(int), INgDrawing.setEffect(int, java.lang.Object), INgDrawing.removeEffect(int)

setSubSymbolEffect

void setSubSymbolEffect(String subName,
                        int effect,
                        Object effValue)
                        throws IOException,
                               AutomationException
Sets the effect 'effect' for the sub-symbol 'subName' that composes the symbol used to represent the drawing (see esriNgSubSymbolEffect).

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
subName - The subName (in)
effect - A com.esri.arcgis.schematic.esriNgSubSymbolEffect constant (in)
effValue - A Variant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

removeSubSymbolEffect

void removeSubSymbolEffect(String subName,
                           int effect)
                           throws IOException,
                                  AutomationException
Removes the effect 'effect' set for the sub-symbol named 'subName' that composes the symbol used to represent the drawing.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
subName - The subName (in)
effect - A com.esri.arcgis.schematic.esriNgSubSymbolEffect constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
INgDrawing.setSubSymbolEffect(String, int, java.lang.Object), INgElementType.removeSubSymbolEffect(String, int)

getPortPosition

boolean getPortPosition(INgView view,
                        int numPort,
                        int type,
                        INgPoint[] point)
                        throws IOException,
                               AutomationException
Returns the position 'point' of the port 'numPort', of type 'type' (see esriNgPortType) associated with the drawing in the view 'view'.

Description

Note that as a link cannot be connected to a drawing, there is no reason to use the esriNgLinkPort value for the Type port parameter even if Schematics does not prevent its use.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
view - A reference to a com.esri.arcgis.schematic.INgView (in)
numPort - The numPort (in)
type - A com.esri.arcgis.schematic.esriNgPortType constant (in)
point - A reference to a com.esri.arcgis.schematic.INgPoint (out: use single element array)
Returns:
The found
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getInitialPosition

INgPoint getInitialPosition()
                            throws IOException,
                                   AutomationException
Initial position of the drawing.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Returns:
A reference to a com.esri.arcgis.schematic.INgPoint
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
INgDrawing.restoreInitialPosition(int, int)

setInitialPosition

void setInitialPosition(INgPoint pVal)
                        throws IOException,
                               AutomationException
Initial position of the drawing.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
pVal - A reference to a com.esri.arcgis.schematic.INgPoint (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getInitialRotation

double getInitialRotation()
                          throws IOException,
                                 AutomationException
Initial rotation of the drawing.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Returns:
The pVal
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setInitialRotation

void setInitialRotation(double pVal)
                        throws IOException,
                               AutomationException
Initial rotation of the drawing.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
pVal - The pVal (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

restoreInitialPosition

void restoreInitialPosition(int modeIfNotSet,
                            int modeIfSet)
                            throws IOException,
                                   AutomationException
Restores the drawing to its initially defined position.

Description

If the drawing was positioned using its database coordinates, the modelfSet parameter must be specified so that its position is modified and the modelfNotSet parameter can be ignored.

If the drawing was positioned without using its database coordinates, then the modelfNotSet parameter must be specified and the modelfSet parameter can be ignored.

At all events,

- The esriNgDB parameter value causes the drawing to be repositioned based on its database coordinate values (if modeIfSet is used) or to be placed on the 0, 0 coordinate value position (if modeIfNotSet is used).

- The esriNgCenter parameter value causes the drawing to be relocated on a position averaging the current position of the neighboring elements(modeIfSet case or modeIfNotSet case)

- The esriNgNothing parameter value does not cause the drawing to be relocated (modeIfSet case or modeIfNotSet case). The drawing retains its current position.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
modeIfNotSet - A com.esri.arcgis.schematic.esriNgInitialPositionMode constant (in, optional, pass 0 if not required)
modeIfSet - A com.esri.arcgis.schematic.esriNgInitialPositionMode constant (in, optional, pass 0 if not required)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
INgDrawing.getInitialPosition(), INgDiagram.restoreInitialPosition(int, int)

getCurrentEffect

Object getCurrentEffect(int effect)
                        throws IOException,
                               AutomationException
Returns the current 'effValue' value for the effect 'effect' set for the drawing (see esriNgDrawingEffect).

Description

Current effects positioned for the drawing may have been set either when defining its associated element type's effects, either when defining its associated properties' effects, or when defining the drawing itself.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
effect - A com.esri.arcgis.schematic.esriNgDrawingEffect constant (in)
Returns:
A Variant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
INgDrawing.getEffect(int), INgDrawing.isEffectSet(int), INgDrawing.removeEffect(int)