PDF) arcpy.mapping CreateMapSDDraft Automate publishing map documents to map services Map document arcpy.mapping Map serviceĪrcGIS Server 10.1 and the ArcGIS web APIs support effortless web map printing via print services. arcpy.SetParameterAsText(1,path "\\output.pdf") Related Session: Geoprocessing with ArcGIS for Serverġ1 New functions in 10.1 for server publishing and printingĬonvertWebMapToMapDocument Use with the ArcGIS web APIs for advanced web map printing workflows Web application High-quality output (e.g. (mxd, path "\\output.pdf") After path =. Things to consider help topic: Before import arcpy path = r”C:\Project\maps”. Example: mxd = ("current") legend = (mxd, "LEGEND_ELEMENT") styleItem = ( "USER_STYLE", "Legend Items", "MyNewStyle") for lyr in legend.listLegendItemLayers(): legend.updateItem(lyr, styleItem) DEMOġ0 Authoring geoprocessing tasks with Python scripts style file can then be used to update already existing legend items in a layout. Python Add-in Wizard Download from: Related Session: Migrating your VBA applications to Desktop Add-insĪ referenced legend item in a. Layer.symbologyType r/o : string Returns: GRADUATED_COLORS, GRADUATED_SYMBOLS, UNIQUE_VALUES RASTER_CLASSIFIED, OTHER Layer.symbology r/o : Symbology Class Example: if lyr.symbologyType = “GRADUATED_COLORS”: = 10 = “POP2007” General notes, can NOT change: Symbology class Individual symbols use Classification methods DEMO1 DEMO2Ĩ Deployment - arcpy.mapping and Python Add-InsĪrcGIS 10.1 – Python Add-Ins Add-in deployment of mapping tools Mechanism for deploying ArcMap customizations Online help: Take mouse input, respond to app events FinishDrawing, DPP PageChange, etc. You can now clone text and graphic elements This allows you to automate things like dynamic tables Example: vertl = ( mxd, “GRAPHIC_ELEMENT”, “VerticalLine”) vertl.elementPositionX = xPos vertl.elementPositionY = 4 vert1.elementHeight = 3 for line in range(1, numColumns 1): vert_clone = vertLine.clone("_clone") xPos = xPos colWidth vert_clone.elementPositionX = xPos DEMO 1 DEMO 2 When using CURRENT Always run in foreground May need to refresh (e.g., RefreshActiveView\TOC) Uniquely name all the objects you want to reference Pre-author MXDs with all possible elements Can’t create new objects (e.g., north arrow, data frames) Author the extra elements off the page No "New Map" function, so keep an empty MXD available This is not a replacement for ArcObjects – we are trying to draw a line in the sand Us You “The Line”ĥ What’s new at 10.1 What’s new Mapping What’s new for automating map workflows ( JPython Map Automation – Beyond the Basics of arcpy.mapping Jeff Barrette Jeff MouldsĪ python scripting API that allows you to: Manage map documents, layer files, and the content within them Automate the exporting and printing of map documents Automate map production and create PDF map books Extend Data Driven Pages A simple way to publish mapping tasks to the server environmentģ Basic rules Reference an MXD using a path or “current” keyword 1 Python Map Automation – Beyond the Basics of arcpy.mapping
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |