|
POST
|
You can use Pro commands to accomplish this task. To reuse existing Pro commands (like showing the catalog dockpane or view) you can use the following pattern (copied from a sample button command): protected override void OnClick()
{
ExecuteProCommand("esri_core_showProjectView");
ExecuteProCommand("esri_core_showProjectDockPane");
}
/// <summary>
/// Generic implementation of ExecuteCommand to allow calls to
/// execute any Pro command / tool by using its Id
/// </summary>
/// <param name="proPluginId">Pro ID (command/tool) to run</param>
/// <returns></returns>
private static void ExecuteProCommand(string proPluginId)
{
var command = FrameworkApplication.GetPlugInWrapper(proPluginId) as ICommand;
if (command == null || !command.CanExecute(null)) return;
command.Execute(null);
} Here is some documentation on this subject: https://github.com/Esri/arcgis-pro-sdk/wiki/ProGuide-Reusing-Pro-Commands
... View more
06-14-2021
03:35 PM
|
1
|
0
|
2360
|
|
POST
|
I attached my sample To implement the sample i added a property sheet (via New Project Item template) and then used you updateSheet daml above to show the property sheet (that i created) under the layout properties dialog . I didn't delete the auto-inserted propertysheet daml yet (for illustration). Note: in the config.daml of the sample please check the desktopVersion="2.9...." attribute for the AddInInfo tag. Make sure to set it to the version of ArcGIS Pro that you are running: i.e. 2.7.0, 2.6.0 .... Otherwise the sample won't work for you.
... View more
06-11-2021
09:03 AM
|
1
|
1
|
2468
|
|
POST
|
Look in the config.daml which contains the markup for the Pro UI. First you should check the desktopVersion="2.9...." attribute for the AddInInfo tag. Make sure to set it to the version of ArcGIS Pro that you are running: i.e. 2.7.0, 2.8.0 .... Second you can set the 'appearsOnAddInTab' for either the button or the group to true (or false if you want to use your own ribbon tab). If you set 'appearsOnAddInTab' to false you have to make sure to add the button to a group on your ribbon tab. This YouTube video gives an overview: (512) ArcGIS Pro SDK for .NET: Working With DAML - YouTube some DAML documentation on the Pro SDK wiki: ProConcepts Framework · Esri/arcgis-pro-sdk Wiki (github.com)
... View more
06-10-2021
04:25 PM
|
1
|
1
|
6412
|
|
POST
|
Run the Visual Studio Installer and click on Modify (I am running Professional .. hopefully that's the same on Community Edition). Make sure to check under 'Installation Details' that the .NET Framework 4.8 checkbox is checked:
... View more
06-09-2021
02:12 PM
|
1
|
3
|
2747
|
|
POST
|
Unfortunately the underlying API doesn't return detailed error messages depending on the data source that is used for editing. I will forward this post to the ArcGIS Pro's Dev Team to re-iterate that this is an issue.
... View more
06-09-2021
09:54 AM
|
1
|
0
|
1931
|
|
POST
|
I think the problem is caused when you assign a string data type to a date field. Try to assign a DateTime type to date fields.
... View more
06-09-2021
08:05 AM
|
0
|
1
|
1940
|
|
POST
|
I attached a sample project that shows a simple tool to select a point feature and then displays the attributes for that feature in a custom dockpane that is displayed. I will add this to the community samples for 2.9, i think this is very useful. Thanks.
... View more
06-08-2021
07:51 AM
|
2
|
5
|
6448
|
|
POST
|
I attached a sample project that runs a console app. This how you set the properties for the exe that has to be included in your esriaddinx file: The project is for ArcGIS Pro 2.8, but you can change that in the config.daml to an earlier version:
... View more
06-07-2021
10:43 AM
|
1
|
2
|
5226
|
|
POST
|
Here is a document showing how to add content to an esriaddinx file and then accesses that custom content during runtime. ProGuide Content and Image Resources · Esri/arcgis-pro-sdk Wiki (github.com) and a similar question was posted here: Re: Adding Files to esriAddinX - Esri Community
... View more
06-07-2021
08:51 AM
|
0
|
1
|
5234
|
|
POST
|
Here is the tool in code. To try this out take the code snippet and replace the OnClick method of a 'test' button in your test add-in. Then change the fcName variable to match a feature class or feature dataset in your data. protected override async void OnClick()
{
try
{
var fcName = $@"TestDataset"; // use either a feature class or a feature dataset
var createdBy = "CreatedBy";
var createdOn = "CreatedOn";
var modifiedBy = "ModifiedBy";
var modifiedOn = "ModifiedOn";
// use the default geodatabase
var gdbPath = CoreModule.CurrentProject.DefaultGeodatabasePath;
var fcFullSpec = System.IO.Path.Combine(gdbPath, fcName);
List<object> arguments = new List<object>
{
fcFullSpec, // Input dataset
createdBy, // Creator Field
createdOn, // Creation Date Field
modifiedBy, // Last Editor Field
modifiedOn, // Last Edit Date Field
true // Add fields
};
var r = await Geoprocessing.ExecuteToolAsync("EnableEditorTracking_management", Geoprocessing.MakeValueArray(arguments.ToArray()));
if (r.IsFailed)
{
MessageBox.Show($@"ExecuteToolAsync failed {string.Join(Environment.NewLine, r.ErrorMessages.Select(e => e.Text).ToArray())}");
}
MessageBox.Show ($@"{fcName} Enabled for Editor Tracking: {r.ReturnValue}");
}
catch (Exception ex)
{
MessageBox.Show($@"Exception: {ex}");
}
} I used this snippet to turn this empty feature class into this edit tracking enabled version: Then i did the same for a feature dataset: and this enabled all feature classes in my feature dataset:
... View more
06-04-2021
04:36 PM
|
1
|
0
|
2983
|
|
POST
|
The .esriAddinX is a zip file and gets unzipped when ArcGIS Pro starts. Run ArcGIS pro and double check the folder content after Pro started.
... View more
06-04-2021
11:25 AM
|
1
|
0
|
4010
|
|
POST
|
I think I don't understand, the tool works for me: then I get this result with the fields added: I you want this to work on a whole dataset instead of just one feature class (or table) you have to iterate through all feature classes in that dataset and perform the action on each feature class.
... View more
06-04-2021
11:17 AM
|
0
|
2
|
2993
|
|
POST
|
You can look at the 'Chromium Web Browser Control' community sample which implements references to various embedded resources, however, it passes the content to a Chromium web browser control: arcgis-pro-sdk-community-samples/Framework/ChromiumWebBrowserSample at master · Esri/arcgis-pro-sdk-community-samples (github.com) I modified and attached that sample to include a local html file - I followed the instructions from my link listed in my previous post. When you run the sample you can duplicate your use case with the add-in like this:
... View more
06-04-2021
10:45 AM
|
1
|
0
|
4011
|
|
POST
|
You have to use a GP tool to 'Enable Editor Tracking', you can call the tool from the API:
... View more
06-04-2021
08:20 AM
|
0
|
1
|
3036
|
|
POST
|
Do you include your HTML help file in your add-in? If so did you follow these conventions: ProGuide Content and Image Resources · Esri/arcgis-pro-sdk Wiki (github.com) Otherwise please provide a code snippet with you file path logic.
... View more
06-04-2021
08:09 AM
|
1
|
5
|
4089
|
| 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
|