AnsweredAssumed Answered

Arcpy add schematic diagram to MXD

Question asked by dtsimpson on Feb 19, 2018
Latest reply on Jan 29, 2019 by timdine

I need a python script that I can use to create a schematic diagram, and add it to an mxd. This must be done in an independent script and I cannot do it in arcmap.


The problem is I can't get arcpy to add the diagram layer to the map. I run arcpy.schematics.CreateDiagram to create the diagram and that works, but when I try to use arcpy.mapping.AddLayer to add the return from the diagram it throws an AssertionError. I have also tried to use arcpy.mapping.Layer but that throws the same error.


Can someone PLEASE tell me how to add a schematic diagram to an MXD with arcpy?