|
POST
|
You can reference the data via a cursor through the dataset path itself, not even sure if it works on a layer. Also save the layer after the join then use that path in the cursor. for fields input into the cursor you can pass in a list of field names as strings: cursor_fields = ["Field1", "Field2", "Field3"] with arcpy.da.cursor(path, cursor_fields) as cursor... throw some print statements into the variables you're creating in the cursor, my guess is your final path is ending up a bit funky after concatenation, i'd use os.path.join instead.
... View more
06-04-2020
09:20 AM
|
1
|
0
|
870
|
|
POST
|
I'm not entirely sure of what's going on, why the dictionary comprehension in the first cursor? Also I don't see the need for the SQL filter (where clause), can you not evaluate it for each row - if ID=x... row .append Also think you can instantiate the cursor once, i.e. put it above for mast in mast_value: then call max_cursor.reset()
... View more
06-02-2020
09:35 AM
|
0
|
0
|
2185
|
|
POST
|
I t's very hard to follow your code in that format. can you populate a list in mylist = [] for row1 in mast_cursor: print('ID ' + str(mast) + u': max altitude ' + str(max(mast_cursor))) mylist.append…..
... View more
06-02-2020
07:37 AM
|
0
|
0
|
2185
|
|
POST
|
actually length = "LENGTH! etc. so can just be if length: instead of if 'length' in locals(): same for the rest.
... View more
05-31-2020
02:32 AM
|
0
|
0
|
2838
|
|
POST
|
I think I've done it ok in python, I'm sure there's a better way though. I'm not sure how the locals() will go in arcade as not very familiar with the syntax, is it just 'var' infront of every variable? length = 2.5
diameter = 1
#material =" WOOD"
slope = 25
if 'length' in locals():
length = str(length) + " ft. "
else:
length = ""
if 'diameter' in locals():
diameter = str(diameter) + "-inch"
else:
diameter = ""
if not 'material' in locals():
material = ""
if 'slope' in locals():
slope = " @" + str(slope) + "%"
else:
slope = ""
return (length + diameter + material + slope)
... View more
05-31-2020
02:27 AM
|
0
|
1
|
2838
|
|
POST
|
Why was the mxd still trying to connect to an old database? I currently don't have access to the Oracle DB, but have produced a short script for some colleagues to run (who have access to the DB) and see how long arcpy.mapping.ListLayers takes for each layer in an mxd. I guess I'm wondering if ListLayers is any kind of benchmark for how long an mxd takes to open, aside from all the other factors such as toolbars, extensions, folder connections etc. It would also be great to understand what goes on under the hood when an mxd is spooling up. Thanks for your experience Michael.
... View more
05-30-2020
03:05 AM
|
0
|
0
|
1287
|
|
POST
|
Thanks for the reply Michael, Completely right, I'm testing against connections I currently don't have access to, so have asked others who do so to run a short script to assess this. Would a connection issue keep stalling the mxd opening as it tries and retries to access the DB?
... View more
05-29-2020
06:53 AM
|
0
|
2
|
1287
|
|
POST
|
Hello all, I'm trying to analyse the root cause of some MXD opening time issues, 10.3 - 10.6. MXDs are lagging at about circa 10 mins for some. I think I've narrowed this down to Oracle SDE connections but it's not entirely my wheelhouse. 1. Any advice on Oracle sde connections being laggy? 2. any script snippets or tools to analyse mxd performance and opening times? ( i'm aware of mxd doctor etc and general normal.mxt resets...) 3. finally I've been trying to see if instantiating a arcpy.mapping.mapdocument and then timing listLayers for the mxd is equivalent or indicative of mxd opening times, and it seems to be a good metric. Any experience of this? Much obliged
... View more
05-28-2020
03:48 PM
|
0
|
4
|
1348
|
|
POST
|
I would keep a field as text and classify it according to Unique Values, figure out how you want to size the other field and then create a new field with the appropriate numbers to size from. Eggs | Chicken | 1 Eggs | Ostrich | 5 Eggs | Duck | 2 Beans | Beanstalk | 2 Beans | Giant Beanstalk | 10 To symbolise by these follow the workflow described here: https://community.esri.com/thread/252997-how-to-symbolize-by-type-and-size-in-pro
... View more
05-27-2020
11:41 PM
|
0
|
1
|
8050
|
|
POST
|
Start editing your road feature, select all of the features with a lasso or via the attribute table, go to the editing toolbar, on the 'editor' dropdown click 'merge'. Save, Stop editing. next pass both features into Feature To Polygon—Data Management toolbox | Documentation to create the split features. Be very aware of how this will work if a line is not covered by a polygon (see the 3rd example drawing in the tool help).
... View more
05-26-2020
11:04 PM
|
0
|
0
|
12901
|
|
POST
|
This is pretty shoddy code i'm sure, but it should do the job. whack this into the pre-logic script box (python) pn = 0 rank = 1 def func(parcel_number): global pn global rank if pn == 0: pn = parcel_number result = 1 elif parcel_number == pn: rank += 1 result = rank else: pn = parcel_number rank = 1 result = 1 return result then pass in: func(!Parcel_number!) or whatever you parcel field is, this of course depends upon your fields being sorted, if not you will probably be best with an update cursor.
... View more
05-26-2020
01:30 PM
|
0
|
1
|
7256
|
|
POST
|
Oh I had fun with this one... My best guess is that the huge number of 0 join_count values in the dataset basically overmatches the small number of other join_counts, maybe a skip factor or something like that is hidden in there. Definitely something for esri to look into. If you get rid of the 0 values either via deletion (select by attribute where "Join_Count" = 0 or with a definition query "Join_Count" <> 0, then overlay that layer on top it should work as expected.
... View more
05-25-2020
01:05 PM
|
2
|
0
|
3648
|
|
POST
|
not geocoded though, can you copy paste the lat longs from agol?
... View more
05-25-2020
11:24 AM
|
0
|
0
|
1423
|
|
POST
|
u go to the cog at the bottom left of your post, go to 'edit' then an attachment option should appear at the bottom.
... View more
05-25-2020
10:06 AM
|
1
|
2
|
1423
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 06-13-2025 01:08 PM | |
| 1 | 09-25-2025 03:19 PM | |
| 1 | 09-24-2025 02:35 PM | |
| 1 | 09-17-2025 02:42 PM | |
| 1 | 09-10-2025 02:35 PM |
| Online Status |
Offline
|
| Date Last Visited |
2 weeks ago
|