|
POST
|
In 10.1 you can create a python add-in that is able to bypass this I believe. In 10.0 I'm not sure if you can without using ArcObjects.
... View more
01-17-2013
04:31 AM
|
0
|
0
|
1911
|
|
POST
|
This looks like you are making a shapefile? You may need to add .shp, though it really shouldn't make a difference. Do you have a previous version with the same name open in another process/application? Also, you should be using a list for the fields to delete. ['COMMENT','YEAR','Join_Count','TARGET_FID','Shape_Le_1','BUFF_DIST'] Also, add the raw string tag to your paths to avoid problems. Eg. r"W:\ENG\Geomatics\GIS\Eastern Region Geodatabase.gdb"
... View more
01-16-2013
11:45 AM
|
0
|
0
|
1911
|
|
POST
|
Can you verify you only have one version of python installed? Also check what is in your sys.path list in both IDLE and the ArcGIS python window. They should mostly match.
... View more
01-15-2013
10:57 AM
|
0
|
0
|
3535
|
|
POST
|
On your 64-bit machine can you open your SDE connection file in Catalog? Does arcpy.Exists(table) return true? Are you on SP1?
... View more
01-15-2013
10:36 AM
|
0
|
0
|
3535
|
|
POST
|
for all those that fall within that first record I assume you mean spatially? This sounds like you are making it more complicated than necessary. There are a number of tools that do this process for you. Try Spatial Join or Intersect.
... View more
01-10-2013
01:50 PM
|
0
|
0
|
632
|
|
POST
|
We are using ArcGIS 10 SP 4 What should the value of the output variable be? I've tried to assign it a .shp file or to simply give it a name and let the compiler figure it out. Neither have worked. My understanding is that when the intersect is complete, the result set is saved to a file and I am defining what to call it so that I can use it later. Is that correct? Since you are outputting to a geodatabase, which I am assuming is your env.workspace, you should just give it a name. Nothing else should be required. qResults = 'output_featureclass'
... View more
01-09-2013
12:09 PM
|
0
|
0
|
3170
|
|
POST
|
What is the value of your qResults variable? What version of ArcGIS are you using and service pack?
... View more
01-09-2013
10:49 AM
|
0
|
0
|
3170
|
|
POST
|
You need a closing bracket and the last comma. arcpy.SelectLayerByAttribute_management("Culvert_subset", "SUBSET_SELECTION", '''"STD_CND" in ('poor', 'Very Poor', '')''')
... View more
01-09-2013
10:42 AM
|
0
|
0
|
1364
|
|
POST
|
Post your exact code you executed and the error you received. Are you trying to do with through a script tool, python window, stand alone script?
... View more
01-09-2013
09:29 AM
|
0
|
0
|
1364
|
|
POST
|
This is not a valid query. '"STD_CND" = poor' or '"STD_CND = Very Poor' or '"STD_CND" = ""' I'm not sure of your data schema but something like this might work. '''"STD_CND" in ('poor', 'Very poor', '')'''
... View more
01-09-2013
08:50 AM
|
0
|
0
|
1364
|
|
POST
|
Which line are you having a problem with? Looking at your email else statement you have nothing assigned to your HOST variable so it won't work.
... View more
01-09-2013
07:20 AM
|
0
|
0
|
2913
|
|
POST
|
Oh yes you need to have your whereclause after your typeField parameter assignment.
... View more
01-08-2013
12:46 PM
|
0
|
0
|
2788
|
|
POST
|
This line looks like the problem, just delete it. path is workspace Also you can accomplish what you want to do with one tool, Select. Something like this. # extract features by attrtibute
# import system modules
import arcpy
# get user supplied path, layers and fields
path = arcpy.GetParameterAsText(0)
arcpy.env.workspace = path
# riverLayer is Rio_Panuco_Lyr Feature Layer
inputLayer = arcpy.GetParameterAsText(1)
# confluence is river type 'link' and is a string
confluence = arcpy.GetParameterAsText(2)
whereClause = "{0} = '{1}'".format(arcpy.AddFieldDelimiters(inputLayer, typeField), confluence)
# typeField is fieldname 'type' and is SQL expression
typeField = arcpy.GetParameterAsText(3)
# set output location
outputLayer = arcpy.GetParameterAsText(4)
# error trapping measures
try:
arcpy.Select_analysis(inputLayer, outputLayer, whereClause)
except:
print arcpy.GetMessages()
... View more
01-08-2013
10:35 AM
|
0
|
0
|
2788
|
|
POST
|
What error are you getting? Why are you using a cursor? Here is a better example of string substitution creating a query string. whereClause = "{0} = '{1}'".format(arcpy.AddFieldDelimiters(inputLayer, typeField), confluence)
... View more
01-08-2013
07:28 AM
|
0
|
0
|
2788
|
|
POST
|
You need to include the path to your sde connection file.
... View more
01-08-2013
05:01 AM
|
0
|
0
|
2226
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 05-17-2011 10:36 AM | |
| 1 | 08-16-2012 10:48 AM | |
| 1 | 10-31-2012 08:39 AM | |
| 1 | 07-16-2012 01:52 PM | |
| 1 | 03-15-2012 10:57 AM |
| Online Status |
Offline
|
| Date Last Visited |
08-22-2024
11:12 PM
|