//Initialize the Tracking Environment, you only need to do this once
        private void setupTrackingEnv()
        {
            if (!m_bInitialized && ArcMap.Application != null)
            {
                IExtensionManager extentionManager = new ExtensionManagerClass();

                UID uid = new UIDClass();
                uid.Value = "esriTrackingAnalyst.TrackingEngineUtil";
                object mapRef = ArcMap.Application;

                ((IExtensionManagerAdmin)extentionManager).AddExtension(uid, ref mapRef);

                ITrackingEnvironment3 trackingEnv = new TrackingEnvironmentClass();
                try
                {
                    trackingEnv.Initialize(ref mapRef);
                }
                catch (Exception ex)
                {
                }
                trackingEnv.EnableTemporalDisplayManagement = true;

                m_bInitialized = true;
            }
        }
    //Initialize the Tracking Environment, you only need to do this once
    private void setupTrackingEnv()
    {
      if (!m_bInitialized && ArcMap.Application != null)
      {
        IExtensionManager extentionManager = new ExtensionManagerClass();

        UID uid = new UIDClass();
        uid.Value = "esriTrackingAnalyst.TrackingEngineUtil";
        object mapRef = ArcMap.Application;

        ((IExtensionManagerAdmin)extentionManager).AddExtension(uid, ref mapRef);

        ITrackingEnvironment3 trackingEnv = new TrackingEnvironmentClass();
        try
        {
          trackingEnv.Initialize(ref mapRef);
        }
        catch (Exception ex)
        {
        }
        trackingEnv.EnableTemporalDisplayManagement = true;
     
        m_bInitialized = true;
      }
    }
Esempio n. 3
0
        //Initialize the Tracking Analyst Environment
        private ITrackingEnvironment3 setupTrackingEnv(ref object mapObj)
        {
            IExtensionManager extentionManager = new ExtensionManagerClass();

            UID uid = new UIDClass();

            uid.Value = "esriTrackingAnalyst.TrackingEngineUtil";

            ((IExtensionManagerAdmin)extentionManager).AddExtension(uid, ref mapObj);

            ITrackingEnvironment3 trackingEnv = new TrackingEnvironmentClass();

            trackingEnv.Initialize(ref mapObj);
            trackingEnv.EnableTemporalDisplayManagement = true;
            return(trackingEnv);
        }
    private ITrackingEnvironment3 setupTrackingEnv(ref object mapObj)
    {
      IExtensionManager extentionManager = new ExtensionManagerClass();

      UID uid = new UIDClass();
      uid.Value = "esriTrackingAnalyst.TrackingEngineUtil";

      ((IExtensionManagerAdmin)extentionManager).AddExtension(uid, ref mapObj);

      ITrackingEnvironment3 trackingEnv = new TrackingEnvironmentClass();
      try
      {
        trackingEnv.Initialize(ref mapObj);
      }
      catch (Exception ex)
      {
      }
      trackingEnv.EnableTemporalDisplayManagement = true;
      return trackingEnv;
    }