|
POST
|
you should change what ever _you_ need to tell them apart - captions, images, text, etc., etc. Pro only needs the first three.
... View more
04-11-2022
10:02 AM
|
0
|
1
|
1872
|
|
POST
|
I recommend u change three things: The addin id, the module id, and the name of the assembly. Change all of these in the Config.daml. U can use something like https://www.guidgen.com/ to generate a new addin id. The module id is arbitrary. U can use anything u want as long as its different from the original. Ditto for the assembly name. Change defaultAssembly. <ArcGIS defaultAssembly="ProAppModule1.dll" ...>
<AddInInfo id="{0ccd96a6-029c-409e-9e97-d8f35e9f055d}" version="1.0" desktopVersion="2.3">
<Name>ProAppModule1</Name>
<Description>ProAppModule1 description</Description>
...
</AddInInfo>
<modules>
<insertModule id="ProAppModule1_Module" ...>
<!-- uncomment to have the control hosted on a separate tab-->
<tabs> U will also have to change the module id in your module code-behind file (eg Module1.cs, Module1.vb, etc) internal class Module1 : Module {
private static Module1 _this = null;
public static Module1 Current {
get {
return _this ?? (_this = (Module1)FrameworkApplication.FindModule("ProAppModule1_Module"));
}
} Last, change the assembly name in Visual Studio on the Application properties of your csproj/vbproj to match defaultAssembly.
... View more
04-11-2022
08:53 AM
|
0
|
3
|
1880
|
|
POST
|
can you make sure you have the following assemblies referenced in your addin: <ArcGIS Pro Install Folder>\bin\Microsoft.Web.WebView2.Core.dll <ArcGIS Pro Install Folder>\bin\Microsoft.Web.WebView2.Wpf.dll Then u should be able to access the webView2.CoreWebView2 property (and, from there, the cookie manager once CoreWebView2 is initialized) From https://github.com/esri/arcgis-pro-sdk/wiki/ProConcepts-Framework#webviewbrowser-control
... View more
04-06-2022
07:08 PM
|
0
|
3
|
7888
|
|
POST
|
QueuedTask.Run(() => {
var graphics_layers = MapView.Active.Map.GetLayersAsFlattenedList()
.OfType<GraphicsLayer>().ToList();
var graphics_layer_with_sel = graphics_layers
.Where(gl => gl.GetSelectedElements().Count > 0).ToList();
var feat_layers = MapView.Active.Map.GetLayersAsFlattenedList()
.OfType<BasicFeatureLayer>().ToList();
var feat_layer_with_sel = feat_layers
.Where(fl => fl.GetSelection().GetCount() > 0).ToList();
... View more
03-31-2022
07:20 AM
|
1
|
1
|
1263
|
|
POST
|
try something like this: var extent = new CIMExtentIndicator {
SourceMapFrame = "Main Map Frame",
Symbol = extentPoly.MakeSymbolReference(),
};
cimAOI.ExtentIndicators = new List<CIMExtentIndicator> { extent}.ToArray();
... View more
03-25-2022
03:08 PM
|
1
|
1
|
1643
|
|
POST
|
Ribbon controls defined in DAML are a bit different from _user_ controls defined in XAML (ie via WPF) as u mention. One possibility is to store a reference to the ribbon checkbox in your Module. U will also have to deal with the situation of a/the combo box being clicked before the checkbox on the ribbon has been loaded (ie Ribbon controls are typically null until they are clicked). Something like.... internal class Module1 : Module
{
private static Module1 _this = null;
//Capture the checkbox here
public CheckBox CheckBox { get; set; } = null;
//Eg a ribbon or "DAML" combo
internal class ComboBox1 : ComboBox {
...
protected override void OnSelectionChange(ComboBoxItem item) {
//have we been "made" before the checkbox?
if (Module1.Current.CheckBox == null)
//load it then
_ = FrameworkApplication.GetPlugInWrapper("ProAppModule1_CheckBox1");
//Check/Uncheck
Module1.Current.CheckBox.IsChecked = !Module1.Current.CheckBox.IsChecked;
...
//DAML Checkbox on the ribbon
internal class CheckBox1 : CheckBox {
public CheckBox1() {
//wire up the Module property
Module1.Current.CheckBox = this;
}
//handle on click for when the user _does_ actually click it
protected override void OnClick() {
//TODO - whatever u need to do to keep everything in-sync
//...
base.OnClick();
}
... View more
03-08-2022
12:08 PM
|
0
|
0
|
4973
|
|
POST
|
use the geometry spatial reference: https://pro.arcgis.com/en/pro-app/2.8/sdk/api-reference/#topic8178.html specifically, its Unit property. https://pro.arcgis.com/en/pro-app/2.8/sdk/api-reference/#topic8797.html In your case it sounds like it is of type LinearUnit.
... View more
03-05-2022
06:33 AM
|
0
|
2
|
1759
|
|
POST
|
this might help: https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/#topic72903.html
... View more
03-01-2022
11:49 AM
|
1
|
1
|
2957
|
|
POST
|
Only strong named assemblies are versioned in .NET. If your shared assembly is unsigned, as far as .NET is concerned its version is, effectively, 0.0.0.0. To strong name your assembly you will have to sign it.
... View more
02-16-2022
01:56 PM
|
1
|
0
|
1402
|
|
POST
|
i believe there is a LabelClasses collection property on the layer definition. I think all u need to do is set that. A label class also has a text symbol property I believe - so I think you could just set _that_ on the default classes if, similar to the issue with the renderer, the classes in the layer document are not equivalent to the data in the layer.
... View more
02-11-2022
03:59 PM
|
0
|
0
|
1555
|
|
POST
|
in your code snippet it looks like you set the labelling expression on the (default) label classes from "facLayer" without having set the label classes (imported from the CIMLayerDocument)....but maybe that's just in the code snippet and not in the real addin. Can you verify pls?
... View more
02-11-2022
03:44 PM
|
0
|
1
|
1560
|
|
POST
|
I see, then it would have to be done by hand then - as in, rebuild the renderer with the updated classes and current symbology. I can ask the mapping team if there is a way to extend Recalc renderer (or provide a new method) that can retain the current symbology.
... View more
02-11-2022
10:36 AM
|
1
|
0
|
2230
|
|
POST
|
can you try doing a RecalculateRenderer(false)....(use "true" if you can have more than 100 unique values and want them all in the legend)
... View more
02-11-2022
10:21 AM
|
0
|
0
|
2235
|
|
POST
|
The best way is to use the progressor argument of QueuedTask.Run https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/index.html#topic10996.html and the "built-in" Progressor class. Looking at the "Run" method definition can be a little intimidating because of the syntax associated with the delegate parameter (eg Func<T>, Func<Task<T>>, Action, etc) but if u notice, the second parameter is of type Progressor or CancelableProgressor. There are a couple of snippets here: non-cancelable: https://github.com/esri/arcgis-pro-sdk/wiki/ProSnippets-Framework#progressor---simple-and-non-cancelable and cancelable (which is a little more work): https://github.com/esri/arcgis-pro-sdk/wiki/ProSnippets-Framework#progressor---cancelable In your case, based on the "simple-and-non-cancelable" snippet referenced above, you would want something like this (please note the comment regarding the Debugger - in other words when you are debugging your addin in Visual Studio you will **not** see the progressor ) private async void BtnRun_Click(object sender, RoutedEventArgs e) {
sdePath = TboxPath.Text;
//....etc
//make a progressor
var ps = new ArcGIS.Desktop.Framework.Threading.Tasks.ProgressorSource(
"Doing my thing...", false);
//Run layer create and show a progressor
//NOTE: when you run this in the DEBUGGER you will NOT see the dialog
await QueuedTask.Run(() => {
Layer lyr = LayerFactory.Instance.CreateLayer(uri, MapView.Active.Map,
lyrIndex, lyrName);
}, ps.Progressor);
}
... View more
01-28-2022
07:32 AM
|
0
|
0
|
2259
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 05-19-2026 10:29 AM | |
| 1 | 04-29-2026 02:06 PM | |
| 1 | 01-08-2026 02:03 PM | |
| 1 | 01-08-2026 02:15 PM | |
| 3 | 12-17-2025 11:33 AM |
| Online Status |
Offline
|
| Date Last Visited |
05-31-2026
09:30 AM
|