|
IDEA
|
@ShaunWalbridge Thanks for the advice and pleased to here its a bug that will get resolved. I have to admit I prefer to use the package manager in ArcPro, because its so convenient but I mastered the art of using pip to install a new module into the python environment. Typically I open up a command line window, navigate it into the folder with pip, in my case it be would C:\Users\hornbydd\AppData\Local\ESRI\conda\envs\arcgispro-py3_Cloned\Scripts then use pip. How would one run conda create -n pro-shapely-2 arcpy=3.1 shapely=2 is that within the command line window, if so does it require to be run from a folder as with pip? I'm asking simply because I'm not familiar with the approach you suggest and it would be good for me to understand it.
... View more
04-12-2023
02:16 AM
|
0
|
0
|
3715
|
|
IDEA
|
For the record I simply installed shapely into the cloned python environment using "pip install shapely" and I have seen no other issues manifest.
... View more
04-04-2023
04:30 AM
|
0
|
0
|
3753
|
|
POST
|
You have set the parameters to the model variables but you have not set the model variables, I know this as they are grey. Right click on them, open them in your model and set them to the actual dataset. Also looking at your code you have hard wired the SQL where clause to event_id, so why offer it up as a parameter?
... View more
04-03-2023
08:18 AM
|
0
|
0
|
1730
|
|
POST
|
You Script tool (so not model) code takes 4 parameters, in your image you are not connecting in Event_id, the 3rd of 4. Event_id = arcpy.GetParameterAsText(2) # Event_ID Which suggests your current parameters are potentially linking to the wrong input parameter as well as not providing all four required parameters?
... View more
04-03-2023
08:00 AM
|
0
|
2
|
1743
|
|
POST
|
OK, without seeing what "SearchCursor" is no one can answer this question. I suspect the inputs are the wrong data type that they are feeding into. Share that portion of the model with some sample data?
... View more
04-03-2023
07:53 AM
|
0
|
1
|
1756
|
|
POST
|
Are you saying in the image you have uploaded that "SearchCursor" is a model? Also the inputs to "SearchCursor" are all grey, they have not been set, so not surprising that "SearchCursor" is not running. There is little point setting them as Parameters if you intend to run the model within modelbuilder.
... View more
04-03-2023
07:39 AM
|
0
|
3
|
1767
|
|
IDEA
|
Interesting issue. Agree, the cross would seem to suggest a problem. But it only appears when you hover over the parameter. Using the tool you demonstrate the issue with, if you click in the next row of input features the cross disappears and moves into the row you just clicked in. It's tool tip, like other icons that appear on a parameter, does say Remove and does not say anything like you have a problem.
... View more
04-03-2023
07:35 AM
|
0
|
0
|
1395
|
|
IDEA
|
Although adding a shape solves the problem, it does feel a bit clunky. A layout page colour as a property would be more intuitive as @Laura is suggesting.
... View more
04-03-2023
05:07 AM
|
0
|
0
|
586
|
|
IDEA
|
ArcPro 3.1.0 makes it easy for the non-technical to install additional python modules through the Package Manger. Love it! Currently the version of shapely that the package manager can install is 1.8.4. Version 2.0.1 is available and has better support for precision and no doubt other functionality. My idea is that ESRI makes it a priority to support shapely 2.0.1 through the Package Manager. Yes I know it can be installed manually but that's a route that will put off non-technical users.
... View more
04-03-2023
04:56 AM
|
1
|
6
|
3796
|
|
POST
|
The ArcMap tool RivEX can sample the river network in a fixed distance or randomly, check the help file out here. It is designed to over the branching issue you are attempt to deal with.
... View more
04-01-2023
01:18 PM
|
0
|
0
|
3485
|
|
POST
|
That goes for dropbox too. I've had issues with read/writing data directly from dropbox.
... View more
04-01-2023
01:11 PM
|
0
|
0
|
824
|
|
POST
|
I'm going to stick my neck out and say yes. I base that opinion on my experience. If the input dataset to a select by location is a shapefile without it's spatial index I often observe poor performance. Add a spatial index and I see significant improvement with such tools. I've never used SDE so I'm assuming that would behave the same as I see that as a superior storage format.
... View more
04-01-2023
01:10 PM
|
1
|
2
|
1613
|
|
POST
|
Hi Dan, Thanks for your time. I understand your suggestion of moving the Add field tool into the script, but I do not want that. I simply used the Add Field as an example of chaining tools in model builder, it could have been any other tool that takes a table as input. Spurred on by you I did some further searching with Google and finally came across a thread back in 2019 by @NealBanerjee who was having the same issue as me, the output is derived, built completely within the script and essentially is independent to any of the input parameters. Now I may be wrong but I'm getting the impression one cannot create a derived output and set its schema when the derived output is not dependent on any input parameter. Unless I'm missing some subtle bit of code I cannot create a derived output and say "this is going to be a table with the following fields"? The examples in the help file show derived outputs that are dependent upon one of the input parameters. Clear as mud? 🙂 So unless some ESRI modelbuilder/python scripter guru says otherwise I thinks its not possible? I'm more than happy to be shot down in flames at this point, if someone could show me otherwise. I should emphasize I'm developing script tools and not a python toolbox. Now that all said the thread offered up a solution that is workable, it's a bit of a faff but when I tested it does actually work. You connect the derived output as a precondition to a Calculate Value tool which simply states what the output type is. Then the Add Field tool validates and the whole model runs correctly. The Calculate tool was set up as:
... View more
04-01-2023
05:19 AM
|
0
|
0
|
2029
|
|
POST
|
All, I am developing a suite of python script tools in the ArcPro 3.1.0 toolbox (atbx). A set of these tools create a stand alone table in a file geodatabase whose location is known to the tool. The user has no control over name or output location, this is controlled in the script itself. The code runs without error and creates the table as expected. I expose this table created in the script as a derived output as shown below: In my script I create the table, fill it with the required data and add it to the map, I also set the 4th parameter to it, the relevant add to map code is shown below: try:
aprx = arcpy.mp.ArcGISProject("CURRENT")
mainMap = aprx.activeMap
errorTable = arcpy.mp.Table(sPathTable) # sPathTable is a full path to the file geodatabase table
mainMap.addTable(errorTable)
arcpy.SetParameter(4, sPathTable)
except:
arcpy.AddError("Failed to add table to map, this functionality only works if tool is run from within an active ArcPro Project")
return When the tool is run straight from the toolbox, all seems to run OK. If I drag 'n' drop it into a model and then link the derived output to say another tool (in the example below it's an add field tool) the linked tool never validates and the model won't run to completion. I feel its something to do the derived output schema and the Add field tool doesn't know what's linking into it? There is the schema property of a parameter but all the examples in the help I've been able to find talk about setting the schema of an output that is dependent on an input parameter. My parameter is populated with a table built entirely within the script. Does anyone understand what the problem is and can provide any advice? My gut feeling its something that needs to be added to the Validation (ToolValidator code)? Or are derived parameters meant to be "un-linkable"?
... View more
03-31-2023
04:36 PM
|
0
|
2
|
2081
|
|
POST
|
Johannes, Awesome! It never occurred to me that it would be a function of arcpy, I was looking for some sort of read/write property of a geometry. Well you have definitely earned yourself a 🍺 Thank you for your swift reply. Duncan
... View more
03-28-2023
03:36 AM
|
0
|
0
|
4262
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 08-18-2025 06:52 AM | |
| 2 | 2 weeks ago | |
| 1 | 12-03-2025 04:30 PM | |
| 1 | 12-03-2025 04:06 PM | |
| 1 | 12-03-2025 04:17 PM |
| Online Status |
Offline
|
| Date Last Visited |
Tuesday
|