|
POST
|
Hi M, I you can publish a code snippet that you suspect of not working the same I will try the snippet in both versions and let you know if there's an issue. Thanks, Wolf
... View more
07-16-2018
01:03 PM
|
0
|
6
|
2265
|
|
POST
|
Hi Devon, You are showing a Dialog (as the method says). Dialogs are always 'modal' meaning these windows are subordinate to an application's main window which creates a mode where the main window can't be used. So I suggest that you use a Dockpane for your workflow. Check out our community samples (most have screen shots) to see something that is most fitting to your workflow. - Wolf
... View more
05-15-2018
02:33 PM
|
0
|
1
|
1557
|
|
POST
|
Hi Max, If I understand you correctly you are trying to run an add-in built using 2.1.2 under ArcGIS Pro 2.0. If so then the following rules apply: Add-ins and configurations are forwards compatible across all minor versions of ArcGIS Pro. Add-ins and configurations are not forward compatible across major versions (eg 2.x, 3.x, etc). Add-ins and configurations are not backwards compatible across any versions of ArcGIS Pro. You can read more about add-in versioning here: https://github.com/ArcGIS/arcgis-pro-sdk/wiki/ProConcepts-Advanced-Topics#add-in-versioning - Wolf
... View more
05-13-2018
08:10 PM
|
0
|
0
|
742
|
|
POST
|
Hi Richard, I have 2.1.2 of Pro installed and tried the 'Basic Map tool example from GitHub' and it worked fine without any problems. I assume at this point that your add-in problems are caused by some workflow related issues in your custom add-in code. Without a code sample of the offending snippet we can't get to the source of the problem. Maybe you can comment out portions of your code until you see the add-in work again. This should give you an idea as to the offending code snippet.
... View more
05-01-2018
03:42 PM
|
0
|
0
|
638
|
|
POST
|
Hi Fayu, Just to clarify there is no IMxDocument, but there is the MapView class which might give you what you need. If you use MapView.Active you will get the current active MapView, or null if there is no Map View open. Once you have the active MapView you can look at the Camera property to get the location in 2D where the camera defines its viewing location using X and Y. This will be the center point of the 2D view’s extent. Hope this helps. Wolf
... View more
04-26-2018
08:56 PM
|
0
|
0
|
1118
|
|
POST
|
You can start looking at this style guide for the look and feel: https://github.com/esri/arcgis-pro-sdk/wiki/proguide-style-guide
... View more
03-28-2018
08:45 AM
|
0
|
6
|
3739
|
|
POST
|
Hi M, A slightly different workaround: Since the problem does not exist for add-ins you can actually create the context menu in a separate add-in until the problem is fixed in configurations. Your configuration can still take advantage of the context menu even if it exists as a separate add-in. Wolf
... View more
03-27-2018
02:17 PM
|
0
|
0
|
649
|
|
POST
|
Hi M, Your code snippet renames the caption of the pane. If you execute our code snippet you see the pane caption (displayed in the tab) is actually updated. However, a right click 'rename' in Catalog will update the Map object. There is a SetName method to update the name of the map: http://pro.arcgis.com/en/pro-app/sdk/api-reference/#topic11891.html QueuedTask.Run(() => {
MapView.Active.Map.SetName("Test");
});
... View more
03-02-2018
11:24 AM
|
1
|
0
|
1374
|
|
POST
|
Hi Zoltan, This workflow is now a bit more complicated because you have to use a GP Tool to create a new feature class, and then you can add that feature class as a layer to your group in your map's content. Below is a code snippet that will do this - I collected the code from various ArcGIS Pro SDK community samples. Just create a new project with a blank map, add a button with the code below and it should add a group and your new feature layer within that group. Since the GPTool also creates a new feature layer in your map you need to remove that feature layer since it's now in the new group. using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ArcGIS.Core.Data;
using ArcGIS.Core.Geometry;
using ArcGIS.Desktop.Core;
using ArcGIS.Desktop.Core.Geoprocessing;
using ArcGIS.Desktop.Framework;
using ArcGIS.Desktop.Framework.Contracts;
using ArcGIS.Desktop.Framework.Dialogs;
using ArcGIS.Desktop.Framework.Threading.Tasks;
using ArcGIS.Desktop.Mapping;
namespace ProAppModule1
{
internal class Button1 : Button
{
protected override void OnClick()
{
MakeFeatureClassInAdd2Group("MyPoints", "MyGroup");
}
private async void MakeFeatureClassInAdd2Group (string fcName, string grpName)
{
Map activeMap = MapView.Active.Map;
// create the new Featureclass
var gpResult = await CreateLayer(fcName, "POINT");
if (gpResult.IsFailed)
{
MessageBox.Show($@"Error {gpResult.ErrorCode} in GP Tool: {gpResult.ErrorMessages}");
}
await QueuedTask.Run(() => {
// create the group layer
GroupLayer grpNew = LayerFactory.Instance.CreateGroupLayer(activeMap,
0, // add to the top ?
grpName);
// add the newly created feacture class as a layer to the group
var fcPath = System.IO.Path.Combine(Project.Current.DefaultGeodatabasePath, fcName);
LayerFactory.Instance.CreateFeatureLayer(
new Uri(fcPath),
grpNew,
layerName: $@"{fcName} - 1");
});
// TODO: delete the layer which was added by the GPTool
}
/// <summary>
/// Create a feature class in the default geodatabase of the project.
/// </summary>
/// <param name="featureclassName">Name of the feature class to be created.</param>
/// <param name="featureclassType">Type of feature class to be created. Options are:
/// <list type="bullet">
/// <item>POINT</item>
/// <item>MULTIPOINT</item>
/// <item>POLYLINE</item>
/// <item>POLYGON</item></list></param>
/// <returns>Result of GP operation</returns>
private async Task<IGPResult> CreateLayer(string featureclassName,
string featureclassType)
{
List<object> arguments = new List<object>
{
CoreModule.CurrentProject.DefaultGeodatabasePath, // use the default geodatabase
featureclassName, // name of the feature class
featureclassType, // type of geometry
"", // no template
"DISABLED", // no z values
"DISABLED" // no m values
};
await QueuedTask.Run(() =>
{
arguments.Add(SpatialReferenceBuilder.CreateSpatialReference(3857)); // Projected Coordinate System WGS 1984 Web Mercator Auxiliary Sphere
});
return await Geoprocessing.ExecuteToolAsync("CreateFeatureclass_management", Geoprocessing.MakeValueArray(arguments.ToArray()));
}
}
}
... View more
02-15-2018
01:11 AM
|
2
|
1
|
2277
|
|
POST
|
Hi Brian, You can also find some documentation on DAML load dependencies in the ArcGIS Pro SDK Wiki here: https://github.com/Esri/arcgis-pro-sdk/wiki/ProConcepts-Advanced-Topics#control-order-of-loading-using-daml - Wolf
... View more
02-14-2018
09:43 AM
|
1
|
0
|
4520
|
|
POST
|
Hi Mike, There is an example dealing with MapViews here: https://github.com/Esri/arcgis-pro-sdk-community-samples/tree/master/Framework/OpenMapViews The code snippet below finds any map view pane with a given caption and brings the first matching one to the foreground (by calling .Activate()). var mapPanes = ProApp.Panes.OfType<IMapPane>();
foreach (Pane pane in mapPanes)
{
if (pane.Caption == "Your map view's caption")
{
pane.Activate();
break;
}
}
... View more
02-12-2018
12:41 PM
|
2
|
1
|
1215
|
|
POST
|
I didn't try your sample, however, Buttons on the ArcGIS Pro ribbon are usually tied to a 'Condition' (which in turn is tied to a State in ArcGIS Pro). You can read more about that here: https://github.com/Esri/arcgis-pro-sdk/wiki/ProGuide-Buttons. You can try to override your GPS button's condition by addition the following attribute to your 'button' tag in the config.daml: condition="esri_mapping_openProjectCondition" This condition should always be true as long as a Project is open, meaning your button should be enabled when a project is open. Here is an example with the condition attribute in the last line: <button id="WorkwithProjects_WorkWithProjects_ShowButton"
caption="Show Work With Projects" className="WorkWithProjects_ShowButton"
loadOnClick="true" keytip="W1"
smallImage="Images\Dino16.png" largeImage="Images\Dino32.png"
condition="esri_mapping_openProjectCondition" > Conditions are defined here: https://github.com/Esri/arcgis-pro-sdk/wiki/Condition-DAML-ID-Reference
... View more
02-08-2018
08:38 AM
|
2
|
0
|
2252
|
|
POST
|
Hi Caleb, Maybe I didn't properly duplicate your steps, but I tried to duplicate your issue using the "FeatureTest" data from the sample dataset here: https://github.com/Esri/arcgis-pro-sdk-community-samples/releases and I was not able to duplicate the problem. If I understand you correctly, you select a feature at scale as shown on this screenshot: then you use the 'zoom to selection' method to zoom in closer and your selection geometry doesn't line up properly with the 'real' geometry. in this screenshot my 'selection' geometry matches the 'real' geometry exactly (even so the base map doesn't match my outline). Maybe you can download the 'FeatureTest' sample dataset and try your use case using the polygon layer in that dataset.
... View more
02-02-2018
04:44 PM
|
0
|
0
|
985
|
|
POST
|
Hi Samantha, I tried this as well and came up with a solution that works. The problem was in the parameters that the tool supports. In essence the first parameter turns out to be a 'map member'. In essence Mapmember is a feature layer in your active map. In my sample I am still using the construction tool to add a point (line or polygon). I am using the 'CurrentTemplate' property of the MapTool base class to get the MapMember for which I just added my point (adding a new construction tool gives you the code for adding a new feature out-of-box for that). After the point has been added to the feature class (make sure it's an empty feature class) I call the code snippet below to add the rings. If you run the Multiple Ring Buffer tool manually and you add a simple point, you will see (via the content pane) that the GP tool create and then added a new Mapmember to you map's content. It then uses the scratch feature class that as the input for the tool. Also some of your other parameters needed some adjustment as well. The sample below also shows how to view the result message (or errors). protected async Task<string> CreateRings(EditingTemplate currentTemplate)
{
var valueArray = await QueuedTask.Run(() =>
{
return Geoprocessing.MakeValueArray(currentTemplate.MapMember.Name,
@"C:\Data\FeatureTest\FeatureTest.gdb\Points_MultipleRingBuffer",
new List<string> { "1000", "2000" }, "Meters", "Distance",
"ALL", "FULL");
});
IGPResult gpResult = await Geoprocessing.ExecuteToolAsync("Analysis.MultipleRingBuffer", valueArray);
return string.IsNullOrEmpty(gpResult.ReturnValue)
? $@"Error in gp tool: {gpResult.ErrorMessages}"
: $@"Ok: {gpResult.ReturnValue}";
} I used the sample snippet on the sample data 'FeatureTest' and got this result:
... View more
02-02-2018
12:03 PM
|
0
|
0
|
2360
|
|
POST
|
Hi Drew, If you want to add an image for your add-in buttons you have to change the 'Build Action' for each image to 'AddInContent'. You can do that through the image property pane in your solution as shown here: ProGuide-Diagnosing-ArcGIS-Pro-Add-ins
... View more
09-15-2017
09:24 AM
|
4
|
3
|
10671
|
| 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 |
03-30-2026
03:25 PM
|