0 Replies Latest reply on Oct 19, 2017 9:18 AM by Daniel Fletcher

    Is it possible to the following example in Desktop rather than engine?

    Daniel Fletcher

      Is it possible the following example in Desktop rather than engine?  It's all good until You try to define TraceUtils, TracedJunctions and TracedEdges.  What dll if any are these referenced in?

      Link to example:  %%ItemTitle%%

      using System;

      using System.Windows.Forms;

      //1
      using Miner.Interop;

      using Miner.Framework.TraceStrategies;

       

      using Esri.ArcGIS.Geodatabase;

      using Esri.ArcGIS.Carto;

      using Esri.ArcGIS.esriSystem;

       

      namespace Miner.DeveloperSamples.Engine

      {

      /// <summary>
      /// Summary description for TraceDownstream.
      ///
      </summary>

      //2
      public sealed class TraceDownstream : BaseElectricTraceStrategy

      {

        #region Public Constructors

       

        public TraceDownstream()

        {

        }

       

        #endregion Public Methods

       

        #region Protected Overrides

      //3
            protected override void DoTrace()

            {

          // create an instance of the Feeder Manager class
            // that performs electric tracing functions
      //4
            IMMElectricTracingEx elecTrace = new MMFeederTracerClass();

            IMMCurrentStatus cs = null;

       

          // the tracing results will be returned in these variables
            IMMTracedElements tracedJcts;

            IMMTracedElements tracedEdgs;

      //5
            int[] barrierJncts = new int[0];

            int[] barrierEdges = new int[0];

       

          // call the tracing function
            elecTrace.TraceDownstream(

              CurrentGeometricNetwork,

              ElectricTraceSettings,

              cs,

              CurrentStartEID,

              esriElementType.esriETJunction,

              SetOfPhases.abc,

              mmDirectionInfo.establishBySourceSearch,

              0,

              esriElementType.esriETEdge,

              barrierJncts,

              barrierEdges,

              false,

              out tracedJcts,

              out tracedEdgs);

       

            TraceUtils tu = new TraceUtils();

       

          // pass back the trace results
      //6
            TracedJunctions = tu.ConvertTracedElementsCollectionToEnumNetEid(tracedJcts, CurrentGeometricNetwork.Network);

            TracedEdges = tu.ConvertTracedElementsCollectionToEnumNetEid(tracedEdgs, CurrentGeometricNetwork.Network);

       

                      }

       

        #endregion Protected Overrides

      }

      }