|
POST
|
Hello again, Robert! Thanks for helping me. Indeed, joined table attributes can't be edited from the parent, which is why I also have the table by itself in the project for editing. The field names are all compliant. The problem is simply that changes to the standalone table do not propagate to the joined table until I restart Pro. I am using an attribute from the joined non-spatial table to drive unique value symbology. The features are already visible and remain visible, but the symbology doesn't change accordingly with edits made to the non-spatial table (until I restart Pro). Here's the kicker, though: this exact scenario works in ArcMap with no manual refreshing at all!
... View more
04-14-2021
08:20 AM
|
0
|
0
|
3865
|
|
POST
|
Edits I've made to joined tables will not show up on the map (or the joined layer's attribute table) without quitting and restarting Pro. Sometimes the edits will appear if I zoom in/out, which I assume is because I've gone beyond whatever data Pro has cached, but not always. I've tried the refresh button in the lower right-hand corner, F5, and Ctrl-F5, but none work. I've also tried right-clicking on the database connection from the Contents pane, but "Refresh" is usually grayed out. Is there any other option I'm missing to force-refresh the map to show edits made to joined tables? Both the FC and joined (standalone) table in question are on SDE, if that matters. I am using Pro 2.7.3, but this has never worked in any version. Thanks!
... View more
04-14-2021
07:32 AM
|
0
|
7
|
3879
|
|
POST
|
I tried bringing my still-working model from ArcMap into Pro again. The sources were broken but that was a simple fix, and I was then able to successfully run the model in Pro. I still don't know why my model broke in Pro, but it's easier to accept this solution and move on! Thanks!
... View more
04-13-2021
02:54 PM
|
0
|
1
|
2101
|
|
POST
|
Thanks for taking a look, Robert. To be clear, the model doesn't crash/hang/etc. Pro immediately upon import, it's only if you attempt to interact with the model. Select something, delete something, etc. I have tried this on my work and home PC, same result. Also, I incidentally just had my work PC completely wiped and reinstalled from scratch. My Esri profile (sadly) was completely reset. This problem has been happening before and after this reset. But if you're not seeing it... 🤔
... View more
04-13-2021
08:09 AM
|
0
|
0
|
2121
|
|
POST
|
I've had a problem with seemingly all my models in Pro lately. This includes models in separate toolboxes, separate projects. Now when I try to validate or touch the models in any way, the model completely grays out and Pro becomes partially hung: can't save or exit the project, can't do anything further with the model until force-quitting and reopening the project. Some models I was able to fix by re-sourcing the input FCs or layers, even though the the model never indicated that the sources were broken, and the fixed sources are exactly the same as they were previously. I know models sometimes get corrupted and it's easiest/best to simply recreate them, but I'm trying to avoid that if possible! I've attached one model as an example. I can't do anything with it without it immediately freezing. Even if opened in a brand new project, it behaves the same. I originally designed it to run in ArcCatalog, independent of any existing layers, MXDs, or now Pro projects. I have run it successfully in Pro in the past. I have not included the source data, but the freezing behavior can be seen regardless. If it would help, I can provide the data as well. I am using the latest and greatest version of Pro, 2.7.2. I have an older version of this model (essentially identical, save for the requisite newer Pro toolbox file format) that still runs successfully in ArcCatalog.
... View more
04-13-2021
07:51 AM
|
0
|
6
|
2126
|
|
POST
|
Hi, Jeremy. The answer is yes and no. Insofar as getting it to label correctly, that can be accomplished (at least for my situation) with the ToUTC() Arcade date function: ToUTC($feature.Date) You might be facing any number of different issues; one of Arcade's date functions can probably do what you need. As for preventing the time shift to begin with, that's more complicated. You and I are hardly the first people to be frustrated with Arc's date-time behavior. Esri creates global solutions, which sometimes complicates what should be simple local issues (like what time it is?!). This thread provides some more insight: ArcGIS Online Time Zone - Over-ride UTC default? I hope you're able to find an acceptable solution!
... View more
05-18-2020
03:35 PM
|
2
|
3
|
6260
|
|
POST
|
I have set up a web map and app and created a feature service for parcels so that I can perform parcel queries via URL parameter. My question is whether it's necessary to use a feature service to get URL query parameters working. I'd rather not create and use feature services when map services would suffice, but is this an illogical preference? I have a queryable map image service for parcels and I set up the web map/app (hosted on AGO) to make the parcels service/layer (hosted on our Portal) searchable. I am thus able to perform searches via the app's search field. But the map service-based parcel layer does not show up in the layer list of the app's Custom URL Parameter configuration, so I can't perform parcel queries via URL parameter. If I add a feature service-based parcel layer, it does show up and I have successfully performed queries via URL parameter. I've scanned GeoNet and read a few different pages of Esri documentation about how URL parameter feature queries should work but I haven't found an explicit statement about whether it requires a feature service or if I simply haven't configured my map image service properly. Please advise. Thanks! Configure feature search—ArcGIS Online Help | Documentation Use URL parameters to modify maps—ArcGIS Online Help | Documentation Use URL parameters—Web AppBuilder for ArcGIS | Documentation Using URL Parameters In Web Apps—ArcGIS Blog
... View more
05-12-2020
02:16 PM
|
0
|
0
|
1844
|
|
IDEA
|
I'm trying to automate the set up of layouts using templates, dynamic text, etc. One problem I'm running into is that some elements aren't always the same size, which means they can start overlapping each other and have to be manually repositioned. If elements could be in a group that automatically pushes each other around to accommodate, that would be fantastic. An "intelligent group" or "flow" would be similar to a normal group except it would have settings such as: anchor point, flow direction, alignment, spacing between elements, maximum dimensions, whether elements shrink or create more columns, set order or allow rearrangement for best fit, etc. All of these settings are similar to some element types already. Since the flow is not itself a text element like a frame in InDesign, there must also be a new type of text element that allows its container to grow only in certain ways, e.g., the width is set but it can expand up or down as far as necessary. It could end up somewhat complex, but it still seems like a worthwhile idea for enhancing automated workflows, particularly map series.
... View more
05-01-2020
11:29 AM
|
4
|
0
|
671
|
|
POST
|
The answer, unfortunately, is no. You cannot unlink map visibility between map views and map frames in layouts. As noted in the map frame constraints documentation, layer properties cannot be set per view. However the map is set in one place affects how it looks in all places. What you're wanting is part of what I was asking for in this idea: https://community.esri.com/ideas/18312. The ability to set layer visibility per view is not currently under consideration by Esri. The workaround is to create a whole separate map for your inset map frame with just the base map visible.
... View more
05-01-2020
08:26 AM
|
3
|
0
|
4783
|
|
POST
|
I figured out how to combine the loops, using the map property from the MapFrame object instead of the listMaps function of the ArcGISProject object. import arcpy
proj = arcpy.mp.ArcGISProject("CURRENT")
path = proj.filePath
case = path.split("\\")[-1][:-5] # project file name is the case number
caseType = path.split("\\")[-1][0:1] # first character of case number indicates type
layouts = proj.listLayouts()
for l in layouts:
mf = l.listElements("MAPFRAME_ELEMENT","Map Frame")[0]
zhLyr = mf.map.listLayers("Zoning History")[0]
suLyr = mf.map.listLayers("Special Use Permit")[0]
if caseType == "C" or caseType == "Z":
zhLyr.definitionQuery = "CaseNumber = '" + case + "'"
zhLyr.visible = True
suLyr.visible = False
zhExt = mf.getLayerExtent(zhLyr)
mf.camera.setExtent(zhExt)
mf.camera.scale = 1500
elif caseType == "S":
suLyr.definitionQuery = "CaseNumber = '" + case + "'"
suLyr.visible = True
zhLyr.visible = False
suExt = mf.getLayerExtent(suLyr)
mf.camera.setExtent(suExt)
mf.camera.scale = 1500 Still a few details to work out, such as I don't actually want every map scale to be 1:1500. But it works!
... View more
04-22-2020
12:08 PM
|
0
|
0
|
1173
|
|
POST
|
I have a project with multiple layouts and corresponding maps (1-to-1). The maps/layouts are very similar (to get around Pro's inability to set layer visibility per view) and I want to automate setting up the common layers in each map/layout. It's two basic steps: 1) adjust the def query on one of two layer and 2) center the map frame on the queried feature. I've created a loop that successfully changes the def query on all maps: maps = proj.listMaps()
for m in maps:
zhLyr = m.listLayers("Zoning History")[0]
suLyr = m.listLayers("Special Use Permit")[0]
if caseType == "C" or caseType == "Z":
zhLyr.definitionQuery = "CaseNumber = '" + case + "'"
zhLyr.visible = True
suLyr.visible = False
elif caseType == "S":
suLyr.definitionQuery = "CaseNumber = '" + case + "'"
suLyr.visible = True
zhLyr.visible = False I conceptually know how to loop through the layouts and center them on the feature: layouts = proj.listLayouts()
for l in layouts:
mf = l.listElements("MAPFRAME_ELEMENT")
if caseType == "C" or caseType == "Z":
zhExt = mf.getLayerExtent(zhLyr)
mf.camera.setExtent(zhExt)
mf.camera.scale = 1500
elif caseType == "S":
suExt = mf.getLayerExtent(suLyr)
mf.camera.setExtent(suExt)
mf.camera.scale = 1500 The problem is the layer variable. It's defined in the first loop and I don't know if there's a way to recall it in the second loop. Maybe the loops have to be nested, but I'm having trouble figuring out how to do that properly. Thank you for any help!
... View more
04-21-2020
01:45 PM
|
0
|
1
|
1245
|
|
POST
|
Update: there's clearly something buggy with the original query on my map layers. After I manually deleted all the queries through the UI, ArcPy worked correctly when I added a new query, then changed the query to a new query, leaving no previous query as inactive. The new question is whether it's just me or if it's a bug that any layer with an existing query set through the UI has the same issue when attempting update with ArcPy. And my other question: what if I wanted to deactivate the def query with ArcPy?
... View more
04-17-2020
01:41 PM
|
2
|
0
|
8625
|
|
POST
|
I'm trying to automate clearing an existing layer definition query and setting a new one. The code I wrote does successfully set the new def query, but it deactivates the old query rather than actually deleting it. The Layer class code sample 2 shows how it presumably would be done, but it doesn't actually delete it. ArcGIS Pro - Modifying Layer Definition query via ArcPY also essentially asks the same question, but it was never fully answered. for map in aprx.listMaps():
lyr = map.listLayers("Zoning History")[0]
lyr.definitionQuery = None ## have also tried ""
lyr.definitionQuery = "CaseNumber = '" + case + "'" I've tried setting it as None and "" - both result in deactivating rather than deleting the old query. It's not a showstopper, but it's kind of weird. If I change the def query again, it will overwrite the old-new query, but the old-old query (which was not set using ArcPy, if it matters) still remains present but inactive. I started thinking about other scenarios, such as what if I wanted to deactivate rather than delete a query? I haven't found any documentation for how to do that properly (rather than unintentionally) with ArcPy.
... View more
04-17-2020
01:11 PM
|
3
|
22
|
12153
|
|
POST
|
Thank you, Dan. It looks like extracting the name from the filePath is the only (but easy) way. I was trying to use os.path.join at first, but then I realized it's unnecessary. Essentially the same as your suggestion, I created a variable for filePath with ".aprx" hacked off (without any string splitting; that would be good for isolating the name, but I want the whole string now, eliminating os.path.join). Then in exportToPDF, I called that variable and appended the string I want for the exported file. I'm using this script interactively, one project at a time. For now, at least, I have no plan to run on multiple projects at once. import arcpy
## define variables for project and layouts
aprx = arcpy.mp.ArcGISProject("CURRENT")
path = aprx.filePath[:-5]
img = aprx.listLayouts("Aerial Imagery")[0]
luz = aprx.listLayouts("Land Use & Zoning")[0]
gsm = aprx.listLayouts("Growth Strategies")[0]
sap = aprx.listLayouts("Small Area Plan")[0]
vic = aprx.listLayouts("Vicinity")[0]
## export layouts to PDF or PNG as appropriate
img.exportToPDF(path+"_img.pdf")
luz.exportToPDF(path+"_luz.pdf")
gsm.exportToPDF(path+"_gsm.pdf")
sap.exportToPDF(path+"_sap.pdf")
vic.exportToPNG(path+"_vic.png",150)
... View more
04-15-2020
01:50 PM
|
1
|
0
|
4216
|
|
POST
|
I'm trying to automate exporting multiple layouts from a project. I want all the exported files to share the same name as the project, with an appended string. The problem is I can't find a simple way to extract the project name. I know it's included in the filePath property of the ArcGISProject object, but is there an easier way than having to extract the name from the full path? I know I could use the project name from metadata, but I don't usually fill that out and I'd rather not fill it out simply for this purpose. I really just want to use the name as found in the project settings: I'm able to use that as dynamic text in the layout; would be great to find it with ArcPy, too.
... View more
04-15-2020
11:59 AM
|
0
|
2
|
4287
|
| Title | Kudos | Posted |
|---|---|---|
| 4 | 09-09-2024 12:05 PM | |
| 2 | 11-20-2019 07:41 AM | |
| 1 | 06-20-2024 07:43 AM | |
| 1 | 07-13-2022 09:50 AM | |
| 1 | 12-11-2023 06:12 AM |
| Online Status |
Offline
|
| Date Last Visited |
4 weeks ago
|