|
POST
|
If you switch from model builder to python scripting, there is a module called 'logger' which will allow you to capture and write data to a file.
import logging
logging.basicConfig(level=logging.DEBUG,
format='%(asctime)s %(levelname)s %(message)s',
filename='/tmp/myapp.log',
filemode='w')
logging.debug('A debug message')
logging.info('Some information')
logging.warning('A shot across the bows')
See http://docs.python.org/release/2.6.4/library/logging.html for further details. Another good resource to look at is: http://blog.doughellmann.com/2007/05/pymotw-logging.html
... View more
01-27-2012
01:36 AM
|
0
|
0
|
2526
|
|
POST
|
Hey Tommy, In your example of Hour < 6 and you want the next value, would you say your have unique values, or do you want a list of unique values, then create ranges off of that list? If that is the case, try using the Fequency tool set and set the field to the Hour field or whatever field you want the unique list of values to. You can then use a search cursor on that table to get a complete list of values and easily select the next lowest value by sorting your list.
... View more
01-25-2012
07:57 AM
|
0
|
0
|
809
|
|
POST
|
You can also try this:
import os
print os.environ.get( "USERNAME" )
... View more
01-25-2012
06:52 AM
|
0
|
0
|
3524
|
|
POST
|
Check your field values to ensure that there are no ascii values, you can use the encode() method to remove values that will cause your script to fail. Example:
value = sRow.getValue(field.name).encode('ascii','ignore')
All ascii values will be ignored. You can also replace the values. See http://docs.python.org/library/stdtypes.html for more information.
... View more
01-12-2012
06:39 AM
|
0
|
0
|
559
|
|
POST
|
You might be able to use the bincount() function on numpy to do what you are looking for: http://docs.scipy.org/doc/numpy/reference/generated/numpy.bincount.html the values have to be non-negative though.
... View more
01-12-2012
01:53 AM
|
0
|
0
|
2278
|
|
POST
|
Could there be an unsupported or null character in the field: str(AKT_FM.Nummer)?
... View more
01-12-2012
01:37 AM
|
0
|
0
|
1293
|
|
POST
|
Tom, You cannot change that property via python in ArcGIS 10. The best thing to do is set the 'Fixed Scale' option to 'Automatic' manually.
... View more
01-11-2012
07:02 AM
|
0
|
1
|
1334
|
|
POST
|
If you are running this script outside of an ArcMap session, it will fail due to the fact that "CURRENT" only works when inside arcmap. Try changing the following: mxd = arcpy.mapping.MapDocument("CURRENT") #set mxd to current map to the path of the arcmap document: mxd = arcpy.mapping.MapDocument(r"c:\temp\mymapdoc.mxd") #set mxd to current map Hope this helps.
... View more
01-04-2012
07:39 AM
|
0
|
0
|
1187
|
|
POST
|
It's not a quirk, the function returns a list object. In order to access the underlying data inside the list, you need to tell the object what information you need by letting the list know I want some piece of information in position X. To be even more general, functions return a specific data type. Hope this helps.
... View more
12-02-2011
02:11 AM
|
0
|
0
|
971
|
|
IDEA
|
-->
Using arcpy.mapping, you can add layers for feature classes very easily. With the growing popularity of server and arcgis.com, there is a greater desire for clients to want to add additional information to map templates such as base service and thematic map service data based on one's needs. The arcpy.mapping module should support the creation, editing and adding of map service layers from arcgis.com, ArcGIS Server, and WMS services.
... View more
11-29-2011
05:05 AM
|
11
|
4
|
2522
|