I have the following code:
The way it is written it shows all of the layers in my mxd file. I want to change the code so that i only gets the data for 1 layer: Primary OH
How would i change the script to do this?
Thanks
The Extent—Help | ArcGIS Desktop documentation covers it, albeit maybe not direct enough.
SummaryAn extent is a rectangle specified by providing the coordinate of the lower left corner and the coordinate of the upper right corner in map units.
An extent is a rectangle specified by providing the coordinate of the lower left corner and the coordinate of the upper right corner in map units.
The key is "in map units," which means in the units of the spatial reference for the layer. From looking at the values in your screenshot below, it is obvious the coordinates aren't geographic, so you are working with some projection.
There are multiple ways to do this, and the ListLayers—Help | ArcGIS Desktop documentation covers this
SyntaxListLayers (map_document_or_layer, {wildcard}, {data_frame})ParameterExplanationData Typemap_document_or_layerA variable that references a MapDocument or Layer object.ObjectwildcardA combination of asterisks (*) and characters can be used to help limit the results.(The default value is None)Stringdata_frameA variable that references a DataFrame object.(The default value is None)DataFrame
ListLayers (map_document_or_layer, {wildcard}, {data_frame})
A variable that references a MapDocument or Layer object.
A combination of asterisks (*) and characters can be used to help limit the results.
(The default value is None)
A variable that references a DataFrame object.
and shows a couple examples:
Joshua, Thanks for pointing me in he right direction. This code works. It get floating numbers for the min/max values.
Can you tell me what the number mean - x/y coordinates, feet, etc?
Sorry, i meant to show the numbers that i am getting:
Also, would you know how to make ArcGIS zoom to these coordinates?
Joshua,
Thanks for the help
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.