|
POST
|
You can mark the GP tool to run out-of-process in the script tool configuration dialog (uncheck run in process) and the focus contention issue should go away. And I believe PyQT behaves pretty well when run in process, but I have not done extensive testing.
... View more
06-09-2011
09:16 AM
|
0
|
0
|
1728
|
|
POST
|
There should be a narrow gray bar directly to the right of the Python window's scroll bar* that will turn the mouse cursor into a set of left/right arrows when you move the mouse over it. Just click and drag to make it bigger. * It may be along the bottom
... View more
06-08-2011
11:07 AM
|
0
|
0
|
269
|
|
POST
|
This is due to the nature of the build of the ArcGIS desktop applications. It establishes its own process-level settings in Windows for various binary runtime settings, which in turn causes a failure in any compiled module which has an embedded manifest within it. The binary Python modules (.pyd) include such a manifest, and as noted on the Python.org web site's issue tracker, the issue was not fixed for Python 2.6/2.7 and may likely not be fixed in future versions as well. One possible workaround is to use the Microsoft utility editbin to strip the manifest from the .pyd files of interest using the /ALLOWISOLATION:NO option.
... View more
06-07-2011
04:41 PM
|
0
|
0
|
2870
|
|
POST
|
Not in 10.0. The MapDocument class has a relativePaths attribute, but it is read-only.
... View more
06-07-2011
11:38 AM
|
0
|
0
|
827
|
|
POST
|
Any model with an iterator will not correctly export to a script.
... View more
05-24-2011
10:04 AM
|
0
|
0
|
951
|
|
POST
|
You can use glob. import arcpy
import glob
import os
directory = r"c:\tiffs\"
for tif in glob.glob(os.path.join("*.tif")):
arcpy.ImportMetadata_conversion("example.xml", tif)
... View more
05-23-2011
08:44 AM
|
0
|
0
|
1319
|
|
POST
|
Unfortunately, the solution for this was implemented just recently for 10.1 with ValueTable inputs for script tools. You will need to have two multivalue parameters with some custom validation to make this work for 9.3.1.
... View more
05-20-2011
02:15 PM
|
0
|
0
|
873
|
|
POST
|
Missing indentation in your function block's return statements: "def myfunction(fld1,fld2):\n if (fld1=='0'or fld1=='00'or fld1<'00000000000'):\n return ''\n else:\n return fld2"
... View more
05-10-2011
01:16 PM
|
0
|
0
|
654
|
|
POST
|
Try this: gp.CalculateField_management(fc + "\\Parcels.shp", "SIT_FULL_S", "myfunction(!SIT_HSE_NU!,\"\"!SIT_FULL_S!\"\")", "PYTHON", "def myfunction(fld1,fld2):\n if (fld1=='0'or fld1=='00'or fld1<'00000000000'):\n return ''\n else:\n return fld2")
... View more
05-10-2011
08:41 AM
|
0
|
0
|
654
|
|
POST
|
Unfortunately due to implementation details, Python doesn't see the ArcMap locale, meaning you essentially have to double-set it, once in ArcGIS and then once again in your Python script.
... View more
04-26-2011
01:36 PM
|
0
|
0
|
1232
|
|
POST
|
Do this: mxd = arcpy.mapping.MapDocument("C:/Rafiq_GIS/PYTHONTESTING/2011/2011_CountyComm/Projects/Orange/ORA_ComDist_01.mxd")
arcpy.mapping.ExportToJPEG(mxd, "C:/Rafiq_GIS/PYTHONTESTING/2011/2011_CountyComm/Maps/Orange/JPEG/ORA_ComDist_01.jpg")
... View more
04-25-2011
11:18 AM
|
0
|
0
|
655
|
|
POST
|
gp.calculatefield(fn,'area','locale.atof("!shape.area!")','PYTHON')
... View more
04-23-2011
09:38 PM
|
0
|
0
|
1232
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 09-26-2012 02:46 AM | |
| 2 | 01-06-2011 08:22 AM | |
| 1 | 03-25-2014 12:18 PM | |
| 1 | 08-12-2014 09:36 AM | |
| 1 | 03-31-2010 08:56 AM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:22 AM
|