Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I have a series of featureclasses and rasters generated using ArcObjects and calls to the Geoprocessor. I have the paths to the output, which are located in a file geodatabase. How can I use ArcObjects to build a map using a combination of these outputs and then save the final map as a PDF (or JPEG/PNG if PDF is not possible)? If this is possible, can I also add a legend/north arrow, etc?

The purpose of these maps is quick quality control and the output are all in the same projection and cover the same area.

I'm unfamiliar with building visual outputs "behind the scenes" in ArcObjects, so any information that points me in the right direction would be appreciated!

share|improve this question
1  
Just about everything you can do in ArcMap you can do in ArcObjects, it's more a matter of how much coding you want to do! This isn't a real answer, just some pointers: You'll probably want to use layer files to define the symbology beforehand, because defining symbology programmatically can take many many lines of code. Better yet is to design template MXDs that you then only have to modify slightly programmatically, something you might want to consider using arcpy.mapping instead for. –  blah238 Dec 7 '11 at 18:38
    
Additionally you might see if using Data Driven Pages could suit your purposes to avoid programming entirely. –  blah238 Dec 7 '11 at 18:49
    
Starting with layer files is a great idea - I'm going to try and stick to .NET as much as possible for this run since the software we've developed is all C# up to this point. If I have to I'll create a separate process for using arcpy that can be run after the output is produced. –  Nick Ochoski Dec 7 '11 at 19:00
1  
Speaking from experience, it is MUCH quicker and easier to use arcpy for doing this. If you are not opposed to it, you may consider creating a python script that does this stuff, and call the script from your c# sharp code. Just my 2 cents. –  user890 Dec 7 '11 at 22:26
    
I think calling the python script from C# is what I'll do. Cheers! –  Nick Ochoski Dec 8 '11 at 16:54
add comment

2 Answers 2

up vote 4 down vote accepted

For the programming route to export using ArcObjects you can use the Export active view code sample, see link below. I would suggest to pre define layouts objects such as north arrow and scale bar manually.

Export active view

share|improve this answer
    
I agree, use the new PrintAndExport API, see also the IExportPDF: help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/… –  MathiasWestin Dec 18 '11 at 13:29
add comment

Hy, I did a ServerObjectExtension containing advanced print functionalities. I did it in Java, but the code is very close to .NET May be a good inspiration of the ArcObject code.

The open-source code can be found here: http://bitbucket.schuller.lu/pchprintsoe/src/3d532e06e658/src/lu/etat/pch/gis/soe/tasks/print/PrintTask.java

Tom

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.