|
POST
|
Jake Skinner I tried to set the extent numbers in UTM but it would not allow me to... even I set the df as well... #Set the df to refresh the "Set Extent" df = arcpy.mapping.ListDataFrames(mxd, "Layers")[0] arcpy.env.extent ="MAXOF" newExtent = df.extent newExtent.XMin, newExtent.YMin = 210000,360000 newExtent.XMax, newExtent.YMax = 550000,400000 df.extent = newExtent
... View more
02-26-2015
08:28 AM
|
0
|
1
|
2120
|
|
POST
|
Hi evreyone, I am working on this exercise I am not sure of...but I believe there is an error in it. This is from the Programming ArcGIS 10.1 with Python cookbook on page 222 that says: import arcpy
import pythonaddins
class ButtonClassImportWildfires(object):
"""Implementation for WildfireAddIn_addin.button (Button)"""
def __init__(self):
self.enabled = True
self.checked = False
def onClick(self):
pass Does it seem correct to you ? Then it says: Remove the pass statement from the onClick event. In Chapter 7, you created a custom script tool that loads wildfire data from a text file to a feature class. Inside the onClick event, call this Load Wildfires from Text custom script tool so that it displays the user interface for selecting the text file, template, and feature class to write to. def onClick(self): LoadWildfires_wildfire() Save the file. When I open that addin to my ArcMap and I can only see this :
... View more
02-25-2015
11:52 AM
|
0
|
4
|
5207
|
|
POST
|
I am trying to set the extent of the ArcMap where I want to add the raster to my ArcMap but this does not work... #Set the Scale extent arcpy.Extent(147806,3495023,584371,3899368) I have looked at the ArcGIS 10.1 help about this but not sure which one is the correct way to display them .
... View more
02-23-2015
10:56 AM
|
0
|
6
|
6458
|
|
POST
|
I took care of it and now it is working that I am enable to connect the server without any problems.
... View more
02-22-2015
03:11 PM
|
0
|
0
|
965
|
|
POST
|
I am working on loading several NAIP l to my ArcMap and writing a script to call them ...now I am curious if there is an extent that can I get able to work to set them to extent overview ? I looked at the extent but not sure which one is the right one. Can anyone help me out ? Thanks, Robert
... View more
02-18-2015
05:16 PM
|
0
|
1
|
4189
|
|
POST
|
I'm trying to write a script to add raster layer to my mxd from the server but i am not sure if the path to the server is correct ? import arcpy, os arcpy.env.workspace=(r"S:\Las Cruces SSO\GIS_Master_Data\NAIP_2009\Dona Ana") mxd = arcpy.mapping.MapDocument(r"E:\ArcMap\Retrieve_NAIP.mxd") df = arcpy.mapping.ListDataFrames(mxd,"Layers") addlayer = arcpy.mapping.Layer('S:/Las Cruces SSO/GIS_Master_Data/NAIP_2009/Dona Ana') arcpy.mapping.AddLayer(df, addlayer,"AUTO_ARRANGE") mxd.saveACopy("E:\ArcMap\Retrieve_NAIP.mxd") del mxd, addlayer look at the number 05 here is that the raster reside is on the server . The mxd file is on my hard drive. Thanks, Robert
... View more
02-17-2015
01:32 PM
|
0
|
2
|
4466
|
|
POST
|
On page 169 of the Programming ArcGIS 10.1 with Python cookbook. Step 6 says to type this : for row in sorted(cursor): But if you look at the number 04 which gave the error because PyScripter could not defined cursor ? I have also type this 04 code into Python window and it showed it doesn't defined cursor is .... import arcpy.da arcpy.env.workspace ="c:/ArcpyBook/Ch9" arcpy.da.SearchCursor("Schools.shp",("Facility","Name")) for row in in sorted(cursor): print("School name: " + row[1])
... View more
02-15-2015
11:49 AM
|
0
|
6
|
5921
|
|
POST
|
Hi All, I am trying to write a script to call a variable to inform that your exported has been completed. Please take a take a look at here to see if this is correct or not . Thanks #------------------------------------------------------------------------------- # Name: Export PDF # Purpose: To export MapLayout to PDF # Author: Robert.Pollock # Created: 10/02/2015 # Copyright: (c) Robert.Pollock 2015 #------------------------------------------------------------------------------- import arcpy.mapping, os str = "Your PDF exported has been delivered to your folder, Thank you" mxd = arcpy.mapping.MapDocument("E:\FY2015_projects\Mimbres Ranch River\Mimbres River Ranch2.mxd") arcpy.mapping.ExportToPDF(mxd,r"E:\workspace\PDF\MimbresRiverRanch34x44") ## Print message to complete the exported processed print arcpy.GetMessages(print str.rjust(50, '0') Thank you for your help
... View more
02-12-2015
07:14 AM
|
0
|
1
|
4530
|
|
POST
|
Somebody in the office deleted a point shapefile that has a lyr file as well. How can I recovery it ? Scripts ? Thanks
... View more
02-11-2015
05:52 PM
|
0
|
3
|
5063
|
|
POST
|
Hi all, I am curious if there is a snippet codes that can I get or share from someone so I can write script that allows me to watch the process showing time backwards or show how long the process til the end ? I can't find it on the python documentation or ArcGIS python ? Does someone have a good one that I can share with ? Thanks.
... View more
02-11-2015
01:46 PM
|
0
|
2
|
4879
|
|
POST
|
Never mind. I did checked and ListLayers still there and I think the main problem is I copied and paste when I first started and gave me bunch of problems so I am thinking instead of copy and past . I might have to do typing rather than copy and paste ? What do you say ?
... View more
02-10-2015
12:05 PM
|
0
|
0
|
935
|
|
POST
|
Thanks. I went back to Pyscripter and try again and change from gridlayers to imagelayer Now I see that ListLayers had the errror so I am thinking that by looking at the Varibales and it is not there... is that why it could not run it ?
... View more
02-10-2015
11:26 AM
|
0
|
1
|
935
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 04-08-2026 10:11 AM | |
| 1 | 09-01-2022 03:43 PM | |
| 1 | 09-28-2020 09:34 AM | |
| 2 | 09-24-2025 09:48 AM | |
| 1 | 09-22-2025 08:29 AM |
| Online Status |
Offline
|
| Date Last Visited |
Monday
|