POST
|
Hi @ShaunWalbridge , I appreciate your suggestions. They did confirm my suspicions that the dev toolbox was referencing the prod files. Based on that information, I figured out that the prod toolbox was listed as a favorite to load to all new projects. I typically drag my dev folder into Pro each time for testing. It seems that Pro prefers the file names and paths of the favorite production toolbox. I have since removed it from my favorites, and so far the dev toolbox is referencing the correct files. I created a support ticket earlier today and will be following up with this information. Thank you for your help.
... View more
01-06-2023
01:04 PM
|
0
|
0
|
1200
|
POST
|
Hi @ShaunWalbridge, I've found the problem here, but I'm at a loss as to how to fix it. I may have to create a Tech Support ticket because I would describe it as a bug. Summary: I have two, separate Python toolboxes with similar file paths and file names on my PC. One is a development toolbox while the other is for staging/production. When I load/run the dev PYT, it is referencing the files (.py, .pagx, .lyrx, etc.) in the prod PYT's folder. This behavior is rather inconsistent. I'm not sure if it's a Python issue or something wrong with ArcGIS Pro folder connection configuration or I'm totally doing something wrong. Sometimes after a restart, the problem goes away but not always. The folder structures are something like this: dev_folder - DevPythonToolbox.pyt - subfolder -- __init__.py -- module.py -- other supporting files prod_folder - ProdPythonToolbox.pyt - subfolder -- __init__.py -- module.py -- other supporting files The relevant code is like this: # Top of DevPythonToolbox.pyt
import arcpy
from subfolder import module
from importlib import reload # for dev only
reload(module) # for dev only
...
class Tool(object):
def __init__(self):
...
def execute(self, parameters, messages):
"""The source code of the tool."""
from subfolder import module # for dev only
from importlib import reload # for dev only
reload(module) # for dev only
if __name__ == "__main__":
module.main(parameters)
return Is there a place where these file paths are cached or indexed? I have already tried deleting Local Caches and Index folders in C:\Users\user\AppData\Local\ESRI. Thanks, Ryan
... View more
01-06-2023
07:09 AM
|
0
|
2
|
1239
|
POST
|
Hi @SilasMathes , No, after some exploring I found the .aptx less than ideal for our purposes. It's been long enough that I don't remember the exact issues now. We ended up using a Python toolbox (.pyt) with supporting files (.py, .pagx, SDE connections, .lyrx, etc.) contained in a directory in the same folder as the .pyt. It generally works well, but development hasn't been without it's headaches.
... View more
12-21-2022
06:23 AM
|
1
|
0
|
731
|
POST
|
Hi @Shaun-Walbridge, It's been a while since I posted this, but this is still an ongoing problem. I also delete my .pyc files but that doesn't seem to help. I'm updating scripts and layouts, but the tool wants to hold onto old versions of the scripts. My first clue it's using an old version of the script is an arcpy.AddMessage right at the beginning that includes the last update date of the tool. But, it will bring in versions of layouts and maps that don't include my latest updates. I'm now on Pro 2.9.4 since posting this. I'm also using git if that could have anything to do with it. Thanks, Ryan
... View more
10-25-2022
07:18 AM
|
0
|
1
|
1306
|
POST
|
@RichardHowe, if I follow you correctly I'm doing this in a Python toolbox. My parameter type is multivalue GPString, and I apply a ValueList type filter. I then have a parameter.filter.list of strings for the user to choose from.
... View more
06-10-2022
12:43 PM
|
0
|
1
|
629
|
POST
|
Hi - Can someone tell me how to delete the geoprocessing cache? I'm developing a Python toolbox that has supporting .py files. For whatever reason, Pro holds onto old versions of the supporting .py files. Using importlib reload and closing/re-opening Pro does not help. In the past I've deleted my entire C:\Users\userID\AppData\Local\ESRI folder to solve the problem, but that's overkill because it deletes a bunch of personal settings I would prefer to keep. This has been a problem in multiple versions of Pro, but I'm currently using 2.9.2 FWIW. Thanks, Ryan
... View more
06-10-2022
12:31 PM
|
0
|
6
|
1445
|
POST
|
Hi - We just discovered that there's a setting to overwrite the item description when publishing a StoryMap. It appears that this checkbox is enabled by default. Unfortunately, it's set up in the Story settings and nowhere near the publish button. We require our users to provide some fairly detailed supporting information in the description before we will publish, but only now discovered this setting. So now we have to go back and edit those items again. It would make more sense to (1) have this checkbox under the publishing dropdown and/or (2) to not have it enabled by default. Thanks, Ryan
... View more
05-11-2022
12:12 PM
|
0
|
4
|
565
|
POST
|
Thanks for the reply @NathanEnge . I just tested this out, and it looks like if I want to persist the query layer I have to export it to the SQL Server database. That saves it as a new table not as a view so we're still looking at redundant data. We generally prefer views so we don't have to repeat geometry over and over. I suppose it's a "view" that can be saved with my .aprx, but as far as I can tell it's not saved anywhere else.
... View more
10-06-2021
07:49 AM
|
0
|
1
|
2526
|
POST
|
Thank you for the reply @Borch. I think your answer is mostly correct, but we clearly can publish SQL Server views as feature services because we have routinely done so for years. Regardless, I think the documentation you quote explains what Esri really means is that they don't support editable feature services.
... View more
09-23-2021
09:24 AM
|
0
|
1
|
2596
|
POST
|
Hello, According to this page, "[v]iews are not supported in ArcGIS Server feature services". Can anyone shed light on what exactly this means? We use SQL Server views all the time for feature services and have done so for many years. Does this lack of support simply mean we can't create tech support tickets, or does it mean that it's a really poor practice? If using views, are we limited in capabilities in maps and apps? Thanks, Ryan
... View more
09-21-2021
09:11 AM
|
0
|
6
|
2667
|
POST
|
I'll add that I've noticed the consolidation and packaging tools tend to convert f-strings to .format and then assign them to g_ESRI_variables. No idea why. Generally speaking, I have little problem with f-strings but every so often Pro [2.6] returns an error. Sometimes it's solved by simply closing the program and re-opening. It seems really inconsistent.
... View more
08-19-2021
06:22 AM
|
0
|
2
|
1619
|
POST
|
This is an old thread, but it led me to believe this wasn't possible for a long time. After looking over documentation, I was able to use arcpy to set the spatial reference on the map object. Something like this works for me: mapx.spatialReference = arcpy.SpatialReference(prjFile) where mapx is a map object. Hope that helps someone.
... View more
05-19-2021
12:47 PM
|
5
|
1
|
925
|
IDEA
|
This idea is sorely needed and should be voted up higher. If I rebuild registered tables or views outside of ArcGIS, the metadata contained inside the SDE tables is no longer accurate and those objects might not even be usable inside of ArcGIS. Basically, I have to be entirely sure that my object is in its final production state before registering. It's hard for me to fathom that I have to delete the object from within ArcGIS to remove all of the references first. It doesn't seem like it should be huge lift to have a tool that removes all of the references in the SDE tables.
... View more
05-06-2021
01:08 PM
|
0
|
0
|
800
|
POST
|
Update: Talked the problem over with some Esri folks. As a result I am going to explore the use of geoprocessing packages (.gpkx) rather than project templates (.aptx). I will come back to this post to update.
... View more
05-04-2021
05:43 PM
|
2
|
0
|
1228
|
Title | Kudos | Posted |
---|---|---|
1 | 12-21-2022 06:23 AM | |
5 | 05-19-2021 12:47 PM | |
2 | 05-04-2021 05:43 PM | |
1 | 08-18-2017 01:31 PM | |
1 | 09-25-2020 12:16 PM |
Online Status |
Offline
|
Date Last Visited |
Tuesday
|