|
POST
|
The layer supports method will tell you if your layer supports a definition query: The layer DefinitionQuery property will set a definition query on a layer:
... View more
03-03-2022
03:33 PM
|
0
|
0
|
737
|
|
POST
|
Hmmm...Sorry this is going to be long. When I tested in my home environment I saw different messages and worked around them until it worked. I realize our environments are different, but maybe my experience will give you a clue. I will walk you through what I did (keeping in mind we're almost certainly on different versions of everything) I created the View in SSMS just in a query window and it worked for me: Adding this view to my map in Pro did not work initially, returning this error: To fix this I opened the Properties > Source for the view in ArcGIS Pro and edited the SQL Query it was using to simply remove the double quotes it had put around "COUNT" for some reason Once I did that the view table would open in Pro, but oddly it added an ESRI_OID field which in effect is what you wanted all along, and makes the "UniqueID" field I calculated in the view obsolete: So finally I Altered my view by removed the "Row_Number() Over(ORDER BY TxtTest asc) as UniqueID," part ,re-added it to my map in Pro, and edited the query to remove the double quotes around "COUNT" and got this when viewing the view table in Pro
... View more
03-03-2022
02:56 PM
|
1
|
1
|
7854
|
|
POST
|
I think this will work... my field is called TxtTest though This was written is SQL Server but should work the same:
... View more
03-03-2022
01:04 PM
|
0
|
3
|
7886
|
|
POST
|
Equals(geometey($feature),geometry($originalfeature)) Not sure you NEED the geometry functions but it doesn't hurt. Not near a comouter, but i think you can use IsEmpty to determine if the feature existed before it was edited (i.e reshaped, moved, or added)
... View more
03-03-2022
08:51 AM
|
1
|
0
|
1205
|
|
POST
|
I'm not near a computer to test anything, but from what I can see your going to want to add a for loop to the body of your function. For each feature in the featurelayer you pass into the function return the ObjectID (or other unique id). Then you can use that to exclude the current feature from the WhereClause.
... View more
03-03-2022
07:15 AM
|
1
|
0
|
948
|
|
POST
|
I would probably create all the new points first and then run a near command on them to assign them a distance away from the nearest existing point. Then select for distance greater than your tolerance then append the resulting set all at once. It will require you to use a submodel that takes the result of your iterator as input. Problem is that if 7 main st is very close to the point that would be created for 5 main it will not get appended.. If the address is common you could use that as the match criteria. But that only works if the addresses are spelled and formatted the same. Maybe you could use a combo of distance difference and address number.
... View more
03-03-2022
04:48 AM
|
0
|
0
|
1246
|
|
POST
|
Does the point you want to exclude from being added to the append file have an identifier that will already exist in the append file? I.E. if the point you don't want to append to the Append file has an ID of "UID_0001" (made up ID) will that ID already exist in the append file, or will there just be a point in the append file at the exact same location, but having a different ID?
... View more
03-02-2022
08:41 AM
|
0
|
0
|
1254
|
|
POST
|
Can you describe your data and goal a little more? For example which data (trees or inspection) is in a feature class and which is in the flat file? Is the ForeignKey common between the two tables (can be used to link them)? Are you looking for two feature classes; one for inspection and another for trees? Since there is a many to one relationship between the two (many inspections to one tree), if the foreign key is common between the two tables, you could just set up a relationship class. The inspections would stay in a database table, but be related to the trees so you could see them if you clicked on a tree. If you (in this example) you wanted the inspection database table to be turned into a feature class I would: 1) Add an X and Y field to my Trees Feature Class and use Calculate Geometry to populate them with the desired coordinates. 2) Add an X and Y field to my inspection table 3) Joint the inspection table to the trees keeping all matching records 4) calculate the X and Y fields from the linked Trees X and Y columns into my X,Y columns in the inspection table. 5) remove the join 6) Use the XY table to point tool That should give you an inspection point feature class.
... View more
03-02-2022
06:55 AM
|
1
|
0
|
2534
|
|
POST
|
Can you provide a better image of your model (sorry I can't read it)? Also can you provide an image of your Append dialog?
... View more
03-01-2022
07:32 PM
|
0
|
1
|
1266
|
|
POST
|
Usually these differences are caused by the requirements of the underlying database the query is being run against, but if that is the same in both the development and the production environments, then it might be because the 10.9 REST API uses the SQL-92 standard (see second image below. It doesn't talk specifically about the REST API, but it mentions the 'date' keywork being required by SQL-92). https://desktop.arcgis.com/en/arcmap/latest/map/working-with-layers/sql-reference-for-query-expressions-used-in-arcgis.htm#GUID-85C03D85-F4A5-48FC-8E8C-3F79919430DB file geodatabase use the "date" syntax With regard to the integer queries... never heard of one working with quotes unless its stored as text in the database.
... View more
03-01-2022
05:15 PM
|
1
|
1
|
2324
|
|
POST
|
Is the data coming from a service, or from a file geodatabase, or from an enterprise gdb...? If you open the Catalog Pane and right click your feature class that you are running the tool (in python) against and right click it and select "locks"... does it report any locks? Might you have anyone else viewing or editing the same data at the same time, or have a service that is referencing the data? Just trying to eliminate things can can lock a dataset.
... View more
03-01-2022
12:20 PM
|
0
|
0
|
11462
|
|
POST
|
When you say the user can see the private version, do you mean they can access the version by adding its layers to a map and view the data (hopefully not edit it), or do you mean you can see the Default version when you click on Version Management?
... View more
03-01-2022
06:58 AM
|
0
|
0
|
1542
|
|
POST
|
You know I don't know that... but I'll run an experiment using similar code at different scales and keep you posted what I find out. Looks like it doesn't. Here is the Arcade Length of these lines at 1:100 / 1:1,000 / and 1:10,000 (with an extra test for converting $feature to geometry first) all come up with the same (albeit wrong) length value: I thought maybe it had to do with the map being in one spatial reference and the data being in another, but the above numbers were generated when both were set to Then I read about the Arcade LengthGeodetic function and thought it might have something to do with the curvature of the Earth. So I created some test data in WGS 84 Web Mercator (aux sphere) and created a map using that same spatial reference and ran a test on that using just straight up Length($feature,'meters') and got the below results, which you might be interested in. The only line who's length was different between shape length and the ArcadeLength in this test was the line that contained the true curve. Granted this is a very small test (4 lines), but maybe all this will help you toward you goal. K
... View more
02-28-2022
06:11 PM
|
2
|
1
|
2692
|
|
POST
|
I would image this is why... from Geometry Functions | ArcGIS Arcade | ArcGIS Developer
... View more
02-28-2022
02:41 PM
|
0
|
3
|
2700
|
|
POST
|
I just used a Notebook and tried this code and it worked. A little different from the original code that runs in Spyder: intCurrentBatch = 1 intStartNumber = 1 intBatchSize = 10 intBSAfterFirstTimeThrough = intBatchSize - 1 with arcpy.da.UpdateCursor(fc, fields) as cursor: for row in cursor: if intStartNumber <= intBatchSize: row[0] = str(intCurrentBatch).zfill(4) cursor.updateRow(row) intStartNumber = intStartNumber + 1 else: intStartNumber = 1 intCurrentBatch = intCurrentBatch + 1 row[0] = str(intCurrentBatch).zfill(4) cursor.updateRow(row) intBatchSize = intBSAfterFirstTimeThrough Image of Notebook. Keep in mind that indentation level is important. Results
... View more
02-28-2022
09:52 AM
|
0
|
1
|
2812
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 07-25-2025 07:54 AM | |
| 1 | 07-25-2025 10:45 AM | |
| 1 | 05-10-2022 11:06 AM | |
| 1 | 05-09-2022 04:05 AM | |
| 1 | 03-17-2022 04:04 AM |
| Online Status |
Offline
|
| Date Last Visited |
07-25-2025
07:47 AM
|