Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I am developing a script to automate the creation of a road network following varying criteria.

I have created a geometric network and I would like to get the connection between several points with the Trace Geometric Network tool. Using the gui, the processing works perfectly and I get the expected result. But using arcpy, when I paste the line got with "Copy As Python Snippet" in the result window, I get the following error message:

>>>arcpy.TraceGeometricNetwork_management("C:/arcout/gruyere.gdb/roadFeatDat/roadNetwork","roadNetwork","C:/arcout/gruyere.gdb/roadFeatDat/points","FIND_CONNECTED","#","#","#","#","#","NO_TRACE_ENDS","NO_TRACE_INDETERMINATE_FLOW","#","#","AS_IS","#","#","#","AS_IS")
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "C:\Program Files (x86)\ArcGIS\Desktop10.1\arcpy\arcpy\management.py", line 5110, in TraceGeometricNetwork
    raise e
ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000584: Implementation of this Tool's Validate is invalid.
ERROR 000584: Implementation of this Tool's Validate is invalid.
[...]16 times
Failed to execute (TraceGeometricNetwork).

The extensions enabled are

arcpy.SetProduct('ArcView')
arcpy.CheckOutExtension('Spatial')
arcpy.CheckOutExtension("3D")

The error 000584 should concern a custom developed tool, which TraceGeometricNetwork is not.

Any Idea ?

share|improve this question
    
Try dropping everything after FIND_CONNECTED. Those are all default values. Or try changing the "#"s to ""s. And possible set the workspace env. –  gm70560 Apr 30 '13 at 20:19
    
I still get the error without the end of the attributes. –  Curly May 3 '13 at 12:02
    
Check the parameters again. The only thing I see is that the out_layer (2nd parameter) is a relative path and is it a group layer? –  gm70560 May 3 '13 at 17:34
    
I changed the second parameter to test, but with just a name it does not work either. Should it be an existing group layer file ? It create the group layer with just a name in the GUI. –  Curly May 6 '13 at 9:14

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.