POST
|
Maybe creating a try that catches the specific AttributeError and informs the user? It really isn't checking for DDP enabled, but will provide the same end result.
... View more
04-04-2011
06:43 AM
|
0
|
0
|
31
|
POST
|
layer.definitionQuery =[FLR] = '02' layer.definitionQuery='[FLR]="02"' Your query isn't held together with outer quotes. Don't know how layer.definitionQuery reacts to ambiguous assignments, but it may be set to "" and would explain returning all records. *beat to the punch*
... View more
03-31-2011
05:50 AM
|
0
|
0
|
6
|
POST
|
import arcpy arcpy.env.workspace=r"I:\GIS\Test.mdb" EL1=raw_input('Enter name of elementary school') outFeatureClass='I:\GIS\Output.mdb\school_'+EL1 whereString='[NAME]="'+EL1+'"' arcpy.Select_analysis('SchoolDistrictsElementary',outFeatureClass,whereString) In your original code, the variable EL1 was read as a string instead of it's value in your WHERE clause. I haven't ran the code, but this should work. Hope this helps. edited due to misreading OP
... View more
03-30-2011
10:21 AM
|
0
|
0
|
2
|
POST
|
Hello everyone, This is my first post on this forum, so I thought I would include a simple script as an offering. It essentially recreates ArcInfo's Envelope to Polygon tool for lower versions. It features multi-input for features to envelope, providing a quick clip polygon for a group of features, and also includes a buffer field to extend the envelope around the set. I am sure this has already been done, but I am fairly new to python and wanted to give it a go. I run ArcView 10, so I don't know how it will fair on earlier versions. If you have any problems, let me know so I can correct them. Thanks for your attention and hopefully it is of some use. Tool input parameters are: feature layer, multi, required workspace, single, required string, single, required linear unit, single, optional
... View more
03-30-2011
08:50 AM
|
0
|
0
|
414
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|