Generate a PDF

551
1
06-05-2012 05:28 AM
TiagoRibeiro
Occasional Contributor
Hello everybody,

I have a webGIS, and I'm trying to generate a PDF using a python script based in this sample, http://www.arcgis.com/home/item.html?id=8f16fdeef39c46b3952002b2d85ea5de, but with a few twits.
I'm already able to generate a PDF with my own custom layers and layout. Now I need to add some more information to the map based in selections made in the WebGIS.
Basically what I want is to query a feature class, then add the resulting records to my map, and finally show them in the PDF.
What I'm planning to do is to add an empty feature classes to the mxd, with symbology already defined, and then copy the rows from the source feature class to this one.
Since I don't have yet a lot of experience with Python and geoprocessing, I ask you:

  • Is this the best approach, and if not, can you tell me how you would accomplish this?

  • Can you point me to the right functions and resources to do this?

For now it's all. Hopefully someone can help me!
Tags (2)
0 Kudos
1 Reply
JeffBarrette
Esri Regular Contributor
There are several ways this can be accomplished.  It may depend on the type of renderer you are using.  I would probably try authoring the MXD with a pre-authored layer (i.e., symbolized the way you want), generate the result, and then use arcpy.mapping to change the layer's data source.  Check out:

http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Updating_and_fixing_data_sources_with_...

Jeff
0 Kudos