|
POST
|
Based on your code and the exception I don't think there is a coding error that is causing this problem. My recommendation would be to try to isolate the MXD and the layer that this exception is being raised for and try to simplify the code to just run once on that MXD and layer. If you can reproduce the error, look into the layer and see if there is anything that might cause your code to fail. For example does the brknItem.datasetName exist in the new workspace you are trying to update the dataset to or is the dataset type appropriate for the layer you are trying to update.
... View more
12-13-2011
08:43 AM
|
0
|
0
|
1385
|
|
POST
|
What is the exact text in the exception that is raised?
... View more
12-12-2011
02:05 PM
|
0
|
0
|
1385
|
|
POST
|
Try this:
param1 = arcpy.getParameterAsText(0)
lyrList = param1.split(';')
The multivalue paramater will return you the values seperated by semi-colon if you use the split method on a string it will return you a list of items delimited by the character you pass into the method.
... View more
12-02-2011
01:36 PM
|
0
|
0
|
702
|
|
POST
|
Hi Andrew, There is actually another bug related to ICommandItem.Caption property not behaving as expected, NIM072205. This bug is fixed at 10.1 and will be fixed in Service Pack 4 for ArcGIS 10 as well. So at this time there is no workaround for 10, however when Service Pack 4 is released early next year you should be able to use ICommandItem.Caption.
... View more
11-22-2011
07:47 AM
|
0
|
0
|
149
|
|
POST
|
Hi Andrew, Unfortunately this is a known-limit at 10.0 with the new command bars. At 10.1 you will be able to use CommandItem.Caption to accomplish this workflow.
... View more
11-21-2011
07:43 AM
|
0
|
0
|
1127
|
|
POST
|
Hi Xing, Would you be able to upload a map package to reproduce the issue?
... View more
11-16-2011
02:06 PM
|
0
|
0
|
1278
|
|
POST
|
Yes, please do send the data if you are able. Chris, if you are still there, I will try to send you the polygon file later today (it's on another machine) to see whether you can reproduce the issue.
... View more
10-31-2011
08:53 AM
|
0
|
0
|
2332
|
|
POST
|
I think Dan's original answer still applies here even though you are using Double fields to perform this calculation it is still possible that the 2 values you are dividing are both integers. Try this calculation instead: float(!field1!)/!field2! This will ensure that you are always using float values in your calculation.
... View more
10-24-2011
04:31 PM
|
0
|
0
|
1089
|
|
POST
|
Hi Frank, Is the schema of the output shapefiles similar each time? If so it seems like you could author the layer files for the shapefiles once and in the script update the datasource of the layer through code and add it to the map document.
... View more
10-24-2011
04:11 PM
|
0
|
0
|
909
|
|
POST
|
Hi Kathrin, Thank you for pointing out this issue. I logged a bug for math.pi and math.e constants being listed as functions in the field calculator, NIM074191.
... View more
10-18-2011
10:27 AM
|
0
|
0
|
1303
|
|
POST
|
Is the machine that has ArcGIS 10 64 bit? If so check out the following KB article: VBScript and JScript geoprocessing scripts do not run on a 64-bit Windows OS
... View more
10-18-2011
09:52 AM
|
0
|
0
|
843
|
|
POST
|
Hi Graeme, You need to edit the source code for IDLE to accomplish this. Go to your idelib folder for the install of IDLE and edit the EditorWindow.py file (you may want to make a copy just in case there is a problem). Go to the following code:
def ispythonsource(self, filename):
if not filename or os.path.isdir(filename):
return True
base, ext = os.path.splitext(os.path.basename(filename))
if os.path.normcase(ext) in (".py", ".pyw")
return True
Add ".pyt" to the list of extension to check and save the changes. This should now highlight the syntax when you open it in IDLE.
... View more
10-13-2011
01:06 PM
|
0
|
0
|
648
|
|
POST
|
Hi Morag, What you have described below is definetly supported and acutally makes a lot of sense for your workflow. The other cool thing is in your script tool you could code in the validation code to pull values from the xml so that the users inputs persists between sessions allowing them to just change one value at a time if they wish. Nice post.
... View more
10-13-2011
10:35 AM
|
0
|
0
|
835
|
|
POST
|
Yes, I would definetly encourage you to post this on the ideas site once the 10.1 resource centers are opened up to everyone.
... View more
10-06-2011
03:54 PM
|
0
|
0
|
290
|
|
POST
|
Are there plans for this before final release? Even 'simple' dialogs like an add-in option pane will be needed for many use cases, and will keep a lot of people staying with deploying toolboxes with parameters instead. Filling an addin toolbar with loads of buttons, menus and combos just to allow a user to specify even just half a dozen parameters will not look great. Great first step though, good to see python addins Right now what we have in terms of simple dialogs are available with the pythonaddins module. With this module you have the ability to open a dialog which the user can browse to select one or more datasets and return the path of the users selection to the tool. The same can be done so the user can save the path of a new dataset. You can also create a message with optional buttons such as Yes/No, OK/Cancel to get the users input.
... View more
10-05-2011
04:06 PM
|
0
|
0
|
1060
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 06-02-2011 03:59 PM | |
| 1 | 06-10-2011 08:37 AM | |
| 1 | 06-08-2011 04:27 PM | |
| 1 | 06-07-2011 03:11 PM | |
| 1 | 01-31-2013 02:36 PM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:22 AM
|