|
POST
|
You can make an add-in with buttons for your own zoom functionality. Here is the sample button code to step down the scale: protected override void OnClick()
{
// get the active mapview
MapView activeMapView = MapView.Active;
if (activeMapView == null) return;
// note that MapView.ZoomIn must be called on the MCT
QueuedTask.Run(() =>
{
// get the original camera position
var camera = activeMapView.Camera;
// lower the scale
var scale = camera.Scale - 1.0;
var sScale = $@"{scale:0}";
sScale = sScale.Substring(0, 1).PadRight(sScale.Length).Replace(' ', '0');
var nextLowerScale = double.Parse(sScale);
camera.Scale = nextLowerScale;
// zoom in
activeMapView.ZoomTo(camera);
});
} Please note that working with scale(s) in only relevant in 2D maps.
... View more
12-06-2019
08:15 AM
|
0
|
0
|
1476
|
|
POST
|
For completeness: we also added some samples that show how to combine plugin datasources with project custom items in order to integrate your plugin data source into the ArcGIS Pro catalog browsing experience: https://github.com/Esri/arcgis-pro-sdk-community-samples/tree/master/Plugin
... View more
12-05-2019
10:54 AM
|
1
|
0
|
2202
|
|
POST
|
You could listen to the Project Items changed event: ProjectItemsChangedEvent.Subscribe((args) =>
{
System.Diagnostics.Debug.WriteLine($@"{args.Action.ToString()} {args.ProjectItem.Title}");
}, false); the 'Action' is 'Add' and 'args.ProjectItem' should be your newly added LayoutProjectItem.
... View more
12-05-2019
10:43 AM
|
0
|
0
|
1151
|
|
POST
|
If you just need to get the 'sum' of all lengths, then you can use the following workaround for the time being: double GetLength(FeatureClass fc)
{
try
{
using (FeatureClassDefinition fcd = fc.GetDefinition())
{
Field LengthField = fcd.GetFields().FirstOrDefault(x => x.Name.Equals("Shape.STLength()")); //"PIPEDIAM" and other numeric fields work fine, Shape.STLength() fails, as does fcd.GetLengthField();
if (LengthField == null) return 0;
System.Diagnostics.Debug.WriteLine(LengthField.Name); // Output is "Shape.STLength()" as expected
double totalLen = 0.0;
var cur = fc.Search();
while (cur.MoveNext())
{
var feat = cur.Current;
totalLen += Convert.ToDouble(feat["Shape.STLength()"]);
}
return totalLen;
}
}
catch (Exception ex)
{
throw ex;
}
}
... View more
12-04-2019
10:50 AM
|
0
|
0
|
4714
|
|
POST
|
I created a SQL Server enterprise geodatabase with a line feature class and I am getting the same exception. I will check with the Geodatabase team.
... View more
12-04-2019
10:19 AM
|
0
|
2
|
4715
|
|
POST
|
What kind of a feature class are you using? If I use the community sample data, specifically the 'FeatureTest' data (TestLines feature class) your method works fine if I use Shape_Length instead of Shape.STLength() .... internal class CalcStats : Button
{
protected override void OnClick()
{
try
{
var featureLayer = MapView.Active.Map.GetLayersAsFlattenedList().OfType<FeatureLayer>().Where(fl => fl.Name.Contains("TestLines")).FirstOrDefault();
var len = QueuedTask.Run(() =>
{
var fc = featureLayer.GetFeatureClass();
return GetLength(fc);
});
MessageBox.Show($@"Len: {len.Result}");
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString(), "Error");
}
}
double GetLength(FeatureClass fc)
{
try
{
using (FeatureClassDefinition fcd = fc.GetDefinition())
{
Field LengthField = fcd.GetFields().FirstOrDefault(x => x.Name.Equals("Shape_Length")); //"PIPEDIAM" and other numeric fields work fine, Shape.STLength() fails, as does fcd.GetLengthField();
if (LengthField == null) return 0;
System.Diagnostics.Debug.WriteLine(LengthField.Name); // Output is "Shape.STLength()" as expected
StatisticsDescription SumDesc = new StatisticsDescription(LengthField, new List<StatisticsFunction>() { StatisticsFunction.Sum });
TableStatisticsDescription tsd = new TableStatisticsDescription(new List<StatisticsDescription>() { SumDesc });
return fc.CalculateStatistics(tsd).FirstOrDefault().StatisticsResults.FirstOrDefault().Sum; // exception is thrown on this line
}
}
catch (Exception ex)
{
ArcGIS.Desktop.Framework.Dialogs.MessageBox.Show(ex.ToString(), "Error");
return 0;
}
}
}
... View more
12-03-2019
03:56 PM
|
0
|
5
|
4714
|
|
POST
|
You can use the Module class (which is a singleton) to register your dockpane(s) for access throughout your add-in or even from other add-ins. The pattern is utilized by this sample for internal access: https://github.com/Esri/arcgis-pro-sdk-community-samples/tree/master/Map-Exploration/MapToolIdentifyWithDockpanehttps://github.com/Esri/arcgis-pro-sdk-community-samples/tree/master/Map-Exploration/MapToolIdentifyWithDockpane. Look in the Module1 class for usage of this property: internal static MapToolIdentifyDockpaneViewModel MapToolIdentifyDockpaneVM { get; set; }
... View more
11-14-2019
01:10 PM
|
1
|
0
|
1205
|
|
POST
|
The requirements for the ArcGIS Pro SDK can be found here: https://github.com/Esri/arcgis-pro-sdk/wiki#requirements. But in short we support the following developer IDEs: Supported IDEs Visual Studio 2019 (Professional, Enterprise, and Community Editions) Visual Studio 2017 (Professional, Enterprise, and Community Editions) Visual Studio is the only supported platform for the ArcGIS Pro SDK, and there are no plans to support other platforms.
... View more
11-07-2019
09:33 AM
|
0
|
0
|
1694
|
|
POST
|
We provide ProGuide documentation that answers the original question: https://github.com/Esri/arcgis-pro-sdk/wiki/ProGuide-Custom-settings
... View more
11-07-2019
09:24 AM
|
0
|
0
|
2987
|
|
POST
|
I would suggest change the version number in your config.daml's AddInInfo tag. Use addin manager on your VM to verify that Pro is running the same addin version that works on your development machine. I assume you don't have Visual Studio on your VM in which case you have to add logging code to locate the source of your problems. You said that not even your logging code is being executed? Is your logging code working if you add a log entry to the Module class? For example in the Current property? Make sure that your module's autoload property is set to 'false'. If that works (i.e. logging code in the Current property) i would suggest to add Roman's Assembly Resolve handler to output any errors in the late binding to your logger. I have created an add-in that is using cefsharp.wpf which also uses late binding, without any problems. However, depending on the 3rd party package you might have to configure the 'load' environment properly. With cefsharp i had to add some code to configure the 'late binding load' environment for cefsharp. The problem is that you don't know how your 3rd party loads its required dll or resources. I your post above you say: Works, but not appropriate: Add-In working folder e.g. C:\Users\*\AppData\Local\ESRI\ArcGISPro\AssemblyCache\{GUID} Not knowing what your 3rd party library does, I would suggest that using the 'add-in working folder' is actually an 'appropriate' implementation. You can simply add all your 3rd party library dlls to your add-in project and make sure that the 3rd party dll's build action is set to 'Content' and 'Copy to Output' is set to Copy. Now build your add-in and start ArcGIS Pro. Once ArcGIS Pro starts it will update the "C:\Users\*\AppData\Local\ESRI\ArcGISPro\AssemblyCache\{GUID}" folder and unzip the addin file's content in this folder and you should now see you 3rd party dlls in that folder. It's possible that this will fix your problem, if it doesn't you can 'redirect' the assembly load path using Roman's code snippet. Finally i would like to clarify that the following is Not appropriate: Works, maybe appropriate? ArcGIS Pro Extensions folder C:\Program Files\ArcGIS\Pro\bin\Extensions As Gintautas mentions if you have multiple add-ins that use the same libraries you can add them to the GAC, however, that will complicate the installation/updating of add-ins because they have to be in sync with the GAC (and the setup required to install dlls and register with the GAC).
... View more
10-17-2019
08:15 AM
|
0
|
0
|
1479
|
|
POST
|
Hi Rebecca, Can you explain the workflow you implemented to in order to change the report's layout and run it? Also how many fields do you have and which field's frame are you widening (left, center, right most)? As for the code above we created the report (with one column only), next we ran the snippet above, finally we exported the report. The text widening worked fine (from 1 inch to 5 in our case). To make sure that your text frames are not overlapping or going outside the report area, you can iterate through all cimParagraphTextGraphicElement items with a text containing "field-value" (these are the field values in your detail report section only) and output the textPolygonFrame's corners.
... View more
10-09-2019
08:57 AM
|
0
|
0
|
1697
|
|
POST
|
It turns out that this sample: https://github.com/Esri/arcgis-pro-sdk-community-samples/tree/master/Map-Exploration/IdentifyWindow already implements the functionality that you need in terms of displaying data using DataGrid. Look at AttributeDockpane and its ViewModel. This sample is using a DataTable, so it will only work for relatively small datasets since the UI Notification event is not triggered until all data has been loaded. The advantage of using a DataTable object is that it dynamically handles any table definition (columns, types, etc) you load (as demonstrated in the sample).
... View more
08-29-2019
11:59 AM
|
0
|
1
|
4649
|
|
POST
|
What is the type of this.MyList? in general there are two issues complicating the work here: 1) When you add a new row to your list (or whatever class you are using) an event has to be triggered (via INotifyPropertyChanged) that notifies the UI of the change, so that the UI can refresh the display to show the new row's data. 2) When you add a new row from a non UI thread (which is likely what you're doing), the add event notification doesn't go to the UI thread (by default it only goes to the thread where it's been triggered), unless you implement something like: BindingOperations.EnableCollectionSynchronization i will make a small sample and try this out. - Wolf
... View more
08-29-2019
10:53 AM
|
0
|
2
|
4649
|
|
POST
|
You can use: ActiveMapViewChangedEvent to subscribe to an event triggered when there is a newly 'incoming' mapview. You can do a github search for 'ActiveMapViewChangedEvent' on arcgis-pro-sdk community samples to find samples snippets for this pattern.
... View more
08-28-2019
08:37 AM
|
0
|
0
|
4649
|
|
POST
|
Than, You can use the 'updatedatabase' method to 'customize' the UI as we did in this sample here: https://github.com/Esri/arcgis-pro-sdk-community-samples/tree/master/Framework/ConfigWithMap This advantage here is that you can modify the daml programmatically, meaning you can add logic to handle you user's permissions. However, depending on your use case this might not be sufficient because this only works if a user starts Pro using your configuration, if a user starts Pro without the configuration the user sees the 'standard' Pro UI. If you want to modify your Pro UI for all start scenarios it would be best to define a 'control UI' add-in that takes care of all your UI customizations since add-ins are always loaded. You can perform all your modifications in the config.daml of the control add-in just remember to add the <dependency> tag as shown here: ProConcepts Advanced Topics · Esri/arcgis-pro-sdk Wiki · GitHub . If you have certain user groups with different UI modifications you can define a 'control UI' add-in for each user group and make sure that each group only 'sees' (via Windows File Access Permissions) the add-in responsible for the respective Windows user group. This also assumes that all your add-ins are published to one 'shared' network add-in folder in your Enterprise (see https://github.com/esri/arcgis-pro-sdk/wiki/ProConcepts-Advanced-Topics#add-in-loading-scheme ) so you can manage those permission from a central location. - Wolf
... View more
08-22-2019
09:15 AM
|
0
|
1
|
1552
|
| 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
|