AnsweredAssumed Answered

Referencing Features, and Trace, in ArcPy for use in Web AppBuilder

Question asked by eddybaboy on Dec 20, 2016
Latest reply on Dec 20, 2016 by dlaw-esristaff

Hi All- n00b here.

 

I have a python script that works in ArcMap.  It traces a geometric network, references feature classes (flags/barriers), tables for calculations, etc.  

 

I'm wondering how to reference these things (feature classes, tables, etc) in the python script so that I can use in AGOL?

 

Here are some code snippets.  As you can see I'm referencing data on SDE.  My guess is I need to reference the REST URL?  i.e. server/name/rest/services/webapp/geometricnetwork/MapServer

 

  1. ElecGeomNetwork = "C:\\blahblahblah\\asdf.sde\\asdf.GDBO.ElectricDataset\\asdf.GDBO.ElectricGeom_Net"
  2. ElecGeomNetwork__2_ = "ElecGeomNetwork"
  3. ServicePoint = "ServiceLocation"
  4. Table = "asdf.GDBO.TableTest"
  5. Transformer = "Transformer Bank"
  6. arcpy.TraceGeometricNetwork_management(ElecGeomNetwork, ElecGeomNetwork__2_, Transformer, "FIND_CONNECTED", "", "", "", "", "asdf.GDBO.PrimaryOHLineSection;asdf.GDBO.PrimaryUGLineSection", "NO_TRACE_ENDS", "NO_TRACE_INDETERMINATE_FLOW", "", "", "AS_IS", "", "", "", "AS_IS")

Outcomes