Annotation from Data Driven Pages and Adobe Illustrator

1776
1
Jump to solution
05-28-2014 07:56 AM
LoganSuhr
New Contributor II
Good morning,

I am having an issue exporting to the AI format that I can't nail down.

I have an MXD setup with about 55 data driven pages.  Each page's scale is driven by a scale field.  Because of the different scales I have had to create an annotation dataset(in a file gdb) for each page.  My workflow dictates that I export the annotation as a seperate file which I will later incorporate into Adobe Illustrator.  The natural file type to export to would be .AI of course.  Exporting to a PDF is very cumbersome as it does not retain the annotation as a single string.

The problem:  Exporting each data driven page to the AI format is not an issue; the annotation is there along with any other features. The exported AI file is an older format (I believe) so it requires an 'update' when opening it in Illustrator CC to see the annotation.  Not too much of a problem.  But when I automate the AI export process to iterate over all of my pages... the annotation is not delivered.  Other features are present.  Layout graphics are included.  But no annotation. I can't even get a blank layer where the annotation should be.

In the MXD the annotation layers are turned on and off based on map scale.  The minimum and maximum scale in which they are visible are the same value and match the scale of their respective pages.  They are also not dependent on the data driven page source features being visible (though they are present in the mxd).  I have a feeling that cycling through each page in my script is not hitting the annotation features at all.  But why not?  The layers are on and the MXD is saved in the state at which I want to export to AI.  As stated, I can manually hit each page and perform an export to AI without an issue.  But I don't want to do that (even though I could have probably been done with this project by now).

I am at a loss.

Here is my script:

import arcpy, os, string  #Specify the map document ui0 = arcpy.GetParameterAsText(0) mxd = arcpy.mapping.MapDocument(ui0)   #Specify the element being exported (ie base, aerial, roads, boundaries, etc) rootName = arcpy.GetParameterAsText(1)   #Export each of the data driven pages for pageNum in range(1, mxd.dataDrivenPages.pageCount + 1):     mxd.dataDrivenPages.currentPageID = pageNum     cbsaName = mxd.dataDrivenPages.pageRow.getValue("CBSACode")     arcpy.mapping.ExportToAI(mxd, r"C:\GIS\Surge\2014 Surge Report Dev\map dev\batch exports\\" + cbsaName + "_" + rootName + ".ai") del mxd


Does anybody have a functioning workflow like this or have any ideas where I've gone wrong?

Thanks for your time and response,

Logan Suhr
GIS Analyst Senior Specialist
CoreLogic
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
LoganSuhr
New Contributor II
Solved:

It seems as though the scale minimum and maximum values were the problem.  After setting a range of +/- 1k around the scale associated with each page instead of having the min max values be equal to the current page scale, the annotation exported properly.

It seems trivial that a For loop over each page would have such requirements for an annotation class considering it draws properly when looking at each page in ArcMap.

What you see is NOT what you get in this instance.

Hope this helps somebody else in the future,
Logan

View solution in original post

1 Reply
LoganSuhr
New Contributor II
Solved:

It seems as though the scale minimum and maximum values were the problem.  After setting a range of +/- 1k around the scale associated with each page instead of having the min max values be equal to the current page scale, the annotation exported properly.

It seems trivial that a For loop over each page would have such requirements for an annotation class considering it draws properly when looking at each page in ArcMap.

What you see is NOT what you get in this instance.

Hope this helps somebody else in the future,
Logan