|
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
|
1191
|
|
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
|
1204
|
|
POST
|
Have you tried on existing project? Try on new project where your dockpane was not started. On Existing project move your dockpane to project dockpane side. Close dockpane and open again and it will be opened in last position. Project remembers your dockpane last position.
... View more
10-27-2025
01:12 PM
|
0
|
0
|
816
|
|
POST
|
Hi, Making changes to config.daml doesn't initiate recompiling. You need to rebuild your add-in project to see changes.
... View more
10-27-2025
12:53 PM
|
0
|
1
|
822
|
|
POST
|
Hi, Active layout must be selected before executing code below: protected override void OnClick()
{
var command = FrameworkApplication.GetPlugInWrapper("esri_sharing_ExportLayout") as ICommand;
if (command.CanExecute(null))
command.Execute(null);
}
... View more
10-24-2025
10:51 AM
|
1
|
0
|
595
|
|
POST
|
There is no possibility to have map layer not added to map. You can use Copy Features GP tool and as an output use memory workspace //get the active map
MapView activeView = MapView.Active;
//get the first layer in the active map
var layer = activeView.Map.GetLayersAsFlattenedList().OfType<FeatureLayer>().First();
if(layer == null)
return;
var parameters = Geoprocessing.MakeValueArray(layer, @"memory\clonedFC");
IGPResult result = await Geoprocessing.ExecuteToolAsync("CopyFeatures_management", parameters, null, null, null, GPExecuteToolFlags.AddToHistory);
... View more
10-20-2025
11:40 PM
|
0
|
3
|
1386
|
|
POST
|
Hi, You can use EditOperation Copy method. Below is code for map selection copy layer by layer: var mv = MapView.Active;
return QueuedTask.Run(() =>
{
var sel_set = mv.Map.GetSelection().ToDictionary();
if (sel_set.Count() == 0)
return false;
//do the copy
var editOp = new EditOperation()
{
Name = "Copy",
ErrorMessage = "Copy failed"
};
foreach (var kvp in sel_set)
{
editOp.Copy(kvp.Key, kvp.Key, kvp.Value);
}
return editOp.Execute();
});
... View more
10-20-2025
11:28 AM
|
0
|
0
|
1409
|
|
POST
|
That's bad. You need return your list from MCT thread and then set property in UI thread. var locationList = await QueuedTask.Run(() =>
{
var locationList = new ObservableCollection<OffroadLocationNames>();
if (!string.IsNullOrEmpty(pointData.TrafficFeature) && pointData.LocationID > 0)
{
OffroadLocationNames thisOne = Module1.Current.Cache.OffroadLocations.Data.FirstOrDefault(d => d.LocationId == pointData.LocationID);
if (thisOne != null)
{
locationList.Add(thisOne);
locationList.Add(new OffroadLocationNames() { LocationId = -1, LocationName = "" });
}
locationList.AddRange(Module1.Current.Cache.OffroadLocations.GetUnusedLocationNames(pointData.TrafficFeature));
return locationList;
});
LocationNames = new ObservableCollection<OffroadLocationNames>(locationList);
SelectedLocationName = LocationNames.First(); // OrDefault(ln => ln.LocationId == thisOne.LocationId); or var locationList = new ObservableCollection<OffroadLocationNames>();
if (!string.IsNullOrEmpty(pointData.TrafficFeature) && pointData.LocationID > 0)
{
OffroadLocationNames thisOne = Module1.Current.Cache.OffroadLocations.Data.FirstOrDefault(d => d.LocationId == pointData.LocationID);
if (thisOne != null)
{
locationList.Add(thisOne);
locationList.Add(new OffroadLocationNames() { LocationId = -1, LocationName = "" });
}
locationList.AddRange(Module1.Current.Cache.OffroadLocations.GetUnusedLocationNames(pointData.TrafficFeature));
RunOnUIThread(() =>
{
LocationNames = new ObservableCollection<OffroadLocationNames>(locationList);
SelectedLocationName = LocationNames.First(); // OrDefault(ln => ln.LocationId == thisOne.LocationId);
});
}
/// <summary>
/// utility function to enable an action to run on the UI thread (if not already)
/// </summary>
/// <param name="action">the action to execute</param>
/// <returns></returns>
internal static Task RunOnUIThread(Action action)
{
if (OnUIThread)
{
action();
return Task.FromResult(0);
}
else
return Task.Factory.StartNew(action, System.Threading.CancellationToken.None, TaskCreationOptions.None, QueuedTask.UIScheduler);
} Sorry for code formating
... View more
10-15-2025
09:20 AM
|
1
|
2
|
1309
|
|
POST
|
From what thread are you trying to update properties: MCT or UI?
... View more
10-15-2025
08:22 AM
|
0
|
4
|
1315
|
|
POST
|
Hi, Your properties set methods doesn't initiate NotifyPropertyChanged event. Your dockpane binding properties must look in code below: private ObservableCollection<OffroadLocationNames> _locationNames;
public ObservableCollection<OffroadLocationNames> LocationNames
{
get => _locationNames;
set => SetProperty(ref _locationNames, value, () => LocationNames);
}
private OffroadLocationNames _selectedLocationName;
public OffroadLocationNames SelectedLocationName
{
get => _selectedLocationName;
set => SetProperty(ref _selectedLocationName, value, () => SelectedLocationName);
}
... View more
10-15-2025
06:26 AM
|
0
|
1
|
1333
|
|
POST
|
Hi, Have you copied application from bin\release or used published content? You need to publish application from Visual Studio. Right click on project and select Publish menu item. Define publishing folder. After publishing copy publishing folder content. On other PC on startup you will be asked to download and install .NET version used in your application if it doesn't exist.
... View more
10-14-2025
10:22 PM
|
0
|
0
|
1485
|
|
POST
|
Hi, I would recommend to use ExecuteToolAsync method with GPToolExecuteEventHandler parameter . More info you could find in another thread. It will allow you to get more information about input/output parameters validity. Another one thing is your where clause. If you check your where clause in ArcGIS Pro Select By Attributes tool, you will find what query for date fields needs timestamp. Your query could be like this: "valid_to = timestamp '2019-01-01 00:00:00' and CATEG IS NOT NULL" Info here
... View more
10-06-2025
11:07 AM
|
0
|
0
|
729
|
|
POST
|
Hi, ArcGIS Pro SDK supports building stand alone applications using ArcGIS.CoreHost and ArcGIS.Core assemblies. More info on this wiki: ProConcepts: Core Host Now is ChatGPT time, Google is yesterday 🙂
... View more
10-06-2025
12:46 AM
|
1
|
0
|
705
|
| Title | Kudos | Posted |
|---|---|---|
| 2 | 04-24-2026 08:33 AM | |
| 1 | 03-23-2026 11:44 AM | |
| 1 | 05-22-2024 11:48 PM | |
| 1 | 02-27-2026 10:33 AM | |
| 1 | 01-07-2026 10:44 AM |
| Online Status |
Online
|
| Date Last Visited |
an hour ago
|