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
|
719
|
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
|
1766
|
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
|
1766
|
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
|
624
|
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
|
1551
|
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
|
1551
|
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
|
1031
|
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
|
1574
|
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
|
1290
|
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
|
1263
|
POST
|
Windows 8, 64 bit, ArcMap 10.4.1 and Visual Studio 2013 Pro is a supported configuration for the installation of the .Net SDK of ArcObjects 10.4. Please double check your configuration and if that doesn't resolve your issue please contact Esri support.
... View more
10-02-2016
10:15 PM
|
0
|
0
|
739
|
POST
|
The main intend for the desktopVersion attribute is ensure add-in compatibility with Pro. The version ensures that you are not using an add-in with an old version of Pro (let's say 1.2), when the add-in was built using a newer version of Pro (let's say 1.3 or 1.4 beta). The old 1.2 version of Pro cannot run the 1.3 add-in because the 1.3 API changed (was added on to) and has additional functionality.
... View more
09-22-2016
10:56 AM
|
0
|
0
|
990
|
POST
|
Hi Ted, To change the target version you have to change the desktopVersion attribute of the AddInInfo tag in your config.daml file. You can replace your current desktopVersion value with "1.3".
... View more
09-22-2016
09:47 AM
|
0
|
2
|
990
|
POST
|
Hi Ted, I updated the sample @ https://github.com/Esri/arcgis-pro-sdk-community-samples/tree/master/Framework/ProgressDialog and added a progress dialog that iterates through a given number of steps as shown in my post above (see the readme.md for a screenshot of this functionality).
... View more
07-15-2016
11:53 AM
|
1
|
0
|
445
|
POST
|
Hi Ted, I you use the sample @ https://github.com/Esri/arcgis-pro-sdk-community-samples/tree/master/Framework/ProgressDialog and make the update below in the "RunDialogButtonsCancel" class you will get the desired effect. I will update the sample soon to reflect this capability. The trick is to create your own ProgressDialog instance and specify the 'maximum steps' parameter. protected override async void OnClick() { //If you run this in the DEBUGGER you will NOT see the dialog uint maxSteps = 5; var pd = new ArcGIS.Desktop.Framework.Threading.Tasks.ProgressDialog( "Doing my thing - cancelable", "Canceled", maxSteps, false); await ProgressDialogModule.RunCancelableProgress( new CancelableProgressorSource(pd), maxSteps); }
... View more
07-15-2016
11:01 AM
|
1
|
0
|
445
|
Title | Kudos | Posted |
---|---|---|
1 | 06-03-2020 09:11 AM | |
1 | 11-27-2023 10:24 AM | |
1 | 04-13-2023 03:09 PM | |
1 | 07-22-2024 03:36 PM | |
1 | 05-24-2024 10:13 AM |
Online Status |
Offline
|
Date Last Visited |
Tuesday
|