|
POST
|
I think the main difference is how we call geoprocessing tool. I use the same way as in sample I have referred above (from tbx). I suggest you create tbx file and in python script file leave only calculation code + returning of results. Or try to ask Python group. One of questions from python group is here
... View more
02-21-2024
05:50 AM
|
0
|
1
|
2865
|
|
POST
|
Each ArcGIS Pro community sample has description and screenshots. Take an excursion through the samples and you will find something valuable for your task.
... View more
02-21-2024
04:17 AM
|
1
|
0
|
1627
|
|
POST
|
Sorry. There is no complete solution for your task. You need to go step by step and develop your solution. Start from sample. Change it to meet your requirements. Investigate other samples.
... View more
02-21-2024
04:08 AM
|
0
|
0
|
1631
|
|
POST
|
Hi, Have you take a look at answer.py file? Last line of the file returns result from python code: arcpy.SetParameter(0, sixbynine.compute()) Because there is no input parameters, index of SetParameter method is 0. If your python tool has input parameters, so output index value must be equal to your input parameters count.
... View more
02-21-2024
03:33 AM
|
0
|
3
|
2879
|
|
POST
|
Hi, Look at the ArcGIS Pro community sample InspectorTool
... View more
02-21-2024
03:26 AM
|
0
|
2
|
1640
|
|
POST
|
You use another id in your code sample: esri_file_openFileLocation. It is not esri_core_openFileLocation. With esri_core_openFileLocation ICommand CanExecute with parameter null returns false. It means that you can't execute command. It could be that you need special type of object to pass as parameter for CanExecute and Execute.
... View more
02-20-2024
10:05 PM
|
0
|
1
|
2507
|
|
POST
|
Hi, There is ActiveToolChangedEvent which arrives when active tool changes. Maybe it could help you.
... View more
02-20-2024
09:58 PM
|
0
|
0
|
900
|
|
POST
|
Hi, I have found python sample in ArcGIS Pro SDK community samples. Sample is called DeepThought. Below is sample of c# code which uses that sample python code (answer.py) string geoprocPath = @"D:\ArcGIS_SDK_Samples\arcgis-pro-sdk-community-samples-master\Geoprocessing\DeepThought\Toolboxes\toolboxes";
string toolboxName = "DeepThought.tbx";
string toolName = "Answer";
string fullToolPath = Path.Combine(geoprocPath, toolboxName, toolName);
var gpResult = Geoprocessing.ExecuteToolAsync(fullToolPath, null, null, null, null, GPExecuteToolFlags.AddToHistory);
gpResult.Wait();
if (gpResult.Result.IsFailed)
{
MessageBox.Show("Geoprocessing failed");
}
else
{
var resultValues = gpResult.Result.Values;
if (resultValues == null)
{
// Nothing to read
}
else
{
MessageBox.Show($"Returned value: {resultValues[0]}");
}
} It returns the same value as tool executed from Geoprocessing pane.
... View more
02-19-2024
10:09 PM
|
1
|
5
|
2897
|
|
POST
|
Hi, I would recommend you put QueuedTask.Run inside your methods addFeatureClassToMap and addTableToMap and delete one at the start. Sometimes using one QueuedTask.Run for few processes following each other does not work as expected.
... View more
02-18-2024
10:37 PM
|
1
|
0
|
1200
|
|
POST
|
Hi, I would like to refer to your earlier question. Make python tool which executes query and return result. Call that tool using geoprocessing. For which part of process do you need a help?
... View more
02-15-2024
12:52 PM
|
0
|
7
|
2946
|
|
POST
|
Hi, Look at the ArcGIS Marketplace: https://www.esri.com/en-us/arcgis-marketplace/products?s=Newest&product=ArcGISProAdd-In
... View more
02-12-2024
10:30 PM
|
1
|
0
|
1195
|
|
POST
|
Hi, There is no such id as "esri_file_openFileLocation". If you want to open ArcGIS Pro file "open" or "save" dialog, you can use OpenItemDialog or SaveItemDialog.
... View more
02-12-2024
06:33 AM
|
1
|
1
|
2622
|
|
POST
|
Hi, Try code below. It works for me. protected override async void OnClick()
{
var featLayer = MapView.Active.Map.GetLayersAsFlattenedList().OfType<FeatureLayer>().First();
await QueuedTask.Run(() =>
{
var render = featLayer.GetRenderer() as CIMSimpleRenderer;
var cimVisualVariableInfoXY = new CIMVisualVariableInfo
{
RandomMax = 360,
RandomMin = 0,
VisualVariableInfoType = VisualVariableInfoType.None
};
var cimExpressionInfoZ = new CIMExpressionInfo
{
Title = "Custom",
ReturnType = ExpressionReturnType.Default,
Expression = "$feature.Direction"
};
var cimVisualVariableInfoZ = new CIMVisualVariableInfo
{
RandomMax = 360,
RandomMin = 0,
VisualVariableInfoType = VisualVariableInfoType.Expression,
ValueExpressionInfo = cimExpressionInfoZ
};
var listCIMVisualVariables = new List<CIMVisualVariable>
{
new CIMRotationVisualVariable {
VisualVariableInfoX = cimVisualVariableInfoXY,
VisualVariableInfoY = cimVisualVariableInfoXY,
VisualVariableInfoZ = cimVisualVariableInfoZ,
RotationTypeZ=SymbolRotationType.Arithmetic,
NormalToSurface = false
}
};
render.VisualVariables = listCIMVisualVariables.ToArray();
featLayer.SetRenderer(render);
});
}
... View more
02-07-2024
01:37 AM
|
2
|
2
|
1807
|
|
POST
|
Could you please specify more information about ArcGIS Pro version and database type? There are some issues with GetDefinition method in ArcGIS Pro 3.2 and PostgreSql database. More info here.
... View more
01-30-2024
08:49 AM
|
0
|
1
|
3182
|
|
POST
|
I would recommend you to check selectedFeatureLayer for OID type field using code below: var fieldDescriptions = selectedFeatureLayer.GetFieldDescriptions();
var oidField = fieldDescriptions.Find(x => x.Type == FieldType.OID);
if(oidField != null)
{
var oidName = oidField.Name;
}
... View more
01-26-2024
12:34 PM
|
0
|
3
|
3248
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 2 weeks ago | |
| 1 | 2 weeks ago | |
| 2 | 04-24-2026 08:33 AM | |
| 1 | 03-23-2026 11:44 AM | |
| 1 | 05-22-2024 11:48 PM |
| Online Status |
Online
|
| Date Last Visited |
2 weeks ago
|