I'm trying to develop a custom downstream trace Addin for ArcGIS using .net (C#) Miner.Interop.Framework Assembly.

I'm using TraceDownstream Method from the ArcFM Desktop Developer Guide and following this example for guidance, since I'm very new in this.

By calling the Trace Downstream Function:

pElecTrace.TraceDownstream(pGN, pElecTraceSettings, pCurrentStatus,
                           179998,  ESRI.ArcGIS.Geodatabase.esriElementType.esriETJunction, 
                           Miner.Interop.mmDirectionInfo.establishBySourceSearch, 0,
                           iJunctionBarriers,iEdgeBarriers, false,
                           out pJunctions, out pEdges);

I get The NullReferenceException (Object reference not set to an instance of an object)

My Assumption is that it is because I have declared

IMMCurrentStatus pCurrentStatus = null;

by following the mentioned Example. And It is the only Null Element in the called function.

Now the problem is that , I don't have any idea what "Current Status" really is. Neither could I find any explanation in the Documentation as to what Current Status really is or where can I retrieve its information from.

  • you ever figure this out? i am facing the exact same issue – user890 Oct 24 '19 at 19:01
  • Yeah I gave up and stopped using ArcFM libraries :D I wrote my own tracing algorithm in pure Arcobjects. – Tayyab Mir Oct 27 '19 at 4:15
  • i tried going arcobjects first, but the output of traces was not correct. you get good/correct traces using pure arcobjects on an arcfm enabled geodatabase? – user890 Oct 28 '19 at 14:30
  • It was correct enough for my use at least. I just had to understand how the ArcFM trace works. Hint: The "Electric Trace Weight" plays an important role. Try to understand its pattern. Unfortunately, I don't have the code now otherwise I would have shared. But I would still suggest you to go for the proper way. If you have Schneider account, post on their forum. I didn't have an account – Tayyab Mir Oct 29 '19 at 5:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.