2

I am trying to set up an automated process that does a nightly extract of the network dataset from SDE and publish to:

  1. ArcGIS Server 10.3 as a network service
  2. fGDB as network dataset

It seems you can't dissolve a network dataset in SDE so you have to move it to a fGDB. Ideally I would have liked to copy and paste from SDE directly into a fGDB but can't find a way to automate this. I have done the following as a work around:

  1. Arcpy script that imports data to fGDB, updates FCID
  2. Manually create new network dataset in fGDB
  3. Arcpy script that updates alternate ID and dissolves network
  4. Manually push network dataset to ArcGIS Server (will script this)

I would be interested to hear in other peoples experiences in

2
  • It's complicated because of the network, I would copy the data as data and then build the network in the fGDB. Topologies are like that too. Have you tried copying the whole feature dataset? What about workspace to XML (with data) then XML to workspace? Commented Jul 2, 2015 at 2:15
  • I have tried arcpy.CopyFeatures_management as per @Alex (see below). I will XML export/import. Commented Jul 6, 2015 at 3:09

1 Answer 1

2

You can use the Copy GP tool for copying the entire feature dataset where the ND resides + it will copy all the related ND tables found in the geodatabase (outside of FD).

This will preserve the ND and you don't need to create one. You are correct that it is not allowed to run the Dissolve network on an ND stored within the SDE geodatabase, you do need to run this on a file gdb.

4
  • @ Alex I have tried arcpy.CopyFeatures_management and it pulls everything except the Network Feature dataset.featureClasses = arcpy.ListFeatureClasses() outWorkspace = r"C:\Data.gdb\test" for features in featureClasses: outFeatureClass = os.path.join(outWorkspace, features) arcpy.CopyFeatures_management(features, outFeatureClass) Commented Jul 6, 2015 at 2:48
  • 1
    Who told you to use the CopyFeatures? :) Use the Copy tool (read carefully my answer) :) Commented Jul 6, 2015 at 7:01
  • The tool is Copy_management resources.arcgis.com/en/help/main/10.2/index.html#//… to copy the feature dataset that the network resides in. There may be other feature classes you don't want but you can delete them later. If that does not work to your satisfaction use the XML workspace export/import... you can choose what feature classes, tables and relations to export. Commented Jul 6, 2015 at 21:54
  • Thanks for the follow-up. The import and export of XML is taking around 4 hours. I have tried 'arcpy.Copy_management'and keep getting stuck in a loop of errors (mainly 000260). The work around at this stage is copy and paste :-( I will revisit this in the future. Commented Jul 7, 2015 at 22:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.