|
POST
|
The expected result can be achieved by passing a flag to Geoprocessing.ExecuteToolAsync(...) method. Here is the code snippet: // inputs: symbologyLayer could be a layer file (*.lyrx) or a layer in the map var parameters = Geoprocessing.MakeValueArray(inputLayer, symbologyLayer); // set flags GPExecuteToolFlags flags = GPExecuteToolFlags.GPThread; // call ExecuteToolAsync var gp_result = await Geoprocessing.ExecuteToolAsync("ApplySymbologyFromLayer_management", parameters, null, null, null, flags);
... View more
10-18-2018
02:24 PM
|
1
|
3
|
1929
|
|
POST
|
What are the parameters of the tool? I see there is only one GP tool named Calculate Statistics in the Data Management - are you talking about that tool (I guess not as this tool only takes a raster as input)? Or a custom tool?
... View more
08-21-2018
02:25 PM
|
0
|
1
|
1115
|
|
POST
|
If you need help with Python scripting please shoot me a mail at nahmed@esri.com (also some sample data will be helpful)
... View more
07-03-2018
07:52 AM
|
0
|
0
|
1784
|
|
POST
|
Each tool having a class approach is not taken in ArcGIS Pro SDK. I'll pass this info to the team.
... View more
05-14-2018
09:25 AM
|
0
|
0
|
609
|
|
POST
|
Let’s communicate via email until we find a solution – if it is okay with you. Thanks. nahmed@esri.com
... View more
04-20-2018
12:12 PM
|
0
|
1
|
1065
|
|
POST
|
Could you please try this way (without a comma between FEET and Sum so that it matches Python syntax)? var statistics_fields = "FEET Sum";
... View more
04-20-2018
11:46 AM
|
0
|
3
|
3240
|
|
POST
|
Most probably you are right about: *****syntax of these variables is assumed to be the failure***** I'll forward this to appropriate team. Meanwhile, I'll try to find a workaround. Thanks for your patience.
... View more
04-20-2018
08:34 AM
|
0
|
0
|
1065
|
|
POST
|
Just to be sure that issue is NOT caused by other parameter settings, I'm asking - have you called MakeValueArray on the spatial_ref object before passing it to MakeEnvironmentArray? var spatial_ref = await QueuedTask.Run(() => { return SpatialReferenceBuilder.CreateSpatialReference(3857); }); // call MakeValueArray on spatial_ref so that ExecuteToolAsync can internally use the object var sr_param = Geoprocessing.MakeValueArray(spatial_ref);
... View more
04-19-2018
01:07 PM
|
0
|
5
|
3240
|
|
POST
|
Have you used your code or the code in the sample? In the sample code (from the documentation link) a QueuedTask.Run(...) is used to created the spatial reference object.
... View more
04-19-2018
12:53 PM
|
0
|
7
|
3240
|
|
POST
|
As your sp_ref is an object you need to pass it through MakeValueArray(..). Could you please try with these changes: var sp_ref = Geoprocessing.MakeValueArray(SpatialReferenceBuilder.CreateSpatialReference(102629)); var args = Geoprocessing.MakeValueArray(in_table, out_table, statistics_fields, case_field); var envi = Geoprocessing.MakeEnvironmentArray(outputCoordinateSystem: sp_ref); If you follow the documentation you'll find which objects are supported directly. https://github.com/esri/arcgis-pro-sdk/wiki/ProConcepts-Geoprocessing#create-an-array-of-environment-settings If you scroll down the above documentation you'll find this example: // example of using ArcGIS.Core.Geometry.SpatialReference objectvar spatial_ref = await QueuedTask.Run(() => { return SpatialReferenceBuilder.CreateSpatialReference(3857); });// call MakeValueArray on spatial_ref so that ExecuteToolAsync can internally use the objectvar sr_param = Geoprocessing.MakeValueArray(spatial_ref);
... View more
04-19-2018
11:54 AM
|
0
|
9
|
3240
|
|
POST
|
Assuming you are trying to deploy a .Net Add-in, you can use System.IO.Directory.GetCurrentDirectory() method to get the path of the ArcGIS Pro Project where the default geodatabase and the toolbox reside: string spath = System.IO.Directory.GetCurrentDirectory(); The Project folder looks something like this: For this particular folder structure, the spath value (under C: directory) will be: C:\temp\AddinMovedHere\OneDown\TwoDown From there, using C# (or VB) concatenating functions, you can derive other paths such as to Geodatabase and Toolbox.
... View more
11-27-2017
03:12 PM
|
1
|
0
|
4508
|
|
POST
|
Could you try first converting the polygons to polylines and then using the polylines to compare? If you want you can use Polygon to Line under Data Management Toolbox, in Features toolset. http://support.esri.com/en/technical-article/000007707
... View more
11-08-2017
02:02 PM
|
1
|
1
|
6164
|
|
POST
|
Put the toolbox and python script in a folder just under the .Net project folder. You can then refer to the path of the toolbox from the solution.
... View more
10-31-2017
11:08 AM
|
1
|
2
|
4508
|
|
POST
|
Hi Darren, sorry to inform you that this issue started showing up after 10.4 and resolved in 10.5.1 Most of the time your workaround works: "The only way I can get the extension to be activated is to open the Extensions dialog, which fires the __init__ event handler (without even clicking on the extension to turn it on!)."
... View more
08-15-2017
09:37 AM
|
0
|
0
|
920
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 12-18-2019 03:56 PM | |
| 1 | 05-06-2020 01:18 PM | |
| 1 | 07-23-2021 10:33 AM | |
| 1 | 07-28-2020 09:10 AM | |
| 2 | 07-27-2020 04:47 PM |
| Online Status |
Offline
|
| Date Last Visited |
10-25-2021
03:13 PM
|