|
POST
|
Doh, Mathew beat me, but this also works. exp = 'str(!AccDate!) + " " + str(!AccTime!)'
... View more
05-03-2012
02:05 PM
|
0
|
0
|
986
|
|
POST
|
You can access any attribute in your index layer (ie. pits) using the dynamic text: <dyn type="page" property="thefieldname"/>. So, in your case, it would be: <dyn type="page" property="Shape_area"/> From the help (waaaaay down, in a tip): With the dyn type="page" you can create dynamic text with any attribute field of the Data Driven Pages index layer. For example, if you have an attribute on the index layer named POPULATION, you can create a dynamic text tag using this field, <dyn type="page" property="POPULATION"/> to dynamically display the POPULATION values for each page in the layout. edit: I see now that you want hectares. You'll have to calculate a new field in your index layer for that.
... View more
05-03-2012
11:17 AM
|
0
|
0
|
1134
|
|
POST
|
I think you just need quotes: exp = "str(!Segment_Code!).zfill(6)"
arcpy.CalculateField_management(outCrash, exp, "PYTHON")
... View more
05-02-2012
01:20 PM
|
0
|
0
|
3701
|
|
POST
|
Calculator Expression: str(!Segment_Code!).zfill(6)
... View more
05-02-2012
12:34 PM
|
0
|
0
|
3701
|
|
POST
|
Have you looked into the Watershed tool? You'll need the DEM to create your flow direction surface, but I don't know of any other way to generate upstream polygons.
... View more
05-01-2012
09:12 AM
|
0
|
0
|
686
|
|
POST
|
Sorry to say it, but I'd guess the parameters are not valid (either "input" or "output"), but you'd have to post the code for anyone to figure it out.
... View more
04-30-2012
01:51 PM
|
0
|
0
|
2774
|
|
POST
|
Untested, but I think it should work. You'll have to change your workspace environment to point at the individual feature class, also. ...continue indentation from previous part of script...
fccl = arcpy.ListFeatureClasses("*", "All")
for featureclass in fccl:
rows = arcpy.SearchCursor(featureclass)
for row in rows:
drillhole = row.Label
... View more
04-30-2012
09:58 AM
|
0
|
0
|
1815
|
|
POST
|
Ah, yeah. I'm not sure what it's trying to accomplish with "fname_calc = [str(fname)]". What I am sure about is this: the script produced by exporting from ModelBuilder is a lie.
... View more
04-30-2012
09:41 AM
|
0
|
0
|
1773
|
|
POST
|
ArcMap doesn't like spaces in the field names. While you're removing those, make sure there are no extra spaces at the beginning or end of your field names. It doesn't look there are any, but for future reference ArcMap also doesn't like funny characters in your field names (for example, '#'). Also, there is no such thing as latitude -97.039914.
... View more
04-30-2012
08:58 AM
|
0
|
0
|
5883
|
|
POST
|
You need to wrap field names in !'s when they are used in the field calculator expression. arcpy.CalculateField_management(eco_pa, "OCCUR", "!" + fname_calc + "!", "PYTHON")
Tip: make your calculation in the ArcMap field calculator and look at the results to see the proper syntax.
... View more
04-30-2012
08:44 AM
|
0
|
0
|
1773
|
|
POST
|
In Python: - List feature classes - Loop through each feature class in the list - Add a field - Calculate the field
... View more
04-27-2012
01:03 PM
|
0
|
0
|
1125
|
|
POST
|
It'll depend on how complicated the join is. Mine finished in about 5 seconds, but I was only joining about 10 features to another 10.
... View more
04-25-2012
02:35 PM
|
0
|
0
|
1548
|
|
POST
|
Try replacing the back slashes in the path to forward slashes. edit: I just tried it and it works. second edit: after seeing Phil's post below, I should note that I didn't use the fieldlist parameter in my test - you should use his advice.
... View more
04-25-2012
01:50 PM
|
0
|
0
|
1548
|
|
POST
|
Just FYI, you can calculate the x-centroid using the "PYTHON" parser (v9.2) in the Calculate Field tool (expression stolen from this help page😞 float(!SHAPE.CENTROID!.split()[0])
... View more
04-25-2012
12:19 PM
|
0
|
0
|
1108
|
|
POST
|
1.) Convert polygon to line (Feature to Line - requires ArcInfo) 2.) Append or Merge together 3.) Convert back to polygon (Feature to Polygon - requires ArcInfo) ...probably other ways, too.
... View more
04-24-2012
01:53 PM
|
0
|
0
|
1864
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 08-30-2013 02:22 PM | |
| 1 | 04-12-2011 11:19 AM | |
| 1 | 09-17-2021 09:43 AM | |
| 1 | 04-04-2012 12:05 PM | |
| 2 | 07-16-2020 11:31 AM |
| Online Status |
Offline
|
| Date Last Visited |
07-15-2023
12:11 AM
|