|
POST
|
If you are talking about 'custom project settings' then your findings are correct. The API exposes only two overrides in the Module class that allow to read/write the project settings: OnReadSettingsAsync and OnWriteSettingsAsync. And you are correct since once you create those settings initially and save the project file your settings stick around for good. OnWriteSettingsAsync only allows you to replace an existing setting and doesn't allow you to delete any existing settings from the key/value pair list of project settings. As a workaround I would suggest to add a boolean setting named something like "UseDefaults" and set that to true in order to clear any existing settings. Once you read settings, check for "UseDefaults" and if its value is true just ignore all other existing settings.
... View more
02-16-2021
10:08 AM
|
0
|
1
|
1832
|
|
POST
|
When you implement a button (or tool) you have to define its 'id' in the config.daml file. Usually the item template for buttons/tools will define an id for you. It looks like this: <tool id="CompReporter_AddCompBySelection" caption="AddCompBySelection"
className="AddCompBySelection" loadOnClick="true" ...>
<tooltip ... </tooltip>
</tool> the 'id' in this case is: CompReporter_AddCompBySelection In the 'code behind' for your dockpane you can then use your tool (or button) just like any other ArcGIS Pro button (built-in or not) by using this snippet: // use CompReporter_AddCompBySelection
IPlugInWrapper wrapper = FrameworkApplication.GetPlugInWrapper("CompReporter_AddCompBySelection");
if (wrapper is ICommand toolCmd)
{
// if it is a tool, execute will set current tool
toolCmd.Execute(null);
}
... View more
02-16-2021
08:54 AM
|
2
|
1
|
3879
|
|
POST
|
It seems that you got your add-in to work, but I just wanted to point out that by default add-ins are 'Just-in-time' (JIT) loaded, meaning they are not loaded and running until you interact through the UI with your add-in. If you want your add-in to work from startup (i.e. in order to listen to a project open/close event) you have to change the JIT default behavior by turning the 'autoload' (in config.daml) to true. You can find more documentation here: ProConcepts Framework · Esri/arcgis-pro-sdk Wiki (github.com)
... View more
02-10-2021
01:02 PM
|
1
|
1
|
3035
|
|
POST
|
If you hover over the EditCompletedEvent.Subscribe method in Visual Studio (or use the Pro SDK API reference) you find the following parameters for the Subscribe method: public static SubscriptionToken Subscribe(
Func<EditCompletedEventArgs,Task> action,
bool keepSubscriberAlive
) This shows that the first parameter is a delegate function that has an input parameter of the type 'EditCompletedEventArgs' and returns a class of the type System.Threading.Tasks.Task . The Task class is derived from the 'Task <TResult> class' . Both variations of the Task class represent a single operation that usually executes asynchronously, however, whereas 'Task<TResult>' returns a value (of the type TResult), 'Task' doesn't return a value. Consequently your delegate above 'onEce' has to return an instance of the Task class and the way to do this is to use the 'Task.FromResult<TResult>(TResult)' method and since TResult is not required you can specify either null or 0 as the parameter. FromResult returns an instance of the task class that you need as your return parameter.
... View more
01-27-2021
11:39 AM
|
1
|
0
|
1541
|
|
POST
|
You are using the 'ArcGIS Runtime SDK for .NET' and posted your question in the 'ArcGIS Pro SDK for .Net'. Slight difference in the name, but the APIs are very different. Kudos to Marteen, who knows both APIs, but in the future you will get better results if you post your questions under 'ArcGIS Runtime SDK for .NET'.
... View more
01-21-2021
06:37 AM
|
0
|
0
|
2750
|
|
POST
|
You could use a sorted dictionary to improve the search / selection performance. SortedDictionary<TKey,TValue> Class (System.Collections.Generic) | Microsoft Docs Also could potentially get better query performance results by creating an attribute column(s) index on you primary search columns. Needless to say this requires that you only search for attributes (including the county) and don't mix in a spatial search. However, in any case you want to keep your result set that you present to your users to a minimum, meaning that you don't want to show a list with a thousand result records to your user, instead you might want to ask for refinement of the query instead.
... View more
01-19-2021
10:23 AM
|
1
|
3
|
8119
|
|
POST
|
You can look at this sample: arcgis-pro-sdk-community-samples/Framework/RemoveAddins at master · Esri/arcgis-pro-sdk-community-samples (github.com)
... View more
01-19-2021
10:03 AM
|
0
|
0
|
4159
|
|
POST
|
Sorry about the delayed reply, I tried to check with the developers before responding. You are correct as to Project.Current.Guid doesn't return the documented: ''unique identifier for the item". I attached a project that provides a workaround for the desired unique project file identifier. In order to implement this I used the API's project's custom settings capability for that. In essence the attached add-in adds a custom setting to each project that is opened with the add-in running. However, there are a few caveats: The add-in has to be autoloaded in order to catch the project open events. The default JIT loading will not provide access to the first project open event. To do this you have to change the autoLoad property to 'true' as shown here: <insertModule id="TestProject_Module" className="Module1" autoLoad="true" caption="Module1"> The unique identifier created for each project will only be 'permanent' once the project is saved. This can be mitigated by saving the project programmatically in your add-in.
... View more
01-15-2021
07:44 AM
|
0
|
1
|
1795
|
|
POST
|
Sorry I about the delayed response, I didn't have enough time earlier to reply with a more general code snippet so I just posted the link real quick, but I see from your post above that you figured it out in the meantime.
... View more
01-12-2021
01:07 PM
|
0
|
0
|
5229
|
|
POST
|
You can take a look at this ProSnippet: https://github.com/Esri/arcgis-pro-sdk/wiki/ProSnippets-Geodatabase#obtaining-related-definitions-from-geodatabase
... View more
01-12-2021
11:07 AM
|
1
|
2
|
5273
|
|
POST
|
You can't replicate the Explore tool's feature selection functionality. The selection tolerance is in pixels and the actual selection in Pro works on the graphics level considering the visible size of the selected graphic items. Pro creates a buffer in pixels around the graphic items in the map view and then correlates them back to the feature owning the graphic. You can utilize the selection tool built into Pro (you can create your own tool button to customize the tool in your code) and then perform your workflow on the selection changed event.
... View more
01-12-2021
09:39 AM
|
0
|
1
|
1603
|
|
POST
|
ActiPro is the provider for the thirdparty UI controls that are used by ArcGIS Pro's internal UI framework. The ActiPro utilized by ArcGIS Pro cannot be used for UI development in Pro extensions (add-ins, configurations), however, you can use your own licensed version of ActiPro for your UI controls to deployed in add-ins. The Pro SDK includes some UI controls for use in extension development. There will be more controls added in the near future, but currently the list of supported controls can be found here: https://github.com/Esri/arcgis-pro-sdk/wiki/ProConcepts-Map-Authoring#ui-controls
... View more
01-11-2021
01:26 PM
|
0
|
0
|
1630
|
|
POST
|
Just an FYI, in case you were not aware of this. You can open any supported feature layer data source using the ArcGIS Pro SDK. This is the code: try
{
string url = @"C:\temp\Mobile\MobileSQLite.geodatabase\main.TestPoints";
Uri uri = new Uri(url);
await QueuedTask.Run(() => LayerFactory.Instance.CreateLayer(uri, MapView.Active.Map));
}
catch (Exception ex)
{
MessageBox.Show($@"Error: {ex}");
} You can create a layer in various ways: https://github.com/esri/arcgis-pro-sdk/wiki/ProSnippets-MapAuthoring#create-layer And from there you can display the tabular data and perform queries through the Pro SDK API.
... View more
01-11-2021
10:22 AM
|
0
|
0
|
2466
|
|
POST
|
I would suggest to used the ArcGIS Pro SDK instead: https://github.com/esri/arcgis-pro-sdk/wiki/ProSnippets-MapAuthoring#create-featurelayer-with-a-query-definition Just replace the URI with your online service path.
... View more
01-11-2021
10:05 AM
|
0
|
0
|
11018
|
|
POST
|
Hi Kirk, I reached out to the GeoDatabase team and it turns out that GDB_Items has a spatial column that requires the ST_Geometry extension to be loaded. I think you already mentioned that you downloaded the ST_geometry extension DLL from MyEsri, I haven't verified this yet, but the ST_Geometry library is named stgeometry_sqlite.dll (or, on Linux, libstgeometry_sqlite.so). You need to use "Tools | Load Extension ..." to load the extension in 'DB Browser'. The GeoDatabase team also mentioned that they are working on documentation describing the use of mobile geodatabases with 3rd party software pacakages and the ST_geometry.dll as part of the 2.8 release.
... View more
01-08-2021
10:23 AM
|
0
|
0
|
2498
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 10-29-2025 10:48 AM | |
| 1 | 05-24-2021 09:04 AM | |
| 1 | 12-03-2020 08:44 AM | |
| 1 | 10-07-2025 07:27 AM | |
| 2 | 12-29-2025 10:03 AM |
| Online Status |
Offline
|
| Date Last Visited |
05-21-2026
01:59 PM
|