|
POST
|
I don't know another way. You can try to run all your code in Python without using Geoprocessing (call python code from .NET)
... View more
yesterday
|
1
|
0
|
11
|
|
POST
|
Hi, You can use MakeFeatureLayer to create a layer from a Feature Class, but you need to change GPExecuteToolFlags from: GPExecuteToolFlags.AddToHistory to: GPExecuteToolFlags.AddOutputsToMap | GPExecuteToolFlags.AddToHistory ArcGIS Pro geoprocessing without GPExecuteToolFlags.AddOutputsToMap doesn't add layer to map, why your management.SelectLayerByLocation can't find layer from input parameters.
... View more
Wednesday
|
1
|
2
|
38
|
|
POST
|
I can confirm this problem still exists in ArcGIS Pro 3.6.0 and workaround works
... View more
Tuesday
|
0
|
0
|
25
|
|
POST
|
Hi, Your issue isn't in xaml. You open window as modal. Try open it as modeless private ProWindowMakeProFilters _prowindow = null;
protected override void OnClick()
{
//already open?
if (_prowindow != null)
return;
_prowindow = new ProWindowMakeProFilters();
_prowindow.Owner = FrameworkApplication.Current.MainWindow;
_prowindow.Closed += (o, e) => { _prowindow = null; };
_prowindow.Show();
//uncomment for modal
//_prowindow.ShowDialog();
}
... View more
a week ago
|
1
|
0
|
90
|
|
POST
|
Hi, Take a look at the other thread. @AnnetteLocke sample for works for me.
... View more
2 weeks ago
|
2
|
1
|
137
|
|
POST
|
After creating project, you can find .NET version in project properties: You can select .NET version in next step after choosing project template, selecting location for project: Another one thing is Visual Studio version. I have found: Visual Studio 2022 v17.12 with .NET 9
... View more
2 weeks ago
|
0
|
0
|
358
|
|
POST
|
Hi, As I understand it, your project template is WPF application. Requirements for WPF application are: Development environments Visual Studio 2022 17.8 or higher with the .NET desktop development workload. Visual Studio 2019 16.9 or higher (for .NET Framework applications only). .NET SDKs and frameworks .NET 8 (8.0.404 or higher) is required for developing WPF for .NET applications. .NET Framework 4.7.2 or higher is required for developing .NET Framework applications. From error message I see that your .NET SDK is 6.0. What .NET version did you choose when create new project from template? Do you have the same .NET SDK (8.x or 9.x) installed? Run "dotnet sdk check" from Developer Powershell to see.
... View more
2 weeks ago
|
0
|
3
|
375
|
|
POST
|
Your code works with file gdb you attached. Check your map content for broken layers. If they exist, remove them and try your code
... View more
3 weeks ago
|
0
|
0
|
92
|
|
POST
|
Hi, MapView has method AddExploratoryAnalysisAsync. Viewshed is derived from ExploratoryAnalysis. Code below: protected override async void OnClick()
{
var mapView = MapView.Active;
if (mapView == null)
return;
var observerPointLayer = mapView.Map.GetLayersAsFlattenedList().OfType<FeatureLayer>().FirstOrDefault(layer => layer.Name.Equals("ObserverPoint"));
if (observerPointLayer == null)
return;
ExploratoryAnalysis item0 = await QueuedTask.Run(() => {
#region Get the observer point
var observerPtCursor = observerPointLayer.Search();
MapPoint observerPoint = null; MapPoint targetPoint = null;
MapPoint observerPointProjected = null;
while (observerPtCursor.MoveNext())
{
var observerPtFeature = observerPtCursor.Current as Feature;
observerPoint = observerPtFeature.GetShape() as MapPoint;
observerPointProjected = GeometryEngine.Instance.
Project(observerPoint, mapView.Map.SpatialReference) as MapPoint;
}
#endregion
Camera camera = new Camera(observerPointProjected.X, observerPointProjected.Y, 10.0, 0, 0);
Viewshed viewshed = new Viewshed(camera, 0, 180, 100, 1000);
return viewshed;
});
await mapView.AddExploratoryAnalysisAsync(item0);
}
... View more
3 weeks ago
|
0
|
1
|
158
|
|
POST
|
Hi, I have tested your code on ArcGIS Pro 3.5 and can say the same as @UmaHarano . It works as in Uma's screenshot. What version of ArcGIS Pro do you use?
... View more
3 weeks ago
|
0
|
1
|
333
|
|
POST
|
Hi, You have missed one parameter 'Field Map'. Try to change line 28 like below: Return Geoprocessing.MakeValueArray(currentLayer, out_features, where_clause) Other values are default and optional For geoprocessing itself you don't need MCT thread (QueuedTask.Run)
... View more
3 weeks ago
|
0
|
0
|
115
|
|
POST
|
Hi, Some information from ArcGIS Pro API: Certain renderers are only appropriate for certain layer types or for layers of a certain geometry type. For example a Dot Density Renderer can only be applied to a polygon layer, a Heat Map Renderer can only be applied to a point layer. Please give us more information about your layer shape type, renderer type and etc.
... View more
3 weeks ago
|
0
|
1
|
453
|
|
POST
|
You can manage add-ins dependencies on each other inside daml. ArcGIS Pro will manage order of loading your add-ins on information stored in daml.
... View more
10-31-2025
11:38 AM
|
0
|
0
|
347
|
|
POST
|
Why do you need to return false from Module.Initialize()? There are many ways to disable functionality without returning false: conditions and etc.
... View more
10-31-2025
10:28 AM
|
0
|
0
|
355
|
|
POST
|
Hi, I would recommend to close dockpane before closing ArcGIS Pro. Start listen ProjectClosingEvent in your dockpane: /// <summary>
/// Override to implement custom initialization code for this dockpane
/// </summary>
/// <returns></returns>
protected override async Task InitializeAsync()
{
await base.InitializeAsync();
ProjectClosingEvent.Subscribe(OnProjectClosing);
} And on project closing close your dockpane: private Task OnProjectClosing(ProjectClosingEventArgs args)
{
// if already cancelled, ignore
if (args.Cancel)
return Task.CompletedTask;
var vm = FrameworkApplication.DockPaneManager.Find(_dockPaneID);
if (vm != null) vm.Hide();
return Task.CompletedTask;
}
... View more
10-31-2025
12:20 AM
|
0
|
0
|
368
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | Wednesday | |
| 1 | yesterday | |
| 1 | a week ago | |
| 2 | 2 weeks ago | |
| 1 | 10-24-2025 10:51 AM |
| Online Status |
Offline
|
| Date Last Visited |
yesterday
|