POST
|
It looks like you were actually not assigning any values to myval. You had the double equals sign which is used to test equality not assign values. Try your code like this: expression = "getKat(!KATEGORIE!)"
codeblock = """def getKat(KATEGORIE):
if KATEGORIE == "0":
myval = "Autobahn"
elif KATEGORIE == "1":
myval = "Bundesstrasse"
else:
myval = "3"
return myval"""
print "myval", myval
arcpy.CalculateField_management(ERG, "RULE", expression, "PYTHON", codeblock)
... View more
10-11-2013
04:14 AM
|
0
|
0
|
333
|
IDEA
|
It would be nice to have a way to either rotate the photo before or after adding it to a feature in ArcGIS Online or the ArcGIS Online App. This way you can insure that the photograph is oriented the right way for viewing. Sometimes the way you hold a phone, you could end up with a photo upside down or horizontal instead of vertical. Having this extra feature would make the images more meaningful when clicking on the attachments. The viewer would not have to try to change their orientation to see the image correctly. This would be especially useful when doing a presentation where you could not reorient the screen. This functionality could be a small button on the attachment's webpage to rotate the image or the ability to preview and change the orientation before officially attaching it to the feature.
... View more
07-16-2013
10:35 AM
|
55
|
3
|
1663
|
POST
|
I was able to reproduce this as well. I didn't see anything logged in our system for this issue so I have submitted the following bug: [NIM092338 When using arcpy.MultipleRingBuffer_analysis with the dissolve parameter set to "None", it will fail with error ERROR 000466: \Temp\scratch.gdb\buffer0 does not match the schema of target. Failed to execute (Append).] Thank you for reporting this issue!
... View more
06-11-2013
12:48 PM
|
0
|
0
|
402
|
POST
|
Are you running this from a stand alone script run from PythonWin, or some other kind of IDE? Or do you run your script from the Python Window within ArcMap? We did have a bug for issues with exporting to PDF when running it in the Python Window: NIM084019 Clicking the interface while running arcpy.mapping.ExportToPDF from the Python window causes an interruption in the export process, resulting in an incomplete pdf. If you clicked in the interface there was a chance that the interaction could interupt the process. It was reproducible at version 10 as well as 10.1. You may want to try from a stand alone script instead. If you do run from a stand alone script, you can try adding a pause in between the refresh and the export to see if that helps. Try adding this: import arcpy, time
df = arcpy.mapping.ListDataFrames(mxd)[0]
df.extent = extent
arcpy.RefreshActiveView()
time.sleep(30)
arcpy.mapping.ExportToPDF(mxd,os.path.join(Report_Path,str(oid).upper()))
This will pause the code for 30 seconds. You can read more on the time module on this link: http://docs.python.org/2/library/time.html
... View more
06-11-2013
12:26 PM
|
0
|
0
|
584
|
POST
|
Usually the 000819 error means that ArcGIS is not recognizing the tool due to something like a name change or a path it can't find or even a environment where the tool does not exist. There are a couple things you will want to check for this. 1. Make sure some of the tools in your nested models don't use 10.1 only tools. 2. Check to make sure the paths to all the tools you used are in the same location. It's possible that script tools or models that you saved in the 10.1 toolbox are in a different spot. You may want to consider saving with relative paths instead, and its good to check the models for this if you were using it anyway. 3. Did you save your toolbox back to a 10.0 toolbox before opening it there? If not, go through this help document: http://resources.arcgis.com/en/help/main/10.1/#/Saving_toolboxes_to_earlier_versions/003q00000007000000/ These are good starting places for looking for errors. You might also want to try moving it to another 10.1 machine to see if it does the same thing. I hope this helps!
... View more
04-18-2013
03:53 AM
|
0
|
0
|
357
|