IDEA
|
I wonder if this behavior is because in Pro you don't have to formally open an edit session, you can just click and start editing in the table? so it's like always in edit mode? not sure. Anyway, yes, it would be helpful if it didn't have a lock when you're viewing the table.
... View more
12-14-2023
10:36 AM
|
0
|
0
|
546
|
IDEA
|
Hmm, it's hard to think of one word that clearly communicates the meaning, so I can see why Esri does not already have a better word here. I think "select" would be good, because "select" says that you're picking the highlighted rows and they'll be blue (rather than yellow) because we know that selected rows are blue. "Reselect" - with the "re" prefix - implies to me that I would be returning to some previous state (instead of going to a new state where the currently selected (blue) rows become unselected), like where the highlighted rows are returning to be a part of the original larger selection, which we know is not what the button means. Here are my favorite word choices: Select Refine Limit Only Maybe also "cull," but that might sound weird because it's usually used in scenarios like, "We need to cull the herd of cattle and kill some of them," which sounds violent or sad!
... View more
12-12-2023
10:58 AM
|
0
|
0
|
190
|
IDEA
|
I agree. Whenever I see "reselect," I envision returning the highlighted features back to "regular/plain" selection, while also keeping the other regularly-selected features selected. In other words, keeping all current selections, but make the yellow features blue. Since that's not what the button does, I do find it confusing and I have to read the button description every time.
... View more
12-12-2023
08:29 AM
|
0
|
0
|
200
|
POST
|
Hi there, I went through a really long saga trying to troubleshoot a script that worked with Pro but not with ArcGIS Server Python. I went through a service ticket with Esri and it took a lot of back and forth. After much work, we finally determined that my script didn't work when run with the Server python because it was not connected to the license manager. Arcpy geoprocessing tools have to be connected to the license manager in order to run, even though you can run basic Python (other than geoprocessing) (I REALLY wish Esri made this fact more evident!! It took untold hours and weeks for us to learn this fact). In my case, I was trying to run it on a server in our public DMZ, and our license manager is on a server in our internal network, and those cannot connect in the desired way, so it was impossible for the public DMZ server's python to be licensed. We came up with a workaround to run the script in the internal network and it would copy files to the DMZ server rather than directly working on those files from the DMZ. Sounds like in your case, you are logging into a portal rather than using a license manager? I'm not familiar with the intricacies of that. But I wonder if it could be a similar situation, where somehow ArcGIS Server python has limitations when it comes to certain kinds of connections?? I dunno. Sorry I don't have an answer. But I thought I'd share all this in case it happened to be of any use to you or someone else looking at this post. Good luck!!!
... View more
12-11-2023
10:00 AM
|
0
|
0
|
350
|
IDEA
|
@AlyciaRajendran_esri , Thank you for the info! 🙂 That's interesting to know it's a bug. Thanks!
... View more
12-06-2023
08:57 AM
|
0
|
0
|
252
|
IDEA
|
This is an ArcGIS Pro (3.0) behavior that is very annoying: when viewing an attribute table in Pro, I often double-click on a field name to sort on that field. Usually the first way it sorts is the opposite of what I want (e.g. oldest date on top, when I want the newest date on top), so I double-click again to reverse the sort. Pro does reverse the sort order, but it automatically scrolls the table all the way to the bottom. This drives me crazy. Not only do I not want to be at the end of the table, once I am at the end of it, I am still looking at the same record I was in the first sort, which was in the opposite order of what I wanted, so it achieves nothing. So I have to scroll up to the top of the table myself. I would love it if the second sort did not scroll me to the bottom of the table!! Just sort, don't move my position in the table. I have to deal with this usually multiple times a day. Thanks for reading!
... View more
12-05-2023
04:43 PM
|
8
|
2
|
753
|
POST
|
* Edit: I like BlakeTerhune's reply! That's better than my idea. * That's great that you're trying out cursors! When you say "each row in a field," by "row" do you mean feature/record, and by "field" do you mean an actual field/attribute? I ask because usually with cursors, the word "row" can be a variable that might refer to attributes of one feature/record, in certain forms of syntax. Just wanting to make sure I understand what you're getting at. Say you are wanting to assign those values in your list to three separate features/records in your table. One way to achieve what you mentioned is to use a counter. There might be a better way to do it; I'm experienced but not an expert. Just keep in mind that the first item in your list is index number 0, of course. Also keep in mind that which value gets applied to which record in your table depends on how the table is sorted when you run your code. It does not necessarily run in order of ObjectID's. I'm not sure what the scenario could be where you are doing what you're describing - maybe it would help if you explain that. Here's an example of using a counter: import arcpy
arcpy.env.workspace = r"path\to\geodatabase"
fc = "fc_name"
field = "fieldname"
valuelist = ["a", "b", "e", "z"] # Values to be inserted
with arcpy.da.UpdateCursor(fc, field) as cursor:
count = 0 # Starts at zero because list index starts with zero
for row in cursor: # For each record in the table:
# This is supposed to prevent the following line from erroring
# out if count exceeds the length of the list
while count < len(valuelist):
# Assign value from the valuelist to the record in the table
row = valuelist[count]
# Increment count to select next valuelist item next time
count += 1
cursor.updateRow(row)
... View more
11-01-2023
11:39 AM
|
0
|
0
|
292
|
IDEA
|
Create a way to change a feature's color to another color from the selected color palette / color scheme when using Unique Values symbology. I am working with a polygon feature class and using Unique Values to make each polygon visually distinct, like on classic political maps where each country is a different color. I'm using the "pastel" color scheme. But in some cases, there are so many polygons adjacent to each other (very odd sizes and shapes) that some adjacent polygons are just about the same color. I have to go through and manually change the color of some polygons to make the colors more distinct. It is frustrating that I can only pick colors from the standard ArcGIS color picker, or else create custom colors via RGB, HSV, etc., and I cannot pick from the "pastel" color scheme I selected for the layer's symbology. This is making the layer's symbology look pretty random and unprofessional. It would be a giant help to be able to change a feature's color to another color from the color palette I chose for the layer.
... View more
10-25-2023
11:34 AM
|
12
|
2
|
542
|
POST
|
I came up with a workaround. Instead of using a "where clause," I just added an "if" statement later in the script to exclude records that would have been excluded by the "where clause." Basically, within a Search Cursor, I put lines to this effect: with arcpy.da.SearchCursor(fc, fields) as cursor:
for row in cursor:
# Only include records where APN exists:
if row[0]: # row[0] is the APN
# then do stuff This works, but it would be less clunky to just be able to use a "where clause" in MakeTableView. I'd still be very interested to find out why it doesn't seem to work with the type of table I'm using.
... View more
10-17-2023
04:18 PM
|
0
|
1
|
624
|
POST
|
Later in the script, data from the table view is manipulated - hyphens are inserted between the numbers in the field "APN". This throws an error, because that action can't be done on Nulls. So that means the records where APN is null were mistakenly included in the table view (meaning the Where Clause was ignored). For troubleshooting, I also included a print statement that prints out the APN's of the records included in the table view - print("APN is " + APN). For the records that have a value in the APN field, it prints, but for other records it errors out, saying it can't concatenate string and NoneType. For troubleshooting, I tried running MakeTableView, including a Where Clause, on a geodatabase feature class rather than a SQL Server database table (which was the original data format I was running it on), and the Where Clause worked! So now my theory is that the problem is the data table type. Maybe I will try adding code to my script to first convert the database table into a geodatabase table or something, before doing MakeTableView. That would defeat the purpose of having intermediate products just be in memory, but that could be okay.
... View more
10-12-2023
08:33 AM
|
0
|
0
|
657
|
POST
|
Thank you very much for your suggestion! I tried your suggestions, and sadly, the "where clause" is still being ignored. So weird.
... View more
10-11-2023
03:18 PM
|
0
|
2
|
671
|
POST
|
In a standalone script, I am trying to use arcpy.MakeTableView_management(). I'm including a "where clause" in the parameters in order to include only certain records in the resulting Table View. With the ArcMap arcpy runtime, it worked, but with Pro, the "where clause" gets ignored - it has no effect. It doesn't throw an error; the script just runs into trouble later on because it is trying to work with records that it's not designed to work with. I have tried a variety of different where clauses that target a variety of fields in the source table. None have an effect. I tried manually doing Select by Attributes in Pro (rather than in the script), and that worked fine. I even copied the SQL from the Pro Select by Attributes GUI into my script, but still it had no effect. I can probably come up with a workaround, but this function should work! Or at least I'd like to know why it isn't working. The input table is a SQL Server database table, not from any kind of geodatabase. Here are the relevant lines: (of course my script uses the real names, and bus_lic_tv is used later in the script) import arcpy
arcpy.env.workspace = r"C:\Path\to\Geodatabase.gdb"
table_data = r"C:\Users\adailey\AppData\Roaming\Esri\ArcGISPro\Favorites\DatabaseName.sde\Database.dbo.TableName"
bus_lic_tv = arcpy.MakeTableView_management(table_data, "bus_lic_no_null_apns", where_clause='APN IS NOT NULL') Does anyone know why the "where clause" is being ignored?? Thank you!
... View more
10-10-2023
05:23 PM
|
0
|
6
|
762
|
POST
|
I also got this error, and for me, the solution was this: I had added a new feature class to an enterprise geodatabase in a dataset, and this undid the original settings like making the geodatabase versioned. So I eventually found that I needed to re-enable versioning for this enterprise geodatabase. This solved the problem, and I was then able to edit the feature class.
... View more
09-26-2023
09:38 AM
|
1
|
0
|
811
|
Title | Kudos | Posted |
---|---|---|
2 | 10 hours ago | |
1 | 09-26-2023 09:38 AM | |
1 | 02-22-2024 01:26 PM | |
1 | 01-30-2024 01:35 PM | |
1 | 01-29-2024 09:48 AM |
Online Status |
Offline
|
Date Last Visited |
2 hours ago
|