|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface INgDiagram
Provides access to members that control the graphic diagram.
A diagram is a structure that is an implementation of a diagram type. A network, made up of nodes and links, is displayed in a diagram. One or more diagrams of a diagram type can exist in a project. Various schematic layout algorithms can represent the same network. Each schematic representation of a network is displayed in its own diagram. For instance, a network displayed as both an orthogonal schematic and a hierarchical schematic will be displayed in two different diagrams. A diagram cannot exist without a view, and it can create many views. All views of a diagram will display the same network in the same geographic or schematic position, with each view differing only in its zoom level or symbol size. An element selected in one view will be selected in all open views created from the same diagram.
ISchematicDiagram,
INgDiagramType| Method Summary | |
|---|---|
boolean |
canRedoLastUndo()
Indicates if the last operation that impacted the diagram can be redone. |
boolean |
canUndoLastOperation()
Indicates if the last operation that impacted the diagram can be undone. |
void |
close()
Closes the diagram and all its views. |
INgDrawing |
createDrawing(INgElementType eltType,
String eltName,
double x,
double y,
boolean visualize)
Creates the drawing implemented by the 'eltType' type and named 'eltName' at the ('x','y') location in the diagram. |
INgLink |
createLink(INgElementType eltType,
String eltName,
INgNode fromNode,
INgNode toNode,
int fromPort,
int toPort,
boolean visualize)
Creates the link implemented by the 'eltType' element type and named 'eltName' between the 'fromNode' and 'toNode' nodes in the diagram. |
INgNode |
createNode(INgElementType eltType,
String eltName,
double x,
double y,
boolean visualize)
Creates the node implemented by the 'eltType' element type and named 'eltName' at the ('x','y') location in the diagram. |
INgNodeOnLink |
createNodeOnLink(INgElementType eltType,
String eltName,
INgLink refLink,
int mode,
double position,
boolean visualize)
Creates the node-on-link implemented by the 'eltType' type and named 'eltName' at the 'Position' location on the 'refLink' link in the diagram. |
INgSubLink |
createSubLink(INgElementType eltType,
String eltName,
INgLink refLink,
INgNode fromNode,
INgNode toNode,
int fromPort,
int toPort,
boolean visualize)
Creates the sub-link implemented by the 'eltType' element type and named 'eltName' on the 'refLink' link between the 'fromNode' and 'toNode' nodes in the diagram. |
void |
deleteSavedLayout()
Removes the backup version of the diagram. |
String |
getAttributeValue(String attributeName)
Returns the value of the attribute named 'attributeName' defined for the diagram. |
INgDiagramType |
getDiagramType()
Diagram type that implements the diagram. |
INgDrawing |
getDrawing(String drawingName)
Returns the drawing named 'drawingName' contained in the diagram. |
INgElements |
getElements()
List of the elements contained in the diagram. |
INgElements |
getElementsByElementType(INgElementType eltType)
Returns the list of all elements implemented by the the 'eltType' element type that are contained in the diagram. |
INgElements |
getElementsByType(int type)
Returns a list of all the elements belonging to the 'Type' type that are contained in the diagram. |
INgElements |
getElementsByUserData(INgUserDatas userDatas,
INgValues values,
INgElementType eltType)
Returns all the elements contained in the diagram that are implemented by the 'eltType' element type and which each associated user-data in the 'userDatas' list verifies the 'values' list corresponding values. |
INgLink |
getLink(String linkName)
Returns the link named 'linkName' contained in the diagram. |
INgLinks |
getLinksBetweenNodes(INgNode n1,
INgNode n2,
int orientation,
int fromPort,
int toPort)
Returns a list of all the links that connect the two nodes 'n1' and 'n2' in the diagram. |
String |
getName()
Name of the diagram. |
String |
getNextRedoLabel()
Returns the label of the next operation in the redo stack. |
String |
getNextUndoLabel()
Returns the label of the next operation in the undo stack. |
INgNode |
getNode(String nodeName)
Returns the node named 'nodeName' contained in the diagram. |
int |
getSaveMode()
Saving option for the diagram. |
INgViews |
getViews()
List of the views associated with the diagram. |
boolean |
isLayoutSaved()
Indicates if there is a backup version for the diagram. |
boolean |
isModified()
Indicates if the diagram has been modified regarding to its saving version. |
void |
moveElements(INgElements elements,
double x,
double y,
int computeMode)
Moves the 'Elements' set of elements contained in the diagram to the (X,Y) relative position. |
void |
newView()
Creates a new view associated with the active view comprising all the elements contained in the latter. |
void |
open()
Opens the diagram. |
void |
openFromStream(IStream pStream)
Loads the diagram from the specified stream. |
void |
redoLastUndo()
Redoes the last undone operation in the diagram. |
void |
redraw(int mode)
Redraws the elements contained in the diagram's view(s) according to the 'mode' redrawing option. |
void |
refresh()
Updates all the views associated with the diagram, reflecting the modifications that may have occurred in the database. |
void |
refreshLegend(int displayMode)
Updates the legend content for all the views associated with the diagram so it reflects the modifications that may have occurred in the database. |
void |
restoreInitialPosition(int modeIfNotSet,
int modeIfSet)
Restores the elements contained in the diagram to their initially defined positions. |
void |
save()
Saves the diagram and records positions for all the elements contained in the different views of the diagram. |
void |
saveToStream(IStream pStream)
Saves the diagram to the specified stream. |
void |
setModified(boolean modified)
Forces the value returned by the 'IsModified' function. |
void |
setSaveMode(int pVal)
Saving option for the diagram. |
boolean |
startOperation(String label)
Starts a new operation that will impact the diagram. |
void |
stopOperation()
Stop the current started operation that impacted the diagram. |
void |
undoLastOperation()
Undoes the last operation that impacted the diagram. |
| Method Detail |
|---|
INgDiagramType getDiagramType()
throws IOException,
AutomationException
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
String getName()
throws IOException,
AutomationException
This name must be consistent with the diagram identifier set for its associated diagram type.
The Name property is automatically set when the diagram is created:
- either by calling the INgDiagramType OpenDiagram or INgProject OpenDiagram methods in the code,
- or through ArcGIS Schematics Designer, when its associated diagram type is defined.
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
void open()
throws IOException,
AutomationException
About events managed during schematic diagram opening.
When the INgDiagram interface's Open method, the INgProject interface's OpenDiagram method or the INgDiagramType interface's OpenDiagram method is triggered, several event procedures are successively fired:
(2) BeforeOpenView
(3) (OnLoadDiagram)
(4) AfterOpenDiagram
(5) AfterOpenView
The following lines detail the Schematics running way during any diagram opening:
(1) The BeforeOpenDiagram event is fired.
(2) A new schematic window is created. The BeforeOpenView event is fired:
- Either the handle returned value is not null, and Schematics retrieves the associated applicative window,
- Or the handle returned value is null, and Schematics creates and displays a new window.
(3) Then, the INgDiagram object is created.
The elements contained in the diagram are created. If there is a backup version for the diagram and if the ‘restore’ parameter of the OpenDiagram method is True (default value), the diagram content is restored according to its last saving.
If an OnLoadDiagram event has been declared for the associated diagram type in the project parameters file, the treatments are executed. The elements are displayed.
(4) The AfterOpenDiagram event is fired.
(5) If the diagram opening is asked out of a session opening which is restoring, the elements are automatically fit in the window. The AfterOpenView event is fired.
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.INgDiagramType.openDiagram(String, boolean)
void save()
throws IOException,
AutomationException
This method updates the layout stored in the schematic database relative to the schematic diagram. All the layout changes introduced in the diagram since it was opened or last saved (node and link positions, …) are taken into account and saved in the schematic database.
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
void close()
throws IOException,
AutomationException
If you have changed the diagram and have not saved it yet, depending on the value the SaveMode property is set to, you may be asked if you want to save the changes. Also note that the BeforeCloseDiagram event is automatically fired when you use this method.
About events managed during schematic diagram closure
When the INgDiagram interface’s Close method is triggered, several event procedures are successively fired:
(3) BeforeCloseView
(4) IsViewDestroyedByFramework
The following lines detail the Schematics running way during any schematic diagram closure:
(1) Schematics takes interest about the diagram saving. First, the SaveMode property value set for the diagram is analyzed.
. If SaveMode is esriNgNotSaveByFramework, Schematics doesn’t charge of the diagram saving.
. If SaveMode is esriNgSaveByFramework or esriNgSaveUndefined, the IsDiagramSavedByFramework event is fired. If the event procedure returns False, Schematics doesn’t charge of the diagram saving. If the event procedure returns True, a predefined form is automatically opened and end-user is asked if he wants to save the changes for the diagram. If he asks to save it, all the changes introduced in the diagram since it was opened or last saved (node and link positions, etc.) are taken into account and saved according to the parameters specified for this diagram.
(2) Then, the BeforeCloseDiagram event is fired
(3) At least, the diagram's elements are removed and for each associated open view:
> The BeforeCloseView event is fired.
> If the legend sub-window is displayed, it is deleted.
(4) If the IsViewDestroyedByFramework event procedure returns True, Schematics charges of the view destruction.
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.INgDiagram.getSaveMode(),
INgProjectEvents.beforeCloseDiagram(com.esri.arcgis.schematic.INgProjectEventsBeforeCloseDiagramEvent)
void newView()
throws IOException,
AutomationException
All the commands for selecting, moving, and positioning elements executed in either view are also executed in the other view. View operations alone (Zoom, Fit...) executed in either one of the views are not reflected in the other. At the time the new view is created, all the elements that are then visible in the other view are also displayed in the new view.
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
void refresh()
throws IOException,
AutomationException
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.INgElement.refresh(boolean),
INgDiagram.redraw(int)
INgElements getElements()
throws IOException,
AutomationException
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
INgViews getViews()
throws IOException,
AutomationException
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
INgElements getElementsByElementType(INgElementType eltType)
throws IOException,
AutomationException
eltType - A reference to a com.esri.arcgis.schematic.INgElementType (in)
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.INgDiagram.getElementsByType(int)
INgElements getElementsByType(int type)
throws IOException,
AutomationException
That is, returns a list of all the nodes associated with the diagram when Type = esriNgElementNode, a list of all the links when Type = esriNgElementLink, a list of all the drawings; when Type = esriNgElementDrawing; see esriNgElementTypeEnum topic.
type - A com.esri.arcgis.schematic.esriNgElementTypeEnum constant (in)
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.INgDiagram.getElementsByElementType(com.esri.arcgis.schematic.INgElementType)
INgLinks getLinksBetweenNodes(INgNode n1,
INgNode n2,
int orientation,
int fromPort,
int toPort)
throws IOException,
AutomationException
By default, the function returns a list of the undirected links connecting nodes n1 and n2. If a list of the directed links connecting n1 to n2 is desired, then the 'orientation' parameter must be passed to esriNgOriented (see esriNgOrientationMode topic). By default, the function ignores the link ports on the nodes. If you wish to obtain a list of the links connecting a specific port on n1 to a specific port on n2, or a list of the links connecting n1 to a specific port on n2, or a list of the links connecting a specific port on n1 to n2, then you must specify the fromPort and/or toPort parameter(s) that are used to identify the sequence number of the desired port.
n1 - A reference to a com.esri.arcgis.schematic.INgNode (in)n2 - A reference to a com.esri.arcgis.schematic.INgNode (in)orientation - A com.esri.arcgis.schematic.esriNgOrientationMode constant (in, optional, pass 2073 if not required)fromPort - The fromPort (in, optional, pass 0 if not required)toPort - The toPort (in, optional, pass 0 if not required)
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.INgDiagram.getLink(String)
INgNode createNode(INgElementType eltType,
String eltName,
double x,
double y,
boolean visualize)
throws IOException,
AutomationException
By default, the created node is not visualized.
The eltType node element type must already exist. It can have been defined:
- either in the current opened project through the Schematics Designer GUI,
- or by calling the INgProjectBuilder CreateElementType method in the code.
The query related to the associated node element type must have been set to NULL so the CreateNode method correctly works.
eltType - A reference to a com.esri.arcgis.schematic.INgElementType (in)eltName - The eltName (in)x - The x (in)y - The y (in)visualize - The visualize (in, optional, pass false if not required)
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.INgProjectEvents.nameOfDigitNode(com.esri.arcgis.schematic.INgProjectEventsNameOfDigitNodeEvent),
INgDiagram.createNodeOnLink(com.esri.arcgis.schematic.INgElementType, String, com.esri.arcgis.schematic.INgLink, int, double, boolean)
INgLink createLink(INgElementType eltType,
String eltName,
INgNode fromNode,
INgNode toNode,
int fromPort,
int toPort,
boolean visualize)
throws IOException,
AutomationException
By default, the created link is not visualized. The link ports can be specified for the origin and end nodes (fromPort and toPort parameters).
The eltType link element type must already exist. It can have been defined:
- either in the current opened project through the Schematics Designer GUI,
- or by calling the INgProjectBuilder CreateElementType method in the code.
The query related to the associated link element type must have been set to NULL so the CreateLink method correctly works.
eltType - A reference to a com.esri.arcgis.schematic.INgElementType (in)eltName - The eltName (in)fromNode - A reference to a com.esri.arcgis.schematic.INgNode (in)toNode - A reference to a com.esri.arcgis.schematic.INgNode (in)fromPort - The fromPort (in, optional, pass 0 if not required)toPort - The toPort (in, optional, pass 0 if not required)visualize - The visualize (in, optional, pass false if not required)
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.INgProjectEvents.nameOfDigitLink(com.esri.arcgis.schematic.INgProjectEventsNameOfDigitLinkEvent),
INgDiagram.createSubLink(com.esri.arcgis.schematic.INgElementType, String, com.esri.arcgis.schematic.INgLink, com.esri.arcgis.schematic.INgNode, com.esri.arcgis.schematic.INgNode, int, int, boolean)
INgSubLink createSubLink(INgElementType eltType,
String eltName,
INgLink refLink,
INgNode fromNode,
INgNode toNode,
int fromPort,
int toPort,
boolean visualize)
throws IOException,
AutomationException
Sublinks extremity nodes are either both nodes-on-link related to the same link the sublink is related to, or a node-on-link and the origin or end node of the link the sub-link is related to. By default, the created sub-link is not visualized. Sub-link ports can be specified for the origin and end nodes (fromPort and toPort parameters).
The eltType sub-link element type must already exist. It can have been defined:
- either in the current opened project through the Schematics Designer GUI,
- or by calling the INgProjectBuilder CreateElementType method in the code
The query related to the associated sublink elemeny type must have been set to NULL so the CreateSubLink method correctly works.
eltType - A reference to a com.esri.arcgis.schematic.INgElementType (in)eltName - The eltName (in)refLink - A reference to a com.esri.arcgis.schematic.INgLink (in)fromNode - A reference to a com.esri.arcgis.schematic.INgNode (in)toNode - A reference to a com.esri.arcgis.schematic.INgNode (in)fromPort - The fromPort (in, optional, pass 0 if not required)toPort - The toPort (in, optional, pass 0 if not required)visualize - The visualize (in, optional, pass false if not required)
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.INgDiagram.createNodeOnLink(com.esri.arcgis.schematic.INgElementType, String, com.esri.arcgis.schematic.INgLink, int, double, boolean)
INgDrawing createDrawing(INgElementType eltType,
String eltName,
double x,
double y,
boolean visualize)
throws IOException,
AutomationException
By default, the created drawing is not visualized.
The eltType drawing element type must already exist. It can have been defined:
- either in the current opened project through the Schematics Designer GUI,
- or by calling the INgProjectBuilder CreateElementType method in the code.
The query related to the associated drawing element type must have been set to NULL so the CreateDrawing method correctly works.
eltType - A reference to a com.esri.arcgis.schematic.INgElementType (in)eltName - The eltName (in)x - The x (in)y - The y (in)visualize - The visualize (in, optional, pass false if not required)
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.INgProjectEvents.nameOfDigitDrawing(com.esri.arcgis.schematic.INgProjectEventsNameOfDigitDrawingEvent)
INgNodeOnLink createNodeOnLink(INgElementType eltType,
String eltName,
INgLink refLink,
int mode,
double position,
boolean visualize)
throws IOException,
AutomationException
The 'position' parameter value depends on the chosen positioning 'mode'. By default, the created node-on-link is not visualized. The eltType link element type must already exist. It can have been defined:
- either in the current opened project through the Schematics Designer GUI,
- or by calling the INgProjectBuilder CreateElementType method in the code.
The query related to the associated node-on-link element type must have been set to NULL so the CreateNodeOnLink method correctly works.
eltType - A reference to a com.esri.arcgis.schematic.INgElementType (in)eltName - The eltName (in)refLink - A reference to a com.esri.arcgis.schematic.INgLink (in)mode - A com.esri.arcgis.schematic.esriNgPositionOnLinkMode constant (in)position - The position (in)visualize - The visualize (in, optional, pass false if not required)
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.INgDiagram.createSubLink(com.esri.arcgis.schematic.INgElementType, String, com.esri.arcgis.schematic.INgLink, com.esri.arcgis.schematic.INgNode, com.esri.arcgis.schematic.INgNode, int, int, boolean)
void setModified(boolean modified)
throws IOException,
AutomationException
modified - The modified (in)
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.INgDiagram.isModified()
void redraw(int mode)
throws IOException,
AutomationException
This parameter is optional. The default mode is esriNgRedrawAll; that is Schematics redraws all the elements in all the diagram views.
mode - A com.esri.arcgis.schematic.esriNgRedrawMode constant (in, optional, pass 1 if not required)
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.INgView.redraw(int),
INgDiagram.refresh()
boolean isLayoutSaved()
throws IOException,
AutomationException
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.INgDiagram.deleteSavedLayout()
void deleteSavedLayout()
throws IOException,
AutomationException
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.INgDiagram.isLayoutSaved()
boolean isModified()
throws IOException,
AutomationException
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.INgDiagram.setModified(boolean)
void restoreInitialPosition(int modeIfNotSet,
int modeIfSet)
throws IOException,
AutomationException
If the elements were positioned using their database coordinates, the ModelfSet parameter must be specified so that their positions are modified and the ModelfNotSet parameter can be ignored.
If the elements were positioned without using their 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 elements to be repositioned based on their 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 each element 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 elements to be relocated (modeIfSet case, or modeIfNotSet case). The elements retain their current position
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)
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.INgNode.restoreInitialPosition(int, int),
INgLink.restoreInitialPosition(),
INgDrawing.restoreInitialPosition(int, int)
INgNode getNode(String nodeName)
throws IOException,
AutomationException
nodeName - The nodeName (in)
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.INgDiagram.getLink(String),
INgDiagram.getDrawing(String)
INgLink getLink(String linkName)
throws IOException,
AutomationException
linkName - The linkName (in)
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.INgDiagram.getNode(String),
INgDiagram.getLinksBetweenNodes(com.esri.arcgis.schematic.INgNode, com.esri.arcgis.schematic.INgNode, int, int, int),
INgDiagram.getDrawing(String)
INgDrawing getDrawing(String drawingName)
throws IOException,
AutomationException
drawingName - The drawingName (in)
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.INgDiagram.getNode(String),
INgDiagram.getLink(String)
void refreshLegend(int displayMode)
throws IOException,
AutomationException
displayMode - A com.esri.arcgis.schematic.esriNgLegendDisplayMode constant (in, optional, pass 1 if not required)
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
String getAttributeValue(String attributeName)
throws IOException,
AutomationException
attributeName - The attributeName (in)
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
int getSaveMode()
throws IOException,
AutomationException
The default value for the SaveMode property is esriNgSaveUndefined.
The process that is automatically launched each time a schematic diagram is closed depends on the SaveMode property value:
- SaveMode = esriNgSaveUndefined: when you close a diagram you have modified, the IsDiagramSavedByFramework event is automatically fired. If this event returns TRUE (default returned value) you are asked if you want to save the changes.
- SaveMode = esriNgSaveByFramework: when you close a diagram you have modified, Schematics automatically asks you if you want to save your changes (without even calling the IsDiagramSavedByFramework event). If you answer Yes, the information stored in the schematic database relative to the schematic diagram is automatically updated. All the changes introduced in the diagram since it was opened or last saved (node and link positions, …) are taken into account and saved in the schematic database.
- SaveMode = esriNgNotSaveByFramework, Schematics does not save the changes introduced in the diagram. All changes introduced in the diagram since it was opened or last saved are definitively lost.
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.INgDiagram.save(),
INgProjectEvents.isDiagramSavedByFramework(com.esri.arcgis.schematic.INgProjectEventsIsDiagramSavedByFrameworkEvent)
void setSaveMode(int pVal)
throws IOException,
AutomationException
pVal - A com.esri.arcgis.schematic.esriNgSaveModeType constant (in)
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
INgElements getElementsByUserData(INgUserDatas userDatas,
INgValues values,
INgElementType eltType)
throws IOException,
AutomationException
The collection of user datas and collection of values passed as parameters must have the same count of elements and go exactly in the correct order.
The method takes care of the user data type. So when you build the INgValues collection in order to use it as a parameter to the method, make sure the type of userdata match the type of value.
Suppose you have an element type that has an attribute based on a specific field which possible values are 10, 12, 15, 18 or 20, and you are interested in only getting the elements which field value is 10 or 12. You can associate the attribute with an user data and use the GetElementsByUserData method to retrieve this set of elements. In this case, the process will have to operate in two steps:
Dim Value1 As Variant
Dim Value2 As Variant
Dim pUserDataValues1 As INgValues
Dim pUserDataValues2 As INgValues
Dim pDesiredUserdata As INgUserData
Dim pUserDatas As INgUserDatas
Dim pElements1 As INgElements
Dim pElements2 As INgElements
Dim pElementsFinal As INgElements
Dim pElement As INgElement
Dim pDiagram As INgDiagram
...
pUserDatas.Add (pDesiredUserdata)
' Retrieving elements which user data value is 10
Value1 = CStr(10)
pUserDataValues1.Add Value1
Set pElements1 = pDiagram.GetElementsByUserData(pUserDatas, pUserDataValues1)
' Retrieving elements which user data value is 12
Value2 = CStr(12)
pUserDataValues2.Add Value2
Set pElements2 = pDiagram.GetElementsByUserData(pUserDatas, pUserDataValues2)
' Merging the 2 sets of elements
Set pElementsFinal = pElements1
For Each pElement In pElements2
pElementsFinal.Add pElement
Next pElement
userDatas - A reference to a com.esri.arcgis.schematic.INgUserDatas (in)values - A reference to a com.esri.arcgis.schematic.INgValues (in)eltType - A reference to a com.esri.arcgis.schematic.INgElementType (in, optional, pass 0 if not required)
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.INgElementType.getElementsByUserData(com.esri.arcgis.schematic.INgUserDatas, com.esri.arcgis.schematic.INgValues)
void openFromStream(IStream pStream)
throws IOException,
AutomationException
pStream - A reference to a com.esri.arcgis.system.IStream (in)
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
void saveToStream(IStream pStream)
throws IOException,
AutomationException
pStream - A reference to a com.esri.arcgis.system.IStream (in)
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
boolean startOperation(String label)
throws IOException,
AutomationException
label - The label (in, optional, pass if not required)
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.INgDiagram.stopOperation()
void stopOperation()
throws IOException,
AutomationException
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.INgDiagram.startOperation(String)
boolean canUndoLastOperation()
throws IOException,
AutomationException
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.INgDiagram.undoLastOperation(),
INgDiagram.redoLastUndo()
boolean canRedoLastUndo()
throws IOException,
AutomationException
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.INgDiagram.redoLastUndo()
void undoLastOperation()
throws IOException,
AutomationException
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.INgDiagram.canUndoLastOperation()
void redoLastUndo()
throws IOException,
AutomationException
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.INgDiagram.canRedoLastUndo()
void moveElements(INgElements elements,
double x,
double y,
int computeMode)
throws IOException,
AutomationException
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 INgDiagram:MoveElements 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).
elements - A reference to a com.esri.arcgis.schematic.INgElements (in)x - The x (in)y - The y (in)computeMode - A com.esri.arcgis.schematic.esriNgComputeLinkPointMode constant (in, optional, pass 2059 if not required)
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.INgDrawing.move(double, double, int),
INgProjectEvents.onMoveElements(com.esri.arcgis.schematic.INgProjectEventsOnMoveElementsEvent),
INgNode.move(double, double, int, int)
String getNextUndoLabel()
throws IOException,
AutomationException
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.INgDiagram.getNextRedoLabel()
String getNextRedoLabel()
throws IOException,
AutomationException
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.INgDiagram.getNextUndoLabel()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||