AnsweredAssumed Answered

How to edit / modify the template xml from network dataset ?

Question asked by leo.deng.transfinder on Apr 18, 2018
Latest reply on May 4, 2018 by MMorang-esristaff

Hi All,

   

This attached customized.xml is created as the below workflow:

  1. Created a network dataset manually in Arcmap by using the converted streets, and newly generated turns data.
  2. Added all the attributes that the network dataset needs(for example, oneway, traversable, time, length etc. )
  3. Then exported a xml template(original.xml) from this network dataset using arcmap tool (ArcToolbox > Network Analyst Tools > Network Dataset > Create Network Dataset From Template).
  4. Customized the original.xml template in our c# code by adding new attributes based on how many counties of source data we converted.

(To be specific, if you checked the original.xml  we looped through elements inside the <EdgeFeatureSources></EdgeFeatureSources>, and copy the element and insert to <EdgeFeatureSources>, and changed both <EdgeFeatureSource> name to our converted street feature class name. and we did the similar thing to the <NetworkAssignments></NetworkAssignments>)

 

I can create a network dataset with the customized.xml and built it successfully. But after add two stops along the street and click solve in Arcmap it always failed.

 

So my questions are:

  1. If the network dataset template support add attributes by edit the xml?
  2. If not , how do you suggest solve the need that we want customize network dataset attributes  with arcpy  base on how many counties of source data we converted .
  3. If so, what’s right way to edit the xml.

 

Thanks,

Attachments

Outcomes