|
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
11-21-2025
04:30 AM
|
0
|
0
|
190
|
|
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
11-19-2025
12:47 PM
|
0
|
1
|
662
|
|
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
|
461
|
|
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
|
469
|
|
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
|
482
|
|
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
|
359
|
|
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
|
365
|
|
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
|
283
|
|
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
|
735
|
|
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
|
758
|
|
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
|
686
|
|
POST
|
From what thread are you trying to update properties: MCT or UI?
... View more
10-15-2025
08:22 AM
|
0
|
4
|
692
|
|
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
|
710
|
|
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
|
603
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 2 weeks ago | |
| 1 | 3 weeks ago | |
| 1 | a month ago | |
| 1 | a month ago | |
| 1 | 12-02-2025 11:07 PM |
| Online Status |
Offline
|
| Date Last Visited |
yesterday
|