|
POST
|
This could be an issue with the chosen coordinate system of the data and/or map but we'll need more information. What tool is used to create the circles? How are they entering the desired radius?
... View more
08-24-2023
02:26 PM
|
0
|
3
|
1379
|
|
POST
|
Note that this will add new fields to the shapefile. If you have existing fields ready to go, try Add Join followed by Calculate Field (one field at once) or Calculate Fields (many fields at once, trickier to use).
... View more
08-22-2023
11:19 AM
|
0
|
0
|
4998
|
|
POST
|
Are you in Pro or one of the web-based platforms? Pro maps have a coordinate system you can set yourself, it defaults to whatever your first layer or basemap uses. You'll have to keep track of what datum transformations are in play but otherwise it'll try and sort itself out. Web maps and anything derived from them (EXB, Field Maps etc.) pin the coordinate system to the basemap. This means if you don't want datum transformations, you'll have to ensure the basemap was published with the same GCS (and PCS ideally for performance reasons) as your layers. The standard ESRI basemaps are Web Mercator only so you'll have to source, process, host and serve your own basemaps if you want to go down this route. Alternatively, you'll need to store your layers as Web Mercator before you publish them out, then post-process the data to a projected and transformed copy before you run proper analysis and cartography.
... View more
08-22-2023
11:11 AM
|
0
|
0
|
780
|
|
POST
|
What do your tool parameters look like when you defined the tool in Pro? Your script has 2 inputs and 1 output, these same inputs and outputs must be defined in the tool's structure. The docs can explain this better than I can: link. In your case I think you can eliminate both inputs as everything is hardcoded into the script, or you can turn some of the inputs into parameters to make your tool more flexible, up to you. The output parameter will have to be a Derived Output as you're creating the feature class wholly within the script, if this causes issues you can let the user pick the output FC as a Required Output parameter instead.
... View more
08-15-2023
12:52 PM
|
1
|
0
|
1670
|
|
POST
|
If you add a script tool to a model it should show up as a rectangle, just like the normal tools. Your screenshot is highlighting a variable, try dragging the script tool from the catalog into the ModelBuilder canvas and see if that gives you a more sensible item to work with.
... View more
08-15-2023
11:56 AM
|
0
|
3
|
1677
|
|
POST
|
Here's one script structure you can use: from __future__ import annotations
import arcpy
def main(param1: int, param2: str):
return str(param1) + " " + param2
def execute(params: list[Parameter], messages = None):
param1 = params[0].value
param2 = params[1].valueAsText
params[2].value = main(param1, param2)
if __name__ == "__main__":
execute(arcpy.GetParameterInfo()) This structure puts all the main program logic inside a "main" function that accepts standard Python types. If you run this through a standard toolbox (or bridge the call to execute from a Python toolbox) you extract the parameter values, pass them into "main" and set a derived parameter using the return value. However, you can import "main" from this file into a test file and call it with premade parameters and test the results. This makes it easier* to write unit tests for your script tools as well as launching the tool from outside of ArcGIS Pro which enables proper debugging. That said, you'll still need to AddMessage debug your parameter object related code if you don't have Visual Studio 2019 on hand. *The actual hard part with writing script tool tests is wrangling the GIS data and making meaningful comparisons against "good" data but that's a story for another day
... View more
08-11-2023
05:11 PM
|
3
|
0
|
4757
|
|
POST
|
Editing the "x" files directly is possible but very fragile, there's nothing stopping ESRI from redefining how these files are laid out and breaking your code. The preferred method is to go through the CIM Interfaces as they have explicit versions that are guaranteed to remain stable across Pro versions. Note that CIM editing is very different from your usual arcpy workflows, you have to work with the various types as they're defined and instantiate new instances using the provided factory functions.
... View more
08-11-2023
03:32 PM
|
1
|
3
|
3122
|
|
POST
|
I strongly suggest learning how Python classes are written, the official docs are a good reference and there are many tutorials online that can walk you through creating your first class. That said, there's nothing stopping you from defining functions within another function or method and then calling them. The catch is functions are bound to the scope they're defined in, which means you can't call an inner function outside of the method/function/etc. it's defined within. The most likely reason your first example is failing is because you defined a method with no "self" parameter or no "@staticmethod" decorator, which makes it useless. Instance methods need self as the first parameter, decorated static methods do not.
... View more
08-11-2023
03:26 PM
|
0
|
0
|
1210
|
|
POST
|
In general, nothing in arcpy is designed to run in a threaded context. You might be able to hack something together using the multiprocessing library but in general, no GP tool can execute until the current one is finished. If you want a dedicated window for your tool you'll need to dive into the full Pro SDK and write some .NET.
... View more
08-02-2023
03:03 PM
|
0
|
1
|
873
|
|
POST
|
For sure, if you're doing more complex schema definitions then Add Fields is unsuitable. One other trick you can look into is creating a template feature class/table and then feeding that into the CreateFeatureclass/CreateTable tool. I believe that should preserve nullability, scale etc. but make sure you run your own tests. Other than that, Blake's suggestion to just add the domains in a second pass using the GP tool should work just fine!
... View more
08-02-2023
02:48 PM
|
1
|
1
|
3029
|
|
POST
|
I've found for 99% of cases you'll want to use Add Fields to add multiple fields at once. You do lose some configuration options but for simple tasks it'll do what you want.
... View more
08-02-2023
01:49 PM
|
2
|
3
|
3049
|
|
POST
|
Would a reference scale meet your needs? I can't think of any other way to control line sizes across arbitrary scales. If you have a set list of fixed scales you can create multiple copies of each line layer and hand-size each thickness to taste.
... View more
07-27-2023
04:06 PM
|
0
|
0
|
1641
|
|
POST
|
If all you care about is sync capabilities, enabling Archiving will allow that without having to deal with version management. You can also use Branch Versioning and never create any child versions, this is roughly comparable to classic archiving. In my experience, either do archiving/traditional versioning for every item in your database or use branch versioning for everything, trying to mix the old and new methods leads to compatibility corner cases.
... View more
07-14-2023
09:14 AM
|
0
|
0
|
3082
|
|
POST
|
Labels are controlled by the web map's definition and are limited to whatever's supported by the "classic" map viewer, if they display there they should display in WAB. IF that doesn't work, you may have a widget that's inhibiting the labels, try making a new app from scratch to see if they appear. If all of that fails I'd take it up with support.
... View more
07-06-2023
08:50 AM
|
0
|
4
|
1790
|
|
POST
|
Does every row in the CSV have a unique ID of some sort? Export what you have in AGOL and isolate the missing records and see if there's some notable difference between them and the successful records. You might have to open the file in a text editor to see exactly how the data is stored.
... View more
06-29-2023
03:05 PM
|
0
|
0
|
1415
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | Thursday | |
| 1 | Thursday | |
| 1 | Wednesday | |
| 1 | 2 weeks ago | |
| 1 | 2 weeks ago |
| Online Status |
Online
|
| Date Last Visited |
12 hours ago
|