POST
|
Hi Brandon, Please take a look at this thread https://community.esri.com/message/656103-re-different-add-ins-on-same-custom-ribbon-tab - especially the last reply has some helpful links to supporting documentation and samples for you. - Wolf
... View more
01-02-2017
10:35 AM
|
0
|
0
|
432
|
POST
|
Hi Rich, Good find by Charles to see the spelling error, however, the name crosshair could imply that you expect the png to be used as the tool's cross hair icon. After you correct the spelling of the image and set the image property's "Build Action" to "AddinContent", you should see the icon in the tool gallery like in my sample of a construction tool below. Just to make sure though: this is not the crosshair icon the tool is using over the map view once the tool has been activated.
... View more
12-30-2016
08:21 AM
|
1
|
0
|
1006
|
POST
|
Hi Andres, Yes, the reference document is here: https://github.com/Esri/arcgis-pro-sdk/wiki/ProConcepts-Framework#introduction-to-daml-desktop-application-markup-language I think the syntax to add your button to an already existing group goes like this: <updateModule refID="module id of your first add-in">
<groups>
<updateGroup refID="group id of your first add-in that you like to add your button">
<insertButton refID="id of the new button defined in this add-in"></insertButton>
</updateGroup>
</groups>
</updateModule> I also just remembered a way to debug the 'combined' daml once you published your add-in. You can use the following command line: https://github.com/esri/arcgis-pro-sdk/wiki/ProGuide-Command-lines-switches-for-ArcGISPro.exe#view-the-daml-elements-loaded-at-startup
... View more
12-28-2016
01:36 PM
|
2
|
0
|
2015
|
POST
|
Hi Andres, First you need to make sure all your add-ins are working properly, and you can test this by clearing your add-ins (from the well known folder location) before you rebuild each add-in separately and then test it. Next you need to make sure that you know the add-in loading sequence. Currently the loading sequence is determined by the value of the "id" attribute under the "AddInInfo" tag in the "config.daml" file. In my example below that value starts with f0f7... <ArcGIS defaultAssembly="test1.dll" defaultNamespace="test1" xmlns="http://schemas.esri.com/DADF/Registry" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemas.esri.com/DADF/Registry file:///C:/Program%20Files/ArcGIS/Pro/bin/ArcGIS.Desktop.Framework.xsd">
<AddInInfo id="{f0f70f07-0579-4df7-9a47-570c46c3aa5b}" version="1.0" desktopVersion="1.3.0">
<Name>test1</Name>
<Description>test1 description</Description>
<Image>Images\AddinDesktop32.png</Image>
<Author>Wolfgang</Author>
... The lower "id" values are loaded first, so if I have a second add-in with a value that starts with b0f... which means that my "test2" add-in is always loaded first because of it's lower "id" value. Note: if you want to change the "id" value you have to change the same value in "AssemblyInfo.cs" as well. Because test2 is loaded first test2 elements are the only elements I see on the newly added tab. When test1 is loaded it is trying to add an already existing tab and consequently none of the test1 elements are seen on the UI. <ArcGIS defaultAssembly="Test2.dll" defaultNamespace="Test2" xmlns="http://schemas.esri.com/DADF/Registry" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemas.esri.com/DADF/Registry file:///C:/Program%20Files/ArcGIS/Pro/bin/ArcGIS.Desktop.Framework.xsd">
<AddInInfo id="{b0f89d8e-66fb-4509-bcb1-14d7fe0b8eba}" version="1.0" desktopVersion="1.3.0">
<Name>Test2</Name>
<Description>Test2 description</Description>
<Image>Images\AddinDesktop32.png</Image>
<Author>Wolfgang</Author>
... So now I know that my test2 add-in loads first, therefore I don't change anything in test2. However, test1, which is loaded second, needs to be modified: Instead of creating a tab and adding my 'group' to that tab I now use the "updateModule" tag in my daml to make an "update" to my "test2" module's UI. We have a sample that shows how to update existing items on the ribbon here: WorkingWithDAML. In short I made the following addition at the end of my "test1" "config.daml" file: ...
</controls>
</insertModule>
<updateModule refID="Test2_Module">
<tabs>
<updateTab refID="test_Tab">
<insertGroup refID="test1_Group1" insert="before"></insertGroup>
</updateTab>
</tabs>
</updateModule>
</modules>
</ArcGIS> The DAML change I made here updates my Test2_Module's UI (test2 is my add-in that is loaded first) by adding a new group to the already existing tab called test_Tab. So now my two add-ins appear on the same Test ribbon as can be seen here:
... View more
12-28-2016
09:56 AM
|
3
|
3
|
2015
|
POST
|
Hi Richard, This sample might help: https://github.com/Esri/arcgis-pro-sdk-community-samples/blob/master/Map-Exploration/BasicMapTool it is displaying the clicked on coordinates. And this samples has a combo box for the selection of a specific layer: https://github.com/Esri/arcgis-pro-sdk-community-samples/tree/master/Map-Exploration/IdentifyWindow Hope this helps.
... View more
12-27-2016
01:15 PM
|
0
|
0
|
2189
|
POST
|
Yes there is a step missing: after your step 3. you have to change the "Build Action" (under all image properties) to "AddInContent".
... View more
12-13-2016
07:29 PM
|
4
|
1
|
780
|
POST
|
Hi Jan, I misunderstood the original question, even with the updated sample the 'Contents' dockpane's TOC is 'emptied' when the 'Pane' is activated. Sorry about the confusion. So Charlie's answer from above stands: currently this feature is not supported.
... View more
11-17-2016
03:35 PM
|
1
|
0
|
1963
|
POST
|
Hi Jan, I updated the Layer Pane sample which I think does what you need: https://github.com/Esri/arcgis-pro-sdk-community-samples/tree/master/Map-Authoring/LayersPane Can you check the sample and see if it satisfies your workflow needs?
... View more
11-07-2016
09:11 AM
|
1
|
2
|
1963
|
POST
|
Hi Collin, I configured a system using the configuration you listed: VS Community 2015 Update 3, Win 10 Pro, and Pro 1.3. I have no problems debugging and running (without debugger) the sample code from your original email. I don't think the problem you are seeing has anything to do with Pro 1.3. Unfortunately there can be various other issues that prevent you from debugging like video drivers, security policy, custom system configuration (like custom well-known folder locations) and more. I would recommend trying to reinstall VS 2015 once more and if that doesn't help contact Esri support.
... View more
11-06-2016
11:59 AM
|
0
|
4
|
685
|
POST
|
I it tried on Win 10 - Pro - anniversary edition - VS 2015 - update 3 and both Pro 1.3 (release) and 1.4 (7008). The sample code from above works fine (I had to change the namespace to match my newly created add-in's namespace). Not sure what versions Collin is using.
... View more
11-03-2016
01:06 PM
|
0
|
1
|
1710
|
POST
|
Collin, I enhanced your 'simple button' add-in a bit using the code snippet below and was able to debug and run the add-in without problems. I think the main issue was that the IDisposable object returned by AddOnOverlay has to be maintained since the added overlay is removed from the mapview when that object is disposed. The code below uses the button click to add a polygon to the overlay and then removes the same polygon on the next button click. I hope this snippet will work for you. using System;
using System.Collections;
using System.Collections.Generic;
using System.Threading.Tasks;
using ArcGIS.Core.CIM;
using ArcGIS.Desktop.Framework.Contracts;
using ArcGIS.Core.Geometry;
using ArcGIS.Desktop.Framework.Dialogs;
using ArcGIS.Desktop.Framework.Threading.Tasks;
using ArcGIS.Desktop.Mapping;
namespace ProAppModule2
{
internal class Button1 : Button
{
private IList<IDisposable> _addOns = new List<IDisposable>();
protected override async void OnClick()
{
//testen
try
{
// clear any geometries on overlay
if (_addOns.Count > 0)
{
foreach (var addOn in _addOns) addOn.Dispose();
_addOns.Clear();
MessageBox.Show("Overlay clear");
}
else
{
var symbol = OverlaySymbol;
await QueuedTask.Run(() =>
{
Envelope env = Geom.Result;
Polygon poly = PolygonBuilder.CreatePolygon(env);
_addOns.Add(MapView.Active.AddOverlay(poly, symbol.Result));
MessageBox.Show("toegevoegd: " + Geom + " json: " + env.ToJson() + env.GeometryType);
MapView.Active.ZoomTo(env);
});
MessageBox.Show("zoomed");
}
}
catch (Exception ex)
{
MessageBox.Show("FOUTJE: " + ex.ToString());
}
}
private Task<Envelope> Geom
{
get
{
return QueuedTask.Run(() =>
{
var test =
"{ \"xmin\" : 1, \"ymin\" : 2,\"xmax\":3,\"ymax\":4,\"spatialReference\":{\"wkid\":4326}}";
return GeometryEngine.ImportFromJSON(JSONImportFlags.jsonImportDefaults, test) as Envelope;
});
}
}
private Task<CIMSymbolReference> OverlaySymbol
{
get
{
return QueuedTask.Run(() =>
{
CIMStroke outline = SymbolFactory.ConstructStroke(ColorFactory.BlackRGB, 2.0, SimpleLineStyle.Solid);
CIMPolygonSymbol fillWithOutline = SymbolFactory.ConstructPolygonSymbol(ColorFactory.RedRGB,
SimpleFillStyle.Solid, outline);
return fillWithOutline.MakeSymbolReference();
});
}
}
}
}
... View more
11-01-2016
08:53 AM
|
1
|
1
|
1710
|
POST
|
Hi Issa, You should be able to use this sample: https://github.com/Esri/arcgis-pro-sdk-community-samples/tree/master/Map-Exploration/CustomIdentify . You have to change the SketchType to Point and use the logic in the OnSketchCompleteAsync method to get your feature classes and Ids. I hope this helps, note: I fixed the bad link 😞
... View more
10-29-2016
06:22 PM
|
0
|
2
|
1095
|
POST
|
There is also the "Pro Generate DAML Id" utility described here: Arcgis Pro SDK for .Net utilities. This utility allows generating a source file in your add-in project that contains DAML Ids for all plug-ins. DAML ids are organized by type and the DAML Id string usually describes the purpose of the associated pug-in. Once you generate a DAML Id source file, you can then reference the DAML Id through a constant using Visual Studio IntelliSense and avoid misspelled Ids. This sample illustrates the DAML Id usage: HookProCommands
... View more
10-20-2016
03:51 PM
|
1
|
0
|
1771
|
POST
|
Hi Horia, It looks like the designer of the Pro Framework's message box didn't take large amounts of text into account. We will have the dev team take a look at that. However, I have a solution in regards to your item 3) 3. Content cannot be highlighted and/or copied to the clipboard If your messagebox window has system focus, you can use the Ctrl+C (copy command) to copy the content of the message box to the clipboard. It appears that all text on the messagebox (even if it's clipped by the display) is copied to the clipboard. This is the same feature that exists in the Window's system message box control.
... View more
10-12-2016
02:23 PM
|
1
|
1
|
1409
|
POST
|
Hi JB, The ArcGIS.Core.Data API is a DML-only (Data Manipulation Language) API. Schema creation and modification are preformed using the Geoprocessing API. You can find a sample on how to call a Geoprocessing task from the API here: https://github.com/Esri/arcgis-pro-sdk-community-samples/tree/master/Geodatabase/AddDeleteFieldToFromFeatureClass To create a File Geodatabase you can use this (button add-in) code snippet: protected override async void OnClick()
{
var bCreated = await ExecuteAddFileGDB(@"c:\temp\test", @"MyNewFileGDB");
if (bCreated) MessageBox.Show("File GDB Created");
}
private async Task<bool> ExecuteAddFileGDB(string fileGdbPath, string fileGdbName)
{
try
{
return await ArcGIS.Desktop.Framework.Threading.Tasks.QueuedTask.Run(() =>
{
var fGdbPath = fileGdbPath;
var fGdbName = fileGdbName;
var fGdbVersion = "Current"; // create the 'latest' version of file Geodatabase
System.Diagnostics.Debug.WriteLine($@"create {fGdbPath} {fGdbName}");
var parameters = Geoprocessing.MakeValueArray
(fGdbPath, fGdbName, fGdbVersion);
var cts = new CancellationTokenSource();
var results = Geoprocessing.ExecuteToolAsync("management.CreateFileGDB", parameters, null, cts.Token,
(eventName, o) =>
{
System.Diagnostics.Debug.WriteLine($@"GP event: {eventName}");
});
return true;
});
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
return false;
}
}
... View more
10-10-2016
10:01 AM
|
1
|
0
|
1380
|
Title | Kudos | Posted |
---|---|---|
1 | 01-26-2023 01:46 PM | |
1 | 01-03-2025 12:12 PM | |
1 | 11-07-2024 07:56 AM | |
1 | 06-03-2020 09:11 AM | |
1 | 11-27-2023 10:24 AM |
Online Status |
Online
|
Date Last Visited |
01-14-2025
07:21 AM
|