Responder Developer Guide
CreateSwitchOperationTool Class
Members 


Product Availability
Required Licenses
.NET Assembly
Provides the Create Switch Operation tool on the ArcMap Responder Toolbar.
Object Model
CreateSwitchOperationTool Class
Syntax
'Declaration
 
<ComVisibleAttribute(True)>
<GuidAttribute("178720E1-3196-4bae-AB49-793910EFD23E")>
<AutomationProxyAttribute(True)>
<ClassInterfaceAttribute(ClassInterfaceType.None)>
<ComponentCategoryAttribute(ComCategory.ArcMapCommands)>
Public NotInheritable Class CreateSwitchOperationTool 
   Inherits NonEditingSnapToolBase
   Implements ESRI.ArcGIS.SystemUI.ICommand, ESRI.ArcGIS.SystemUI.ITool, Miner.Interop.IMMAttributes 
'Usage
 
Dim instance As CreateSwitchOperationTool
[ComVisible(true)]
[Guid("178720E1-3196-4bae-AB49-793910EFD23E")]
[AutomationProxy(true)]
[ClassInterface(ClassInterfaceType.None)]
[ComponentCategory(ComCategory.ArcMapCommands)]
public sealed class CreateSwitchOperationTool : NonEditingSnapToolBase, ESRI.ArcGIS.SystemUI.ICommand, ESRI.ArcGIS.SystemUI.ITool, Miner.Interop.IMMAttributes  
Remarks

This class provides a button on the ArcMap Responder toolbar that allows the dispatcher to create a Switching Order Operation step. The only steps that are permitted is the Open Device or Close Device step. Operation of this tool is as follows:

When this tool is selected, the map cursor changes to a circle (similar to the Create Fault tool) and snaps to map objects that have the RXINCIDENTDEVICE model name. (The SnapInfo.ModelName member of the base class determines the map layer to which the cursor will snap. Its value is set, typically, in the OnClick event when this tool is selected on the toolbar. However, if the tool is selected programmatically via ArcMapServices.SetCurrentTool, the OnClick event may not occur. Therefore, the IMMAttributes interface is used to set the ModelName in this case.) When a device is selected on the map and either mouse button is pressed, the InternalMouseDown method of this class is called. The method first checks that the feature selected is a valid feature in the electrical network. It then defines a DevInfo object to identify the device selected and determines a region for the object (defined as one of the properties associated with DevInfo, a hash table member). This is all that this method does - the real work is performed by Responder Explorer. Therefore, this method, lastly, calls ResponderExplorer GetServices to connect to Responder Explorer. It then calls the IResponderServices ActivateGeoRow method of Responder Explorer to complete the required work for this tool.

The ActivateGeoRow method, in turn, calls the DataManager.Instance.OnActivateGeoRow which raises the GeoRowActivated event for Responder Explorer. Everybody and his brother in Responder Explorer listens for this event. The event arguments contain the "category" property that specifies what type of operation is associated with the event. So only the listeners (usually only one) that understands that category processes the event. The listener returns a true value if processing is successful. The DataManager.Instance will return a true value if any of the listeners return a true value for the event. The result value may be passed back to this method but this method does not care and ignores the return value.

The listener in Responder Explorer that processes the GeoRowActived event for the event category of "CreateSwitchOperation" of this tool is the "CommandButtonSwitchingOperationAdd" class of the SwitchingCommands.cs file.

Inheritance Hierarchy

System.Object
   ESRI.ArcGIS.ADF.BaseClasses.BaseCommand
      ESRI.ArcGIS.ADF.BaseClasses.BaseTool
         Miner.Responder.Desktop.NonEditingSnapToolBase
            Miner.Responder.Desktop.CreateSwitchOperationTool

Requirements

Target Platforms: Windows XP SP3 (32-bit and 64-bit), Windows 7 (32-bit and 64-bit)

Not all Operating Systems are supported on all products. Visit the ArcFM Solution Supported Versions page for full details.

See Also

Reference

CreateSwitchOperationTool Members
Miner.Responder.Desktop Namespace

 

 


Send Comment