AnsweredAssumed Answered

Adding annotation feature class with Python script

Question asked by Don.Dailey@ardot.gov_ardot on Aug 9, 2018
Latest reply on Aug 9, 2018 by Don.Dailey@ardot.gov_ardot

I've created annotation feature classes from Microstation DGN files and I need to add those to a series of mxd's using arcpy. I've been able to do that, but the layers are added as polygon features not as annotation features. I've dug around and found this solutionAnnotation classes not visible after adding an annotation layer , but it doesn't work for me. The feature class still adds as a polygon layer. Has anyone else run into this? Below is the relevant code. 


for df in arcpy.mapping.ListDataFrames(mxd):
            if == "Layers":
                featclasses = arcpy.ListFeatureClasses("","",County_Nam)
                print featclasses
                for fc in featclasses:
                    print fc
                    addLayer = arcpy.mapping.Layer(fc)
                    reflayer = arcpy.mapping.ListLayers(mxd,"Private",df)[0]
                    if fc == County_Nam + "_Anno_Ins":
                        print fc
                        temp = County_Nam + "_Anno_Ins"
                        annoLayer = arcpy.mapping.Layer(temp)
                        arcpy.mapping.AddLayer(df, annoLayer, "BOTTOM")