|
POST
|
So this is something new to me that is manifesting itself in Pro and that is Setting script tool parameters—Geoprocessing and Python | ArcGIS Desktop. In particular, "The tool modifies the schema of the input, ", which, an ESRI employee told me derives from "Your script tools need to use derived outputs to indicate to the multithreaded geoprocessing framework that something was updated within your script code". Since this stuff works in Arc, but I'm seeing the issue in Pro, I'm guessing that's where multithreaded comes into play. So here's the problem. With the attached toolbox, run Create Folders -> Create GDB -> Add attributes (check both boxes). What happens is, the folders get created, the GDB get's created, the extended attributes get created, the extended domains get created, but the domains created with the last tool don't appear in right-click GDB -> Domains, not do the domains get assigned to the attributes (because the tool doesn't believe they exist). Close Pro. Go to Arc Cat, the extra two domains created by the 3rd tool (and the assignment to the attributes) are there and correct. Restart Pro. There they are. I completely understand that some sort of tool parameter wizardry has to occur here for the 3rd tool to recognize the domains have been added, and let the tool know that so it can continue with the next steps which is assign the domains to the attributes. The attached toolbox was edited by the helpful ESRI person in another forum, but I'm not having that "ahhhhh that makes sense" moment when trying to extend it, or, even make it work (for some reason it worked once, but post-many-reboots, the original behavior is occurring, the domains aren't showing up (even though they're really there).
... View more
06-18-2018
11:28 AM
|
0
|
2
|
5244
|
|
POST
|
Storage is not an issue for me. I have a local 40TB SAN with a quad NIC and iSCSI. We have a policy of not storing project work on local computers. Once the work is done, it has to be moved to the SAN by the end of the day. Not sure what the difference is in the drives either, but the second costs twice as much as the first. From what little I can understand from Dell website, the SSD "Card" is significantly faster then the first choice, was wondering if any GIS'ers had experience with that particular Dell drive.
... View more
06-18-2018
09:32 AM
|
0
|
1
|
1269
|
|
POST
|
If you were limited to a Dell Precision 7920, require disk performance over capacity, require dual (but not quad) monitors, will never use Pro 3D, how would you spec it out? I'm agonizing over the difference between PCIe NVMe Class 50 Solid State Drive versus Dell Ultra-Speed Drive Duo PCIe SSD x8 Card, 1 M.2 1TB PCIe NVMe Class 50 Solid State Drive. On to CPU's, my current 6 year old workstation with it's dual Xeon E5606 2.13 GHZ blows my laptop with it's i7 out of the water in terms of Pro performance. So more cores, I assume, is better. So do I go with a single Xeon with as many cores as I can afford, or dual Xeons with "as many as I can afford" split between them? For video, I'd really like Dual NVIDIA® Quadro® P4000, 8GB, 4 DP (7X20T) but likely will only get approved for Dual Radeon™ Pro WX 5100, 8GB, 4 DP (7X20T) as it's 1/3 the cost. And is 3TB (24x128GB) 2666MHz DDR4 LRDIMM ECC too much? Not enough for Pro (Kidding!).
... View more
06-18-2018
07:57 AM
|
0
|
3
|
1492
|
|
POST
|
Randy and Dan, you were both on to something with the "list" idea, instead of looping through each domain in the GDB.....just make a list and check for membership in the list! Here's what ultimately worked: existingDomains = arcpy.da.ListDomains(gdb_name)
domain_names = [i.name for i in existingDomains]
if 'DOM_YES_NO_UNK_NPS2016' in domain_names :
print("DOM_YES_NO_UNK_NPS2016 already exists")
else:
print("creating domain")
arcpy.CreateDomain_management(gdb_name, "DOM_YES_NO_UNK_NPS2016", "Is the feature physically observable", "TEXT", "CODED")
YESNODict = {"Unknown":"Unknown", "Yes": "Yes", "No": "No"}
for code in YESNODict:
arcpy.AddCodedValueToDomain_management(gdb_name, "DOM_YES_NO_UNK_NPS2016", code, YESNODict ) which results in: == RESTART: C:\temp\Pro_Folder_Structure\EXTENDED_CORE_FIELDS_20180614_A.py ==
creating domain
>>>
== RESTART: C:\temp\Pro_Folder_Structure\EXTENDED_CORE_FIELDS_20180614_A.py ==
DOM_YES_NO_UNK_NPS2016 already exists
... View more
06-14-2018
09:27 AM
|
1
|
0
|
1227
|
|
POST
|
['DOM_REGIONCODE_NPS2016', 'DOM_PUBLICDISPLAY_NPS2016', 'DOM_DATAACCESS_NPS2016', 'DOM_XYACCURACY_NPS2016', 'DOM_YEffS_NO_UNK_NPS2016', 'DOM_YES_NO_UNK_NPS2016'] Which is the same as for domain in existingDomains: print(domain.name)
... View more
06-14-2018
09:12 AM
|
0
|
0
|
6108
|
|
POST
|
In trying to isolate what's not working, I get this far. I've not set up the loop correctly...?I just want to check if the condition exists, print "exists", else print "it doesn't exist", where the condition is being checked against a list of domains: for domain in existingDomains:
if domain.name == 'DOM_YES_NO_UNK_NPS2016':
print("DOM_YES_NO_UNK_NPS2016 already exists")
else:
print("creating domain")
creating domain
creating domain
creating domain
creating domain
creating domain
DOM_YES_NO_UNK_NPS2016 already exists
... View more
06-14-2018
08:53 AM
|
0
|
2
|
6108
|
|
POST
|
Dan not sure what you meant in above (I didn't take your Python class!), but this is what I think you meant, which, creates the domain if it doesn't exist, but if the domain exists, just runs successfully with no exit reporting domain already exists.... import os
import errno
import arcpy
#Get user input
gdb_name = arcpy.GetParameterAsText(0)
isOBSERVABLEchecked = arcpy.GetParameterAsText(1)
try:
#Create the Optional OBSERVABLE field
if str(isOBSERVABLEchecked) == 'true':
existingDomains = arcpy.da.ListDomains(gdb_name)
isthere = False
for domain in existingDomains:
if domain.name == 'DOM_YES_NO_UNK_NPS2016':
isthere = True
if isthere == False:
arcpy.CreateDomain_management(gdb_name, "DOM_YES_NO_UNK_NPS2016", "Is the feature physically observable", "TEXT", "CODED")
YESNODict = {"Unknown":"Unknown", "Yes": "Yes", "No": "No"}
for code in YESNODict:
arcpy.AddCodedValueToDomain_management(gdb_name, "DOM_YES_NO_UNK_NPS2016", code, YESNODict[code])
#arcpy.AddField_management(fc_name, "OBSERVABLE", "TEXT", "", "", 20, "OBSERVABLE", "NULLABLE", "NON_REQUIRED", "DOM_YES_NO_UNK_NPS2016")
#arcpy.AssignDefaultToField_management(fc_name, "OBSERVABLE", "Unknown")
else:
arcpy.AddMessage("DOM_YES_NO_UNK_NPS2016 already exists")
else:
arcpy.AddMessage("OBSERVABLE domain not created")
except arcpy.ExecuteError:
print(arcpy.GetMessages(2))
... View more
06-14-2018
07:05 AM
|
0
|
4
|
6108
|
|
POST
|
Dan, with something like below, I'm getting nothing.... import os
import errno
import arcpy
#Get user input
gdb_name = arcpy.GetParameterAsText(0)
isOBSERVABLEchecked = arcpy.GetParameterAsText(1)
isISEXTANTchecked = arcpy.GetParameterAsText(2)
try:
#Create the Optional OBSERVABLE field
if str(isOBSERVABLEchecked) == 'true':
existingDomains = arcpy.da.ListDomains(gdb_name)
isthere = False
for domain in existingDomains:
if domain.name == 'DOM_YES_NO_UNK_NPS2016':
isthere = True
break
if isthere == False:
arcpy.CreateDomain_management(gdb_name, "DOM_YES_NO_UNK_NPS2016", "Is the feature physically observable", "TEXT", "CODED")
YESNODict = {"Unknown":"Unknown", "Yes": "Yes", "No": "No"}
for code in YESNODict:
arcpy.AddCodedValueToDomain_management(gdb_name, "DOM_YES_NO_UNK_NPS2016", code, YESNODict[code])
#arcpy.AddField_management(fc_name, "OBSERVABLE", "TEXT", "", "", 20, "OBSERVABLE", "NULLABLE", "NON_REQUIRED", "DOM_YES_NO_UNK_NPS2016")
#arcpy.AssignDefaultToField_management(fc_name, "OBSERVABLE", "Unknown")
else:
arcpy.AddMessage("DOM_YES_NO_UNK_NPS2016 already exists")
else:
arcpy.AddMessage("OBSERVABLE field not created")
#Create the Optional ISEXTANT field
if str(isISEXTANTchecked) == 'true':
existingDomains = arcpy.da.ListDomains(gdb_name)
isthere = False
for domain in existingDomains:
if domain.name == 'DOM_YES_NO_UNK_NPS2016':
isthere = True
break
if isthere == False:
arcpy.CreateDomain_management(gdb_name, "DOM_ISEXTANT_NPS2016", "Indicates feature or features that are no longer in existence or partially in existence. If data represents features that are no longer in existence or only partially in existence following damage, disaster or some other change to its statusthen the value will be false or partial (Cultural Resources, 2014).", "TEXT", "CODED")
ISEXTANTDict = {"Unknown":"Unknown", "True": "True", "False": "False", "Partial": "Partial", "Other": "Other"}
for code in ISEXTANTDict:
arcpy.AddCodedValueToDomain_management(gdb_name, "DOM_ISEXTANT_NPS2016", code, ISEXTANTDict[code])
#arcpy.AddField_management(fc_name, "ISEXTANT", "TEXT", "", "", 20, "ISEXTANT", "NULLABLE", "NON_REQUIRED", "DOM_ISEXTANT_NPS2016")
#arcpy.AssignDefaultToField_management(fc_name, "ISEXTANT", "Unknown")
else:
arcpy.AddMessage("DOM_ISEXTANT_NPS2016 already exists")
else:
arcpy.AddMessage("ISEXTANT field not created")
except arcpy.ExecuteError:
print(arcpy.GetMessages(2))
... View more
06-14-2018
06:12 AM
|
0
|
6
|
6108
|
|
POST
|
So with some modification to your sample to make it work in Pro, I get the following regardless if the domain exists or not. Start Time: Thursday, June 14, 2018 8:58:08 AM Running script Test... Completed script Test... Succeeded at Thursday, June 14, 2018 8:58:08 AM (Elapsed Time: 0.13 seconds
... View more
06-14-2018
06:00 AM
|
0
|
0
|
1227
|
|
IDEA
|
" Users have a lot of “muscle memory” built around these versions, so we plan on being especially careful with changes that could disrupt their work. "....another "note" that I wish ESRI would "take".......
... View more
06-13-2018
11:36 AM
|
3
|
0
|
10544
|
|
POST
|
Yup, clip was from GP Tool in TBX. This isn't the first time this has happened......"No editable layer" in Pro....
... View more
06-13-2018
11:34 AM
|
0
|
0
|
13201
|
|
POST
|
Created a FGDB and Poly FC in Pro 2.1.3, created some poly's using clip of another feature layer. Output has 6 features, I want to merge the 6 down into 2. Select two of the features, Edit -> Modify -> Merge: The Destination layer type cannot be merged. Wut?!?! Further investigation reveals that "This feature layer is already locked by another running application" which is not true, as I just created it; it's on my local hard drive so no rogue user decided to start editing it; I only have one instance of Pro going, and one Catalog view going, and no running GP tasks. Closed Pro, finished the project in Arc, where merge from the edit toolbar worked flawlessly.
... View more
06-13-2018
09:38 AM
|
0
|
6
|
15980
|
|
POST
|
Glad to hear Arc will be around for a while. Couple of thoughts, if you will, on when and where to use Arc vs Pro. Some shops don't care, and will keep Arc until they come to work one morning and it's gone. I suspect they've never heard of Pro. Some will run both side by side for as long as they can get away with it, because they have the support resources to maintain two completely different versions of desktop GIS software. Note the underlined phrase. I'd say this is 30-40% of Esri enterprise customers. So back to my dilemma, I'm not one of those shops with unlimited support resources. The decision has been handed down from above "I don't care when you switch, but when you do, there will only be Pro". So this circles back to the issue at hand, I'd love to be in a position 18-24 months from now where Pro can meet all of our GIS needs. You can't possibly imagine how much work that involves while still maintaining a 40 hour per week production schedule. I can imagine someone saying "Well if they check the right box in Pro, there will be no GP history to delete, right?", but you and I both know that no amount of box checking is going to keep all GP history out of the SDE, especially those legacy ones that were created back in the 9.x days. My SQL solution is hokey at best, and dangerous at times. Understanding that adding new tools to Pro might not be in the cards, perhaps some SQL stored procs might be the solution?
... View more
06-11-2018
08:50 AM
|
1
|
0
|
10818
|
|
POST
|
I'm attempting to use py to check if a domain exists, if not, create it, else do nothing. After consulting How do I check if a domain already exists? , arcgis 10.0 - Using arcpy.Exists for domains? - Geographic Information Systems Stack Exchange , and esri geodatabase - Checking if domain already exists using ArcPy? - Geographic Information Systems Stack Exchange I came up with the attached code. If neither domain exists, it fails with: Start Time: Sunday, June 10, 2018 2:28:13 PM
Running script Add Extended Core Fields...
Failed script Add Extended Core Fields...
Traceback (most recent call last):
File "C:\Temp\PRO_FOLDER_STRUCTURE\EXTENDED_CORE_FIELDS.py", line 24, in <module>
arcpy.CreateDomain_management(gdb_name, "DOM_YES_NO_UNK_NPS2016", "Is the feature physically observable", "TEXT", "CODED")
File "c:\program files\arcgis\pro\Resources\arcpy\arcpy\management.py", line 1332, in CreateDomain
raise e
File "c:\program files\arcgis\pro\Resources\arcpy\arcpy\management.py", line 1329, in CreateDomain
retval = convertArcObjectToPythonObject(gp.CreateDomain_management(*gp_fixargs((in_workspace, domain_name, domain_description, field_type, domain_type, split_policy, merge_policy), True)))
File "c:\program files\arcgis\pro\Resources\arcpy\arcpy\geoprocessing\_base.py", line 496, in <lambda>
return lambda *args: val(*gp_fixargs(args, True))
arcgisscripting.ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000192: Invalid value for Domain Name
Failed to execute (CreateDomain).
Failed to execute (AddExtendedCoreFields).
Failed at Sunday, June 10, 2018 2:28:14 PM (Elapsed Time: 1.52 seconds) However it creates the domain! If I run it again knowing the domain exists, same error message. import os
import errno
import arcpy
#Get user input
gdb_name = arcpy.GetParameterAsText(0)
fc_name = arcpy.GetParameterAsText(1)
isOBSERVABLEchecked = arcpy.GetParameterAsText(2)
isISEXTANTchecked = arcpy.GetParameterAsText(3)
#Create the Optional OBSERVABLE domain
if str(isOBSERVABLEchecked) == 'true':
existingDomains = arcpy.da.ListDomains(gdb_name)
isthere = False
for domain in existingDomains:
if domain.name == 'DOM_YES_NO_UNK_NPS2016':
isthere = True
break
if isthere == False:
arcpy.CreateDomain_management(gdb_name, "DOM_YES_NO_UNK_NPS2016", "Is the feature physically observable", "TEXT", "CODED")
YESNODict = {"Unknown":"Unknown", "Yes": "Yes", "No": "No"}
for code in YESNODict:
arcpy.AddCodedValueToDomain_management(gdb_name, "DOM_YES_NO_UNK_NPS2016", code, YESNODict[code])
else:
arcpy.AddMessage("DOM_YES_NO_UNK_NPS2016 already exists")
#Create the Optional ISEXTANT domain
if str(isISEXTANTchecked) == 'true':
existingDomains = arcpy.da.ListDomains(gdb_name)
isthere = False
for domain in existingDomains:
if domain.name == 'DOM_YES_NO_UNK_NPS2016':
isthere = True
break
if isthere == False:
arcpy.CreateDomain_management(gdb_name, "DOM_ISEXTANT_NPS2016", "Indicates feature or features that are no longer in existence or partially in existence.", "TEXT", "CODED")
ISEXTANTDict = {"Unknown":"Unknown", "True": "True", "False": "False", "Partial": "Partial", "Other": "Other"}
for code in ISEXTANTDict:
arcpy.AddCodedValueToDomain_management(gdb_name, "DOM_ISEXTANT_NPS2016", code, ISEXTANTDict[code])
else:
arcpy.AddMessage("DOM_ISEXTANT_NPS2016 already exists") As best as I can tell, I have an illegal loop condition that keeps trying to create the first domain whether it exists or not, and the failure stems from the domain name already exists.
... View more
06-10-2018
11:35 AM
|
0
|
13
|
8666
|
|
POST
|
I wouldn't say "Pro is the only production environment" yet. I'm getting ready for the day, far in the future, when there is no more Arc Map, and developing plans to accomplish the same things I need to in Pro. My next "Mountain" to climb is GP History and Metadata Management in Pro. I'm also working on a SQL solution to this answer with some success, but that doesn't help my FGDB users. So, what's it going to take to get https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fsupport.esri.com%2Fen%2Ftechnical-article%2F000011751 working in Pro? There are still going to be folks that change no setting related to storing GP history despite 25 emails and laminated posters asking them to turn it off, then wonder why the GP history takes up 90% of the GDB size. In response to Dan, I need to account for a more robust environment where I have less control of how folks are provisioning and editing data in Pro. They are not going to be running any Python, trust me. Long story, but the onus is on me to keep things running smooth and not say "no", hence the quest for what I hope will be an automated solution to removing the GP history using Pro. I'm starting with Python, 'cuz I can attach it to task scheduler. Dates are not clear yet, but I'm working on my base OS images that have Pro on them now and testing them thourougly. What 2.2.1-? contains will govern if that image get rolled out this year. So the take home message is despite what is my [opinion of] Pro, I'm getting ready for it, and working out all of these problems for the day when I do call TS, and am told "We're not supporting Arc". The other message I'm hearing is there is no way to delete GP history from a GDB using Pro, which is very concerning. Sounds like another "Idea".......
... View more
06-08-2018
05:05 PM
|
0
|
2
|
10818
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 05-17-2022 12:19 PM | |
| 1 | 03-14-2019 06:24 AM | |
| 1 | 07-12-2018 09:29 AM | |
| 1 | 06-27-2019 12:08 PM | |
| 2 | 09-23-2019 11:03 AM |
| Online Status |
Offline
|
| Date Last Visited |
04-26-2026
07:12 AM
|