sebbousquet

How to initialize/refresh network parameters for evaluated attributes before Solve

Discussion created by sebbousquet on Apr 10, 2011
Latest reply on Apr 12, 2011 by sebbousquet
Hello,
we created a NDS with some network evaluated attributes using network parameters for speed calculation.

When calling "Solve" function on our proprietary Solver, we update network parameters values using INetworkAttributeParameter, INetworkAttribute2 interfaces and the Refresh function as indicated in ESRI help.

Unfortunately, it looks like the attributes are not calculated as the solver does not return any solution.

After a call to NetworkAnalyst route solver, the network gets updated and subsequent calls to our solver work as well even after network parameters are updated => parameters/attributes get updated.

Do you know what we are missing in the 1st call ? How to initialize/refresh network atrtibutes on top of INetworkAttribute2.Refresh() function? (something to do with the context?)

Thank you for your help

sample code:

//Get back parameter associated to proper attribute
IArray tabParams = pNetworkAttribute.Parameters;
INetworkAttributeParameter pNetworkAttributeParam = tabParams.get_Element(j) as INetworkAttributeParameter;
pNetworkAttributeParam.Value = "some value";
pNetworkAttribute.Refresh();

Outcomes