arcpy.mapping.Export creates some labels but not others

المشرف العام

Administrator
طاقم الإدارة
I've created a simple python toolbox (pyt) to export map layouts to multiple formats. My problem is that some labels which are defined in the layout are exported, but others are not. For example point labels export but contour labels dont. When I export from within ArcMap all labels are exported.

Question: Is there any argument missing from my "arcpy.mapping.Export" statements that would affect labeling?

I had problems posting the whole toolbox but it can be downloaded from here: Export MXD Toolbox

Here's the code that does the exporting.

# mxd namemxd = arcpy.mapping.MapDocument(parameters[1].valueAsText)# workspaceenv.workspace = parameters[0].valueAsText# workspace text to use in pathsworkSpace = parameters[0].valueAsTextAddMessage("The workspace is " + env.workspace)# resolutiondpi = parameters[2].valueAsText# filenamename = parameters[3].valueAsText# option for formats to exportcreatePDF = parameters[4].valueAsTextcreateTIFF = parameters[5].valueAsTextcreateEPS = parameters[6].valueAsTextcreateAi = parameters[7].valueAsText# Export PDFif createPDF == "true": AddMessage("Exporting PDF") arcpy.mapping.ExportToPDF(map_document = mxd, out_pdf = workSpace + "\\" + name + ".pdf", resolution=dpi, convert_markers=True, layers_attributes="LAYERS_AND_ATTRIBUTES")else: AddMessage("You chose not to create a PDF")# Export TIFFif createTIFF == "true": AddMessage("Exporting TIFF") arcpy.mapping.ExportToTIFF(map_document = mxd, out_tiff = workSpace + "\\" + name + ".tif", resolution=dpi, tiff_compression="LZW")else: AddMessage("You chose not to create a TIFF")# Export EPSif createEPS == "true": AddMessage("Exporting EPS") arcpy.mapping.ExportToEPS(map_document = mxd, out_eps = workSpace + "\\" + name + ".eps", resolution=dpi, image_quality="BEST", picture_symbol="VECTORIZE_BITMAP", convert_markers=True)else: AddMessage("You chose not to create an EPS")# Export to Aiif createAi == "true": AddMessage("Exporting Ai") arcpy.mapping.ExportToAI(map_document = mxd, out_ai = workSpace + "\\" + name + ".ai", resolution=dpi, picture_symbol="VECTORIZE_BITMAP", convert_markers=True)else: AddMessage("You chose not to create an Ai")

أكثر...
 
أعلى