POST
|
Well, that ist exactly what I am doing. I'm not using a codeblock. I think my post was missunderstanding. I am just typing 2 into the field, like you are suggesting and then the error occurs. And with every other expression also.
... View more
08-20-2012
10:54 PM
|
0
|
0
|
402
|
POST
|
I now worked some hours on the problem. The Problem are Features (like Feature 52) with ". It seams as CalculateField uses " as string delimiter. It now it workes with those features, if I first substitute all " with ' (using find & replace in ArcMap). Is there a posibility to deal with the " using a script? The script now causes errors at features with an line break within the textfield. Any ideas how to deal with them in the script? The new Error: Runtime error <class 'arcgisscripting.ExecuteError'>:
ERROR 000539: Error running expression: "servitude de 'passage à pied' non aménagé sur parcelle 4259
servitude de 'passage à pied' non aménagé"
<type 'exceptions.SyntaxError'>: EOL while scanning string literal (<string>, line 1)
Failed to execute (CalculateField).
... View more
08-03-2012
04:50 AM
|
0
|
0
|
540
|
POST
|
I tried Field = [another_Field] as well as Field = 2 In both cases and with different Feature Classes the same Error ocurred. I don't think it's about the expression.
... View more
08-03-2012
04:10 AM
|
0
|
0
|
402
|
POST
|
Hi If I try to use the Field Calculator in ArcMap, I get ERROR 732 Dataset does not exist or is not supported. How can this be, as the Dataset and its Attribute Table are both well displayed in ArcMap?
... View more
08-03-2012
02:01 AM
|
0
|
5
|
673
|
POST
|
Thanks for your input, Kat. Unfortunately it still does not work. My script does fine with test data consisting of short strings without special caracters. Your reworked script is not working because of the missing '!' for the field name. If i add the '!', it works with my test data but not with the one i want to work with. Same error.
#Copy the information from the original field to the new one:
arcpy.CalculateField_management(Tab, provField, !Bemerkungen!, 'PYTHON') I tried it in ArcMap with FieldCalculator. This gives me a new Error. (With test or real data) 000732: Dataset does not exist or is not supported Witch is quite strange, as I am able to add the data to ArcMap and start the Field Calculator. Someone else with an Idea?
... View more
08-02-2012
10:57 PM
|
0
|
0
|
540
|
POST
|
Hi, I'm trying to copy all information from one string field to a new one in the same feature class. I am using this code:
#Feature class:
Tab = r'\\Tako\gis\03_basisdaten\pronatura\ch\gisdata\pronatura_1.gdb\Schutzgebiete\parz_pn'
#Field:
orgField = "Bemerkungen"
#Length of Field:
Length = 1000
#Adding the new Field:
provField = orgField + "_prov"
AddField_management(Tab,provField,"TEXT", "", "", Length)
#Copy the information from the original field to the new one:
Expression = 'str(!%s!)' %(orgField)
CalculateField_management(Tab, provField, Expression, 'PYTHON') The tool stops at feature 52 of 2500 and gives this Error: Runtime error <class 'arcgisscripting.ExecuteError'>: ERROR 000539: Error running expression: str("1x jährlich im Herbst zu mühen. Er verwendet Flurname "Hiwes", vormals Parz. 200310 ") <type 'exceptions.SyntaxError'>: invalid syntax (<string>, line 1) Failed to execute (CalculateField). I assume there is some problem with the " in the string to copy. How can I tell Python to treat the string as one and ignore all special characters?
... View more
07-31-2012
05:08 AM
|
0
|
4
|
1883
|
POST
|
So, it's not possible? I am actually not interested in building expressions but in defining a "default field" for labeling and identifying a particular feature class independent on the mxd. Further help will be highly appreciated, Matt (ArcGIS 10, SP1, ArcInfo)
... View more
07-14-2011
07:18 AM
|
0
|
0
|
335
|
POST
|
Hi Sean I hoped there might be a way that does without a pre-existing feature. It's pity, but thanks anyway. Matt
... View more
07-04-2011
02:56 AM
|
0
|
0
|
631
|
POST
|
Thank you Sean I am sorry for not making myself quite clear. J.M. and me are not interested in drawing simple rectangles but polygons with one side having a parallel side on its opposite. In my example, I aim to digitize rivers that curve and meander. Their width should remain constant along the riverpath. One could digitize the centre line as a polyline and then buffer this line to get a polygon. However, I wonder whether there is a more straight-forward method (i.e. to directly construct a curved polygon with a constant width). By the way, I am using ArcGIS 10, SP1. Further help will be higly appreciated. Kind regards, Matt
... View more
07-01-2011
01:13 AM
|
0
|
0
|
631
|
POST
|
I re-post a problem from 2006. Please see below. Has there anybody find a way? Thanks for your reply! Matthias ----------------------- Re: Creating polygons with parallel sides on the fly? Author J.M. Date Jul 03, 2006 I am trying to digitize a series of georeferenced tif's depicting steam tunnels into a polygon feature class. Ultimately I would like the polygons to be of a uniform thickness and for the two sides of the tunnel to be exact copies of each other. I am looking for a way to do that without having to create lines, and then perform some geoprocessing on those lines to create a polygon from them. I would like to be able to simply draw one series of segments that makes up one side of the tunnel, and then trace that side with some specified offset to complete the polygon. Any thoughts? Thanks!
... View more
06-30-2011
04:07 AM
|
0
|
5
|
4028
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|