POST
|
I have a python script that updates an xy layer event in a mxd updating point locations. It also updates labels for this new xy layer event. It then exports the mxd to pdf. I have noticed that only my labels that are integers within a text field are shown in the .pdf. I am using the labelClasses property of the layer and setting the expression equal to "<FNT name = 'Arial' size = '12'><BOL> & [LABEL] & </BOL</FNT>" showLabels = True showClassLabels = True where [LABEL] is a valid field name and only displays if the field "LABEL" contains an integer which is a string value of an integer. The field "LABEL" is a text field. If I pause my script and look at the mxd, before exporting to .pdf all labels show up properly. Only after I export to .pdf do the string labels not show up in the .pdf. I am not able to post the script sorry. "1", "1234" work fine "foo", "1,234" do not display in my pdf. Any ideas on what could be wrong?
... View more
01-09-2013
04:34 AM
|
0
|
0
|
645
|
POST
|
Is it possible to use ReviewerConsole.exe on just selected features? My /pd: is a sde connection file. I see there is a /type: option with Attribute, Spatial, Reviewer. I'm not sure if I want to use this though, because I don't want to use a product library. Are there any examples with /type:. I can't find any. Is there another way? I have also tried to select the features I want to run against from my sde connection file. Thanks Ryan
... View more
08-07-2012
12:14 PM
|
0
|
1
|
2403
|
POST
|
What I don't understand is that converting !Shape.Length@METERS! works for polylines, but !Shape.Area@SQUAREMETERS! for polygons does not do any conversion.
... View more
07-08-2011
12:09 PM
|
0
|
0
|
1020
|
POST
|
i tried reprojecting in the cursor, but got the same results.
... View more
07-08-2011
12:06 PM
|
0
|
0
|
1020
|
POST
|
so the field I'm trying to calculate is populated with the same as the Shape_AREA field. Shape_AREA = 0.000651 my_calculated_field = 0.000651 What_i_want = 6974972.61
... View more
07-08-2011
11:52 AM
|
0
|
0
|
1020
|
POST
|
don't be sorry, no I'm not calculating the area of a line, I did find something though. It was returning '0' because I was only trying to keep 2 decimal places. I am getting values, but they do not seem to be in meters squared. When you tried it in 10 was the output of the calculation correct? this is part of the actual code my_fields = {'Polyline':{'LEN': '!SHAPE.LENGTH@METERS!'}, 'Polygon' : {'ARA': '!SHAPE.AREA@SQUAREMETERS!'}} gp.CalculateField_management(fc , field.name, '"%.2f" % float('+ self.my_fields[desc.ShapeType][field.name]+ ')', "PYTHON_9.3")
... View more
07-08-2011
11:46 AM
|
0
|
0
|
1020
|
POST
|
Could anyone tell me why calculating the shape.length@METERS works for me, but calculating shape.area@SQUAREMETERS does not. Area always returns '0'. I'm using 9.3, and the feature classes are in WGS 84. Here are 2 examples: ~Length gp.CalculateField_management(fc , field.name, '!SHAPE.LENGTH@METERS!', "PYTHON_9.3" ~Area gp.CalculateField_management(fc , field.name, '!SHAPE.AREA@SQUAREMETERS!', "PYTHON_9.3"
... View more
07-08-2011
07:37 AM
|
0
|
6
|
2989
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|