|
POST
|
This is a fantastic idea unless you read the entire first sentence in the OP, then it's useless for this case.
... View more
04-17-2025
12:23 PM
|
0
|
0
|
1165
|
|
POST
|
If you can't filter up front, filter out back. Here's a sample that will remove all non-PDF/JPEG attachments from the folder you downloaded them to: import os
out_dir = r"C:\path\to\folder\with\attachments"
extensions = [".pdf", ".jpeg", ".jpg"]
for root, _, files in os.walk(out_dir):
for f in files:
if not any(f.lower().endswith(e) for e in extensions):
os.remove(os.path.join(root, f)) Feel free to tweak that third line to match your desired results.
... View more
04-17-2025
11:57 AM
|
0
|
0
|
1189
|
|
POST
|
A Feature Class can only take feature classes via a path, but gives you guaranteed access to the data definition (fields, indices, attribute rules etc.). A Feature Layer can take a feature class by path or a layer from the current map. You can't always edit the structure of your data but you can edit its features, and the user can pass in a subset of the full data. A Feature Set can take all of the above plus arbitrary feature data from any source. But it's even less likely that you can modify the data's structure. In short: as you go from FC to FL to FS it becomes harder for the user to specify what exact data is edited but the script has an easier time modifying the data. I usually go with Feature Layers if I don't have a specific use case but it's up to you. (Note that Table, Table View and Record Set are the non-spatial types of their respective parameters. This doesn't stop you from passing in spatial data but you lose the guarantee that you can work with the data's coordinate system, geometry data etc.).
... View more
04-16-2025
03:15 PM
|
5
|
0
|
636
|
|
POST
|
You can try checking if the original value is different from the current value first: if ($originalfeature.pole_depth == $feature.pole_depth) {
return $feature.pole_height * 0.1 + 3
} If you edited the field directly then the original value will be different from the current value and you don't return a new value, if you edited another field then the value should stay the same and then you can recalculate it. That said, adjusting the height will probably re-run the rule again. Other solutions include running the rule on insert only, or adding a "is_calculated" field that is set when the rule is run, then checked to ensure it isn't run again.
... View more
04-16-2025
02:22 PM
|
0
|
0
|
357
|
|
POST
|
Services that use registered EGDB data cache the domain info from the geodatabase and don't actively update that cache. You can force a service to grab the updated domain definition by restarting it from the server manager. I have no idea why your support rep said to build an entirely new map, that's an unacceptable workflow for any org that has more than a few projects to manage.
... View more
04-16-2025
08:35 AM
|
3
|
0
|
924
|
|
POST
|
The REST API can work with both AGOL and Enterprise services, or you can use the JavaScript SDK if you want a more fleshed-out library.
... View more
04-15-2025
03:03 PM
|
1
|
0
|
400
|
|
POST
|
There's no parameter in your screenshot, just the headers of the empty table. You can make any variable a parameter by right-clicking on it and ticking the option. They'll have a "P" next to their symbol if they're a parameter
... View more
04-14-2025
01:31 PM
|
1
|
0
|
482
|
|
POST
|
Alright, after swapping bits in and out of toolboxes, I managed to get something that looks virtually identical to your code working (attached). I can't even see what significant changes were made using a file diff tool, I have to assume there's some invalid whitespace characters in your source that I Ship of Theseus'd out of there. Let me know if this still gives you trouble.
... View more
04-11-2025
09:39 AM
|
0
|
3
|
1308
|
|
POST
|
A Github repo is great, please post it when you can.
... View more
04-11-2025
08:29 AM
|
0
|
5
|
1326
|
|
POST
|
Are you able to cut one of these toolboxes down to a minimum reproduction of the error and then post it here?
... View more
04-10-2025
04:30 PM
|
0
|
7
|
1359
|
|
POST
|
This stores the code in one field and the description in another, which is different from having a coded-value domain on an integer field. Not strictly wrong, but not as useful as a proper field in my experience.
... View more
04-10-2025
01:17 PM
|
0
|
1
|
558
|
|
POST
|
I'm testing on Pro 3.4 and I'm not having any issues bulk selecting rasters (See screenshots). That said I don't have proper imagery on hand so maybe you're getting an error running the tool?
... View more
04-10-2025
12:43 PM
|
0
|
0
|
1190
|
|
POST
|
Second best thing to picking the folder: pop the folder open, click the first raster, scroll to the bottom, shift-click the last raster. Or click one raster then hit Ctrl+A if you're 100% sure every file in there is a raster dataset.
... View more
04-10-2025
11:17 AM
|
1
|
0
|
1227
|
|
POST
|
Looks like a decent chunk of legend properties are exposed through CIM access. Here's a quick example for setting the legend's title to 22pts: prj = arcpy.mp.ArcGISProject("CURRENT")
layout = prj.listLayouts()[0]
legend = layout.listElements('LEGEND_ELEMENT')[0]
cim = legend.getDefinition('V3')
cim.titleSymbol.symbol.height = 22
legend.setDefinition(cim) No gaurentee you can adjust every single component of the legend but it can't hurt to look.
... View more
04-10-2025
11:07 AM
|
0
|
0
|
556
|
|
POST
|
If you make good use of the script tool parameter types this can be an efficient script tool. I've attached a tool with no code to execute but the parameters and validation already done, this illustrates how you can quickly gather a bunch of code ranges and their associated descriptions, for both new and existing domains.
... View more
04-10-2025
10:38 AM
|
0
|
0
|
589
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 4 hours ago | |
| 1 | 4 hours ago | |
| 1 | yesterday | |
| 1 | a week ago | |
| 1 | a week ago |
| Online Status |
Online
|
| Date Last Visited |
6 hours ago
|