The arcpy.mp classes provide access to various methods and properties for the different object types found within an ArcGIS Pro project or layer file. This document is intended to serve as a quick reference. For more specific information, use the links to jump to the individual help pages.
arcpy.mp classes
- Methods
- importDocument(document_path, {include_layout}, {reuse_existing_maps})
- listBrokenDataSources()
- listColorRamps({wildcard})
- listLayouts({wildcard})
- listMaps({wildcard})
- listReports({wildcard})
- save()
- saveACopy(file_name)
- updateConnectionProperties(current_connection_info, new_connection_info, {auto_update_joins_and_relates}, {validate}, {ignore_case})
- Properties
- activeMap—Read-only; Map object
- activeView—Read-only; MapView, Layout or None object
- dateSaved—Read-only; Python datetime object
- defaultGeodatabase—Read/Write; String
- defaultToolbox—Read/Write; String
- documentVersion—Read-only; String
- filePath—Read-only; String
- homeFolder—Read/Write; String
- metadata—Read/Write; Metadata
- Methods
- updateThumbnail()
- Properties
- hasThumbnail—Read-only; Boolean
- map—Read-only; Map object
- name—Read/Write; String
- Methods
- getExtent()
- setExtent(extent)
- Properties
- heading—Read/Write; Double
- mode—Read/Write; String
- pitch—Read/Write; Double
- roll—Read/Write; Double
- scale—Read/Write; Double
- X—Read/Write; Double
- Y—Read/Write; Double
- Z—Read/Write; Double
- Properties
- description—Read/Write; String
- label—Read/Write; String
- symbol—Read/Write; Symbol
- upperBound—Read/Write; Double
- Properties
- name—Read-only; String
- Properties
- breakCount—Read/Write; Integer
- classBreaks—Read/Write; List of ClassBreak objects
- classificationField—Read/Write; String
- classificationMethod—Read/Write; String
- colorRamp—Read/Write; ColorRamp
- deviationInterval—Read/Write; Double
- intervalSize—Read/Write; Double
- normalizationField—Read/Write; String
- normalizationType—Read/Write; String
- type—Read-only; String
- Methods
- updateSymbolTemplate(symbol_template)
- Properties
- backgroundSymbol—Read/Write; Symbol
- breakCount—Read/Write; Integer
- classBreaks—Read/Write; List of ClassBreak objects
- classificationField—Read/Write; String
- classificationMethod—Read/Write; String
- colorRamp—Read/Write; ColorRamp
- deviationInterval—Read/Write; Double
- intervalSize—Read/Write; Double
- maximumSymbolSize—Read/Write; Double
- minimumSymbolSize—Read/Write; Double
- normalizationField—Read/Write; String
- normalizationType—Read/Write; String
- symbolTemplate—Read-only; Symbol
- type—Read-only; String
- Methods
- clone({suffix})
- delete()
- Properties
- elementHeight—Read/Write; Double
- elementPositionX—Read/Write; Double
- elementPositionY—Read/Write; Double
- elementRotation—Read/Write; Double
- elementWidth—Read/Write; Double
- isGroup—Read-only; Boolean
- locked—Read/Write; Boolean
- name—Read/Write; String
- type—Read-only; String
- visible—Read/Write; Boolean
- Properties
- description—Read/Write; String
- label—Read/Write; String
- symbol—Read/Write; Symbol
- values—Read-only; List of values
- Properties
- heading—Read/Write; String
- items—Read/Write; List of Item or RasterItem objects
- Properties
- expression—Read/Write; String
- name—Read/Write; String
- SQLQuery—Read/Write; String
- visible—Read/Write; Boolean
- Methods
- enableTime({startTimeField}, {endTimeField}, {autoCalculateTimeRange}, {timeDimension})
- extrusion({extrusion_type}, {expression})
- getDefinition(cim_version)
- getSelectionSet()
- listDefinitionQueries({wildcard})
- listLabelClasses({wildcard})
- listLayers({wildcard})
- listTables({wildcard})
- saveACopy(file_name)
- setDefinition(definition_object)
- setSelectionSet({oidList}, {method})
- supports(layer_property)
- updateConnectionProperties(current_connection_info, new_connection_info, {auto_update_joins_and_relates}, {validate}, {ignore_case})
- updateDefinitionQueries(definitionQueries)
- updateLayerFromJSON(json_data)
- Properties
- brightness—Read/Write; Long
- connectionProperties—Read-only; Dictionary
- contrast—Read/Write; Long
- dataSource—Read-only; String
- definitionQuery—Read/Write; String
- is3DLayer—Read-only; Boolean
- isBasemapLayer—Read-only; Boolean
- isBroken—Read-only; Boolean
- isFeatureLayer—Read-only; Boolean
- isGroupLayer—Read-only; Boolean
- isNetworkAnalystLayer—Read-only; Boolean
- isNetworkDatasetLayer—Read-only; Boolean
- isRasterLayer—Read-only; Boolean
- isSceneLayer—Read-only; Boolean
- isTimeEnabled—Read-only; Boolean
- isWebLayer—Read-only; Boolean
- longName—Read-only; String
- maxThreshold—Read/Write; Double
- metadata—Read/Write; Metadata
- minTheshold—Read/Write; Double
- name—Read/Write; String
- showLabels—Read/Write; Boolean
- symbology—Read/Write; Renderer object
- time—Read-only; LayerTime object
- transparency—Read/Write; Long
- URI—Read-only; Boolean
- visible—Read/Write; Boolean
- Methods
- addLayer(add_layer_or_layerfile, {add_position})
- addLayerToGroup(target_group_layer, add_layer_or_layerfile, {add_position})
- insertLayer(reference_layer, insert_layer_or_layerfile, {insert_position})
- listBrokenDataSources()
- listLayers({wildcard})
- listTables({wildcard})
- moveLayer(reference_layer, move_layer, {insert_position})
- removeLayer(remove_layer)
- save()
- saveACopy(file_name)
- updateConnectionProperties(current_connection_info, new_connection_info, {auto_update_joins_and_relates}, {validate}, {ignore_case})
- Properties
- filePath—Read-only; String
- metadata—Read/Write; Metadata
- version—Read-only; String
- Properties
- daylightSavings—Read/Write; Boolean
- endTime—Read/Write; DateTime
- endTimeField—Read/Write; String
- startTime—Read/Write; DateTime
- startTimeField—Read/Write; String
- timeDimension—Read/Write; String
- timeFormat—Read/Write; String
- timeOffset—Read/Write; Double
- timeOffsetUnits—Read/Write; String
- timeStepInterval—Read/Write; Double
- timeStepIntervalUnits—Read/Write; String
- timeZone—Read/Write; String
- Methods
- exportToAIX(out_aix, {resolution}, {image_quality}, {compress_vector_graphics}, {image_compression}, {jpeg_compression_quality}, {embed_fonts}, {embed_color_profile}, {clip_to_elements}, {keep_layout_background}, )
- exportToBMP(out_bmp, {resolution}, {bmp_color_mode}, {bmp_image_compression}, {embed_color_profile}, {clip_to_elements})
- exportToEMF(out_emf, {resolution}, {image_quality}, {output_as_image}, {clip_to_elements})
- exportToEPS(out_eps, {resolution}, {image_compression}, {image_quality}, {embed_fonts}, {output_as_image}, {clip_to_elements})
- exportToGIF(out_gif, {resolution}, {gif_color_mode}, {clip_to_elements})
- exportToJPEG(out_jpg, {resolution}, {jpeg_color_mode}, {jpeg_quality}, {embed_color_profile}, {clip_to_elements})
- exportToPAGX(out_pagx)
- exportToPDF(out_pdf, {resolution}, {image_quality}, {compress_vector_graphics}, {image_compression}, {embed_fonts}, {layers_attributes}, {georef_info}, {jpeg_compression_quality}, {clip_to_elements}, {output_as_image}, {embed_color_profile}, {pdf_accessibility)
- exportToPNG(out_png, {resolution}, {color_mode}, {transparent_background}, {embed_color_profile}, {clip_to_elements})
- exportToSVG(out_svg, {resolution}, {compress_to_svgz}, {image_quality}, {embed_fonts}, {output_as_image}, {clip_to_elements})
- exportToTGA(out_tga, {resolution}, {color_mode}, {transparent_background}, {clip_to_elements})
- exportToTIFF(out_tif, {resolution}, {color_mode}, {tiff_compression}, {jpeg_compression_quality}, {transparent_background}, {embed_color_profile}, {clip_to_elements},{world_file}, {geoTIFF_tags}, {georef_mapframe})
- getDefinition(cim_version)
- listElements({element_type}, {wildcard})
- setDefinition(definition_object)
- Properties
- Methods
- addItem(layer, {add_position})
- moveLayer(reference_item, move_item, {move_position})
- removeLayer(remove_item)
- Properties
- columnCount—Read/Write; Long
- elementHeight—Read/Write; Double
- elementPositionX—Read/Write; Double
- elementPositionY—Read/Write; Double
- elementRotation—Read/Write; Double
- elementWidth—Read/Write; Double
- fittingStrategy—Read/Write; String
- items—Read-only; List of LegendItem objects
- locked—Read/Write; Boolean
- mapFrame—Read/Write; MapFrame object
- name—Read/Write; String
- showTitle—Read/Write; Boolean
- syncLayerOrder—Read/Write; Boolean
- syncLayerVisbility—Read/Write; Boolean
- syncNewLayer—Read/Write; Boolean
- syncReferenceScale—Read/Write; Boolean
- title—Read/Write; String
- type—Read-only; String
- visible—Read/Write; Boolean
- Properties
- arrangement—Read/Write; String
- column—Read/Write; Long
- name—Read-only; String
- patchHeight—Read/Write; Double
- patchWidth—Read/Write; Double
- showFeatureCount—Read/Write; Boolean
- showVisibleFeatures—Read/Write; Boolean
- type—Read-only; String
- visible—Read/Write; Boolean
- Methods
- addBasemap(basemap_name)
- addDataFromPath(data_path)
- addLayer(add_layer_or_layerfile, {add_position})
- addLayerToGroup(target_group_layer, add_layer_or_layerfile, {add_position})
- addTable(add_table)
- clearSelection()
- exportToMAPX(out_mapx)
- getDefinition(cim_version)
- getWebLayerSharingDraft(server_type, service_type, service_name, {layers_and_tables})
- insertLayer(reference_layer, insert_layer_or_layerfile, {insert_position})
- listBookmarks({wildcard})
- listBrokenDataSources()
- listLayers({wildcard})
- listTables({wildcard})
- moveLayer(reference_layer, move_layer, {insert_position})
- removeLayer(remove_layer)
- removeTable(remove_table)
- setDefinition(definition_object)
- updateConnectionProperties(current_connection_info, new_connection_info, {auto_update_joins_and_relates}, {validate}, {ignore_case})
- Properties
- defaultCamera—Read/Write; Camera object
- defaultView—Read-Only; MapView object
- mapType—Read-only; String
- mapUnits—Read/Write; String
- metadata—Read/Write; Metadata
- name—Read/Write; String
- referenceScale—Read/Write; Double
- spatialReference—Read/Write; SpatialReference object
- URI—Read-only; Boolean
- Methods
- exportToAIX(out_aix, {resolution}, {image_quality}, {compress_vector_graphics}, {image_compression}, {jpeg_compression_quality}, {embed_fonts}, {embed_color_profile})
- exportToBMP(out_bmp, {resolution}, {world_file}, {bmp_color_mode}, {bmp_image_compression}, {embed_color_profile})
- exportToEMF(out_emf, {resolution}, {image_quality}, {output_as_image})
- exportToEPS(out_eps, {resolution}, {image_compression}, {image_quality}, {embed_fonts}, {output_as_image})
- exportToGIF(out_gif, {resolution}, {world_file}, {gif_color_mode})
- exportToJPEG(out_jpg, {resolution}, {world_file}, {jpeg_color_mode}, {jpeg_quality}, {embed_color_profile})
- exportToPDF(out_pdf, {resolution}, {image_quality}, {compress_vector_graphics}, {image_compression}, {embed_fonts}, {layers_attributes}, {georef_info}, {jpeg_compression_quality}, {output_as_image}, {embed_color_profile})
- exportToPNG(out_png, {resolution}, {world_file}, {color_mode}, {embed_color_profile})
- exportToSVG(out_svg, {resolution}, {compress_to_svgz}, {image_quality}, {embed_fonts}, {output_as_image})
- exportToTGA(out_tga, {resolution}, {world_file}, {color_mode})
- exportToTIFF(out_tif, {resolution}, {world_file}, {color_mode}, {tiff_compression}, {geoTIFF_tags}, {jpeg_compression_quality}, {embed_color_profile})
- getLayerExtent(layer, {selection_only}, {symbolized_extent})
- panToExtent(extent)
- zoomToAllLayers({selection_only}, {symbolized_extent})
- zoomToBookmark(bookmark)
- Properties
- camera—Read/Write; camera object
- elementHeight—Read/Write; Double
- elementPositionX—Read/Write; Double
- elementPositionY—Read/Write; Double
- elementRotation—Read/Write; Double
- elementWidth—Read/Write; Double
- locked—Read/Write; Boolean
- map—Read/Write; Map object
- name—Read/Write; String
- time—Read-only; MapTime object
- type—Read-only; String
- visible—Read/Write; Boolean
- Methods
- exportToPDF(out_pdf, {page_range_type}, {page_range_string}, {multiple_files}, {resolution}, {image_quality}, {compress_vector_graphics}, {image_compression}, {embed_fonts}, {layers_attributes}, {georef_info}, {jpeg_compression_quality}, {clip_to_elements}, {show_selection_symbology}, {output_as_image}, {embed_color_profile}, {pdf_accessibility)
- getPageNumberFromName(page_name)
- refresh()
- Properties
- Properties
- elementHeight—Read/Write; Double
- elementPositionX—Read/Write; Double
- elementPositionY—Read/Write; Double
- elementWidth—Read/Write; Double
- locked—Read/Write; Boolean
- mapFrame—Read/Write; MapFrame object
- name—Read/Write; String
- type—Read-only; String
- visible—Read/Write; Boolean
- Methods
- setTimeInclusion(time_inclusion)
- timeStep(time, interval, interval_units)
- Properties
- currentTimeEnd—Read/Write; DateTime
- currentTimeSpan—Read-only; Double
- currentTimeSpanUnits—Read-only; String
- currentTimeStart—Read/Write; DateTime
- isTimeEnabled—Read/Write; Boolean
- timeIncludsion—Read-only; String
- timeStepInterval—Read-only; Double
- timeStepIntervalUnits—Read-only; String
- Methods
- exportToAIX(out_aix, width, height, {resolution}, {image_quality}, {compress_vector_graphics}, {image_compression}, {jpeg_compression_quality}, {embed_fonts}, {embed_color_profile})
- exportToBMP(out_bmp, width, height, {resolution}, {world_file}, {bmp_color_mode}, {bmp_image_compression}, {embed_color_profile})
- exportToEMF(out_emf, width, height, {resolution}, {image_quality}, {output_as_image})
- exportToEPS(out_eps, width, height, {resolution}, {image_compression}, {image_quality}, {embed_fonts}, {output_as_image})
- exportToGIF(out_gif, width, height, {resolution}, {world_file}, {gif_color_mode})
- exportToJPEG(out_jpg, width, height, {resolution}, {world_file}, {jpeg_color_mode}, {jpeg_quality}, {embed_color_profile})
- exportToPDF(out_pdf, width, height, {resolution}, {image_quality}, {compress_vector_graphics}, {image_compression}, {embed_fonts}, {layers_attributes}, {georef_info}, {jpeg_compression_quality}, {output_as_image}, {embed_color_profile})
- exportToPNG(out_png, width, height, {resolution}, {world_file}, {color_mode}, {embed_color_profile})
- exportToSVG(out_svg, width, height, {resolution}, {compress_to_svgz}, {image_quality}, {embed_fonts}, {output_as_image})
- exportToTIFF(out_tif, width, height, {resolution}, {world_file}, {color_mode}, {tiff_compression}, {geoTIFF_tags}, {jpeg_compression_quality}, {embed_color_profile})
- exportToTGA(out_tga, width, height, {resolution}, {world_file}, {color_mode})
- getLayerExtent(layer, {selection_only}, {symbolized_extent})
- panToExtent(extent)
- zoomToAllLayers({selection_only}, {symbolized_extent})
- zoomToBookmark(bookmark)
- Properties
- Methods
- appendPages(pdf_path, {input_pdf_password})
- deletePages(page_range)
- insertPages(pdf_path, {before_page_number}, {input_pdf_password})
- saveAndClose()
- updateDocProperties({pdf_title}, {pdf_author}, {pdf_subject}, {pdf_keywords}, {pdf_open_view}, {pdf_layout})
- updateDocSecurity(new_master_password, {new_user_password}, {encryption})
- Properties
- pageCount—Read-only; Long
- Properties
- elementHeight—Read/Write; Double
- elementPositionX—Read/Write; Double
- elementPositionY—Read/Write; Double
- elementRotation—Read/Write; Double
- elementWidth—Read/Write; Double
- locked—Read/Write; Boolean
- name—Read/Write; String
- sourceImage—Read/Write; String
- type—Read-only; String
- visible—Read/Write; Boolean
- Properties
- color—Read/Write; Dictionary
- description—Read/Write; String
- label—Read/Write; String
- upperBound—Read/Write; Double
- Properties
- breakCount—Read/Write; Long
- classBreaks—Read/Write; List of RasterClassBreak objects
- classificationField—Read/Write; String
- classificationMethod—Read/Write; String
- colorRamp—Read/Write; ColorRamp
- noDataColor—Read/Write; Dictionary
- type—Read-only; String
- Properties
- color—Read/Write; Dictionary
- description—Read/Write; String
- label—Read/Write; String
- values—Read-only; List of values
- Properties
- band—Read/Write; Long
- colorRamp—Read/Write; ColorRamp
- gamma—Read/Write; Double
- invertColorRamp—Read/Write; Boolean
- maxLabel—Read/Write; String
- maxPercent—Read/Write; Double
- minLabel—Read/Write; String
- minPercent—Read/Write; Double
- standardDeviation—Read/Write; Double
- stretchType—Read/Write; String
- type—Read-only; String
- Properties
- Methods
- exportToPDF(out_pdf, {page_range_type}, {page_range}, {starting_page_number}, {total_page_number}, {resolution}, {image_quality}, {compress_vector_graphics}, {image_compression},{embed_fonts}, {jpeg_compression_quality})
- setReferenceDataSource(data_source)
- Properties
- definitionQuery—Read/Write; String
- metadata—Read/Write; Metadata
- name—Read/Write; String
- referenceDataSource—Read-only; Dictionary
- Properties
- description—Read/Write; String
- label—Read/Write; String
- symbol—Read/Write; Symbol
- type—Read-only; String
- Methods
- applySymbolFromGallery(wildcard, {index})
- listSymbolsFromGallery({wildcard})
- Properties
- angle—Read/Write; Double
- color—Read/Write; Dictionary
- name—Read-only; String
- outlineColor—Read/Write; Dictionary
- outlineWidth—Read/Write; Double
- size—Read/Write; Double
- useRealWorldUnits—Read/Write; Boolean
- Methods
- updateColorizer(colorizer_name)
- updateRenderer(renderer_name)
- Properties
- colorizer—Read-only; RasterClassifyColorizer, RasterUniqueValueColorizer
- renderer—Read-only; GraduatedColorsRenderer, GraduatedSymbolsRenderer, SimpleRenderer, or UniqueValueRenderer
- Methods:
- getDefinition(cim_version)
- getSelectionSet()
- listDefinitionQueries({wildcard})
- setDefinition(definition_object)
- setSelectionSet({oidList}, {method})
- updateConnectionProperties(current_connection_info, new_connection_info, {auto_update_joins_and_relates}, {validate}, {ignore_case})
- updateDefinitionQueries(definitionQueries)
- Properties
- connectionProperties—Read-only; Dictionary
- dataSource—Read-only; String
- definitionQuery—Read/Write; String
- isBroken—Read-only; Boolean
- metadata—Read/Write; Metadata
- name—Read/Write; String
- URI—Read-only; Boolean
- Methods
- clone({suffix})
- delete()
- Properties
- elementHeight—Read/Write; Double
- elementPositionX—Read/Write; Double
- elementPositionY—Read/Write; Double
- elementRotation—Read/Write; Double
- elementWidth—Read/Write; Double
- locked—Read/Write; Boolean
- name—Read/Write; String
- text—Read/Write; String
- textAngle—Read/Write; Double
- textSize—Read/Write; Double
- type—Read-only; String
- visible—Read/Write; Boolean
- Methods
- updateSymbolTemplate(symbol_template)
- Properties
- Methods
- addValues(values_or_items)
- listMissingValues()
- removeValues(values_or_items)
- Properties
Vous avez un commentaire à formuler concernant cette rubrique ?