|
POST
|
I'm confused. How does my example not work? You simply substitute var for whatever variable holds your field value.
... View more
01-24-2013
05:41 AM
|
0
|
0
|
1428
|
|
POST
|
Something like this.
var = 'HITCH ENTERPRISES, INC. WARRANTY DEED BOOK 552, PAGE 532 (NW/4) (NE/4) (SE/4) OUT OF SECTION 29 TOWNSHIP 1N RANGE 16E TEXAS COUNTY, OKLAHOMA'
keepVar = var.split('OUT')[0]
... View more
01-24-2013
05:19 AM
|
0
|
0
|
1428
|
|
POST
|
There is probably something else in your code you haven't posted that is the problem. What exactly is the issue you were getting when it ran with no errors? Is it just you have to turn the labels on manually or something else?
... View more
01-23-2013
10:51 AM
|
0
|
0
|
2501
|
|
POST
|
Thanks for the input mzcoyle, but this didn't fix the problem. No labels are showing. Are you on SP1? This method works fine for me. Edit: Oh your issue may be you are referencing the layer file not the layer object in the mxd. I believe the variable you want to reference is updateLayer2 not layer2.
... View more
01-23-2013
09:27 AM
|
0
|
0
|
2501
|
|
POST
|
This is your problem here. You have a layer with no features in it because of your query. Remove the query. arcpy.MakeFeatureLayer_management(fc,lyr,sql % '')
... View more
01-23-2013
05:03 AM
|
0
|
0
|
1296
|
|
POST
|
Hello? Can ANYONE speak to this? Do you have a response to any of my suggestions above? If your issue is serious and affecting productivity I'd recommend contacting Esri support.
... View more
01-23-2013
04:56 AM
|
0
|
0
|
11637
|
|
POST
|
Thanks, but my question was really about how to specify the table join. ive tried putting the tables in the input parameter, but it doesnt make sense anyway as you need to tell arcpy how they are related. ive also tried to put sql in the expression parameter but i dont think i got it right. ideally id be able to find an example of where this is already done. Thanks anyway. I would make a table view of the fields you want joined for each table then use add join for each of them, allowing you to specify an inner join. You can then copy out the table view with the joins to a permanent table. This should restrict the output to only the fields specified for each table.
... View more
01-22-2013
05:38 AM
|
0
|
0
|
2051
|
|
POST
|
I guess the help may not have been updated for 10.1. Spatial references can be set using a spatial reference object. You can see this thread for details on a work around. http://forums.arcgis.com/threads/64242-Path-to-.prj-files-in-ArcGIS-v10.1 You can also try creating it without a spatial reference for troubleshooting.
... View more
01-21-2013
01:24 PM
|
0
|
0
|
3925
|
|
POST
|
You need to set up a workspace to execute this outside ArcMap. The help has an example you can walk through to get an understanding of the MakeXYEventLayer tool. All the field mapping at the end of your fc2fc look unnecessary as well.
... View more
01-21-2013
12:22 PM
|
0
|
0
|
3925
|
|
POST
|
It's a direct export from the model built. That's probably one of your problems. I'd first clean up your code so it is legible. I also don't see any reference to the path from your error C:\Spatial.mdb\WELLS.
... View more
01-21-2013
11:50 AM
|
0
|
0
|
3925
|
|
POST
|
Posting the code that prompted the crash would be helpful.
... View more
01-21-2013
11:21 AM
|
0
|
0
|
3925
|
|
POST
|
Using the describe function will be something like this.
# describe the feature layer to access the the selected set
desc = arcpy.Describe(layer)
# FIDSet will contain the selected features
selectedFids = desc.FIDSet
# If there are selectedFids (a selection set), write them to a new feature
# class in the current workspace.
if len(selectedFids) > 0:
do something
Please let me know how you want to invert it now. Thanks You'll have to create a layer object to reference the definitionQuery parameter if you haven't already. Then something like this.
oidField = desc.OIDFieldName
queryList = selectedFids.replace(';', ',')
oidDelim = arcpy.AddFieldDelimiters(layer, oidField)
layerObject.definitionQuery = '{0} in ({1})'.format(oidDelim, queryList)
arcpy.RefreshActiveView()
... View more
01-21-2013
06:13 AM
|
0
|
0
|
2226
|
|
POST
|
I was looking for a solution internal to ArcGIS. Maybe I'm wrong but the link you posted utilized ResEdit and that won't work for my needs. The only solution internal to ArcGIS is in 10.1 as Jennifer described. To change this value in 10.0 requires a registry edit.
... View more
01-17-2013
12:08 PM
|
0
|
0
|
3702
|
|
POST
|
You want this env.workspace = "in_memory" Where is your source data located? If they are stored on a network it may account for slower than expected times. ~2 minutes for your operations really isn't that slow though.
... View more
01-17-2013
07:31 AM
|
0
|
0
|
3787
|
|
POST
|
I would scatter some time print outs to see where the slow down(s) are occurring. import time
t0 = time.clock()
# some tool/code block
arcpy.AddMessage("Elapsed time: {0} seconds".format(int(time.clock() - t0))) The refresh active view can take a while depending on the complexity of your map document as well.
... View more
01-17-2013
05:35 AM
|
0
|
0
|
3787
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 05-17-2011 10:36 AM | |
| 1 | 08-16-2012 10:48 AM | |
| 1 | 10-31-2012 08:39 AM | |
| 1 | 07-16-2012 01:52 PM | |
| 1 | 03-15-2012 10:57 AM |
| Online Status |
Offline
|
| Date Last Visited |
08-22-2024
11:12 PM
|