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
Solved! Go to Solution.
The Extent—Help | ArcGIS Desktop documentation covers it, albeit maybe not direct enough.
Summary
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
Syntax
ListLayers (map_document_or_layer, {wildcard}, {data_frame})
Parameter Explanation Data Type map_document_or_layerA variable that references a MapDocument or Layer object.
Object wildcardA combination of asterisks (*) and characters can be used to help limit the results.
(The default value is None)
String data_frameA variable that references a DataFrame object.
(The default value is None)
DataFrame
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?
The Extent—Help | ArcGIS Desktop documentation covers it, albeit maybe not direct enough.
Summary
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.
Sorry, i meant to show the numbers that i am getting:
Also, would you know how to make ArcGIS zoom to these coordinates?
Thanks
Joshua,
Thanks for the help