|
POST
|
You could probably use an Update Cursor within the onEnter function so you could enter some information into the box, then hit enter. The cursor should respect the selection.
... View more
03-14-2013
10:37 AM
|
0
|
0
|
716
|
|
POST
|
Have you ran this in ArcMap instead of Eclipse and the Python Shell? Also, are you at 10.1?
... View more
03-13-2013
10:25 AM
|
0
|
0
|
1572
|
|
POST
|
Babak- Did you try it with a fc instead of shp? It seems to work just the same for me. Did you make sure to have a selection on the layer? The FIDSet will return a semicolon-delimited string of selected feature IDs. Luke
... View more
03-13-2013
09:01 AM
|
0
|
0
|
3714
|
|
POST
|
"Otherwise, an easy thing to do to see if it is working is to just watch your workspace in Windows Explorer and see if you see either a shared or exclusive lock file is being applied. They should be pretty easy to spot and will show up as a data type of LOCK." Would this method of spotting lock files only apply to shapefile, personal and file geodatabases? Would you need to worry about locks from arcpy.da if you are working with an SDE geodatabase that is built to accomodate multiple users? It will work well for shapefile and file gdb. Personal geodatabases are a bit different, as locks occur at the geodatabase level. However, you can see the locks on the entire mdb. I only tested the "with" bug on a file gdb, but I imagine the input data type shouldn't make a difference. I would say regardless of what database you are going through and regardless of what technology you are using to do a cursor (i.e. whether through arcpy or not), you should always remove the locks to take them out of memory.
... View more
03-12-2013
04:44 PM
|
0
|
0
|
2166
|
|
POST
|
If you are at 10.1, you can just test to see if a value is Null by checking to see if it equals None. This is highlighted in KB 40913. You should be able to do something like: def dateDiff(date):
from datetime import datetime
if date is None:
pass
else:
return int((datetime.now( ) - datetime.strptime(date,"%m/%d/%Y")).days/365.2425)
... View more
03-12-2013
02:57 PM
|
0
|
0
|
1125
|
|
POST
|
Yeah, I just entered it last week, so it usually takes a few days.
... View more
03-12-2013
08:43 AM
|
0
|
0
|
2166
|
|
POST
|
The second statement should release the locks automatically, but there appears to be a bug with this- NIM089529: The data access arcpy cursors do not release locks when using with statement. Otherwise, an easy thing to do to see if it is working is to just watch your workspace in Windows Explorer and see if you see either a shared or exclusive lock file is being applied. They should be pretty easy to spot and will show up as a data type of LOCK.
... View more
03-12-2013
08:22 AM
|
0
|
0
|
2163
|
|
POST
|
Do you have Advanced for Desktop (I know you said standard for Server)? The Feature to Polygon requires an Advanced license.
... View more
03-12-2013
08:06 AM
|
0
|
0
|
789
|
|
POST
|
I put in a usability bug because it seems that a feature dataset is a workspace (and you can set it in the GP Environments and through arcpy.env.workspace). Here is the number- NIM089681: Cannot set workspace to a feature dataset when workspace is a model parameter
... View more
03-11-2013
04:44 PM
|
0
|
0
|
1685
|
|
POST
|
Scott, you might try posting in the ArcPad thread and you'll probably get a quicker answer. -Luke
... View more
03-11-2013
01:50 PM
|
0
|
0
|
402
|
|
POST
|
What coordinate system is defined for your shapefile? If you could, you can upload a subset of your data and give me an example of what your workflow is and I can take a look for you.
... View more
03-11-2013
09:43 AM
|
0
|
0
|
634
|
|
POST
|
This is possible through using Python Add-ins. You could use a combo box to list all of your clients and have another combo box that lists possible years, depending on the value selected in the first combo box.
... View more
03-11-2013
09:33 AM
|
0
|
0
|
716
|
|
POST
|
Maybe you should try, expression = !field! + ", " + str(parameter) I agree. James, what is the data type of your field? If you set parameter = 4, that is making it an integer. To make that a string you would need to say parameter = "4". Because you cannot concatenate strings with integers, you will need to make sure the two match. If field is a string, set parameter = "4". If the field is an integer, you will want to set parameter = 4. Otherwise, you can cast it to string or int in the expression by saying int(parameter) or str(parameter), just as suggested above.
... View more
03-11-2013
08:51 AM
|
0
|
0
|
703
|
|
POST
|
Do you have a date/time field? You will want to first make an event layer, then export that to feature class. Then, if you have your time field, you could use the time slider to show the data at whatever interval you want.
... View more
03-11-2013
08:42 AM
|
0
|
0
|
483
|
|
POST
|
Annotation feature classes can be described, but it is that default subclass that is messing you up. I would try something like this instead: for lyr in arcpy.mapping.ListLayers(mxd):
if lyr.isFeatureLayer:
x = arcpy.Describe(lyr) It talks about this in the third paragraph under the Discussion section in the Layer (arcpy.mapping) help page.
... View more
03-08-2013
09:54 AM
|
1
|
0
|
644
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 11-24-2025 10:45 AM | |
| 1 | 07-30-2025 08:26 AM | |
| 1 | 05-15-2025 07:35 AM | |
| 2 | 11-26-2024 01:27 PM | |
| 1 | 06-26-2015 10:19 AM |
| Online Status |
Offline
|
| Date Last Visited |
Tuesday
|