|
POST
|
Hi Simon You cannot add raster sublayers (that is, raster layers inside a map service) individually to Pro. This is by-design. Thanks Uma
... View more
04-22-2019
01:21 PM
|
1
|
2
|
1804
|
|
POST
|
You can set this in the XAML for the ProWindow - ShowMinButton="False"
ShowCloseButton="False" ShowMaxRestoreButton="False"
WindowStartupLocation="CenterOwner"
<controls:ProWindow x:Class="ProWindow.ProWindow1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:controls="clr-namespace:ArcGIS.Desktop.Framework.Controls;assembly=ArcGIS.Desktop.Framework"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:extensions="clr-namespace:ArcGIS.Desktop.Extensions;assembly=ArcGIS.Desktop.Extensions"
mc:Ignorable="d"
Title="ProWindow1" Height="300" Width="300"
ShowMinButton="False"
ShowCloseButton="False" ShowMaxRestoreButton="False"
WindowStartupLocation="CenterOwner"
>
... View more
04-22-2019
12:51 PM
|
0
|
1
|
1460
|
|
POST
|
Hi Simon I am able to reproduce this behavior you are seeing. Will investigate and let you know. Thanks Uma
... View more
04-18-2019
01:05 PM
|
0
|
0
|
1804
|
|
POST
|
Hi Laura Once you have your custom python tool in a toolbox in a Pro project, you can add it to a button on the Pro ribbon. So when you click the button, your tool will execute. I am assuming this is what you want to do. The following details how to exactly accomplish this. 1. Using the Pro SDK, you will create an Add-in project in Visual Studio. This is a .NET project that allows you to extend the Pro UI with new buttons, etc. 2. You will add a Button item template to this add-in project using the Pro SDK. 3. The button class file created by the Pro SDK will have an OnClick method stubbed out for you. This is where you would add code to access/run a specific GP tool - in your case your custom python tool in the toolbox in Pro. 4. To run a GP tool using the .NET Pro API, you can use ExecuteToolAsync method or the Geoprocessing.OpenToolDialog method. Code snippets for all this is available in this message trail above. A useful link on how to get started with the Pro SDK is ProGuide: Build your first add in Thanks Uma
... View more
04-17-2019
03:14 PM
|
0
|
0
|
4354
|
|
POST
|
Hi Laura In Pro, you can Insert a new Toolbox into your project and then add your script tool (test1.py) to that toolbox. This help topic walks you through this: Use a custom geoprocessing tool Also, this help topic has some information on how to structure the parameters in the script tool: https://pro.arcgis.com/en/pro-app/help/analysis/geoprocessing/basics/create-a-python-script-tool.htm Once you have your custom tool included in Pro, you can run it manually using the UI, or using the Pro API. Thanks Uma
... View more
04-17-2019
01:08 PM
|
0
|
2
|
4354
|
|
POST
|
Hi You can add an entire feature service or just one layer to your map using the CreateLayer method on the LayerFactory. To add just one layer, you use the layer ID. Like this: string url = @"http://sampleserver6.arcgisonline.com/arcgis/rest/services/NapervilleShelters/FeatureServer/0"; //FeatureLayer off a map service or feature service
Uri uri = new Uri(url);
await QueuedTask.Run(() => LayerFactory.Instance.CreateLayer(uri, MapView.Active.Map)); Here is a code snippet for this: Create and add a layer to the active map To access data via databases - you can use connection properties. Here are some code snippets for this: Opening an Enterprise Geodatabase using connection properties Opening an Enterprise Geodatabase using sde file path Getting Database Connection Properties from a Connection File Thanks Uma
... View more
04-17-2019
10:46 AM
|
0
|
2
|
3037
|
|
POST
|
Hi To run a specific GP Tool using the Pro API, you can call the ExecuteToolAsync method. There are some samples available that will walk you through this: Sample that uses a GP Tool. Some more code snippets that runs GP Tools If you need to open a specific GP Tool dialog using code, you can do something like this: string input_data = @"C:\data\data.gdb\Population";
string out_pdf = @"C:\temp\Reports.pdf";
string field_name = "INCOME";
// use defaults for other parameters - no need to pass any value
var arguments = Geoprocessing.MakeValueArray(input_data, out_pdf, field_name);
string toolpath = @"C:\data\WorkflowTools.tbx\MakeHistogram";
Geoprocessing.OpenToolDialog(toolpath, args); You can use the Pro SDK Item templates and create a button item in a Pro add-in. The OnClick event stubbed out for you via the template is where you would add code to access/run a specific GP tool. This button can then be displayed directly on the Pro ribbon or you can add them to a "toolbar" on the Pro ribbon. Thanks Uma
... View more
04-17-2019
10:39 AM
|
0
|
4
|
4354
|
|
POST
|
Yes. If you check out line 150 in the config.daml in this sample, it shows how to add toolbars to the ribbon.
... View more
04-17-2019
10:18 AM
|
0
|
0
|
4354
|
|
POST
|
Hi Laura Yes, Tools can be added to a Toolbar on the Pro ribbon. You can define which tools/buttons you want on the toolbar using this piece of code in your config.daml: <toolbars>
<toolbar id="TestToolbar">
<group>
<button refID="ArcProToolbar_ButtonOnToolbar" />
<tool refID="ArcProToolbar_MyMapTool"></tool>
<tool refID="ArcProToolbar_MyConstructionTool1"></tool>
</group>
</toolbar>
</toolbars> And then you add the toolbar using its refID to the group and the tab like this: <tabs>
<tab id="ArcProToolbar_Tab1" caption="New Tab">
<group refID="ArcProToolbar_Group1" />
</tab>
</tabs>
<groups>
<!-- comment this out if you have no controls on the Addin tab to avoid
an empty group-->
<group id="ArcProToolbar_Group1" caption="Group 1" appearsOnAddInTab="false">
<!-- host controls within groups -->
<toolbar refID="TestToolbar" />
</group>
</groups> The RibbonControls sample has a toolbar in it. Thanks Uma
... View more
04-17-2019
09:58 AM
|
1
|
8
|
4354
|
|
POST
|
In your Visual Studio Community Edition installation, can you please check if you have installed the .NET Desktop development workload? This is required to display the templates.
... View more
04-12-2019
08:19 AM
|
1
|
1
|
1737
|
|
POST
|
Here is the registry key to set in order to define Configurations well known folders for all users on the machine: Configuration Folders
... View more
04-12-2019
08:16 AM
|
0
|
0
|
1047
|
|
POST
|
Hi You can modify any layer's label expression using this snippet: Modify label expression using Arcade var lyr = MapView.Active.Map.GetLayersAsFlattenedList().OfType<FeatureLayer>().FirstOrDefault(f => f.ShapeType == esriGeometryType.esriGeometryPolygon);
if (lyr == null) return;
QueuedTask.Run(() => {
//Get the layer's definition
//community sample Data\Admin\AdminSample.aprx
var lyrDefn = lyr.GetDefinition() as CIMFeatureLayer;
if (lyrDefn == null) return;
//Get the label classes - we need the first one
var listLabelClasses = lyrDefn.LabelClasses.ToList();
var theLabelClass = listLabelClasses.FirstOrDefault();
//set the label class Expression to use the Arcade expression
theLabelClass.Expression = "return $feature.STATE_NAME + TextFormatting.NewLine + $feature.POP2000;";
//Set the label definition back to the layer.
lyr.SetDefinition(lyrDefn);
}); Thanks Uma
... View more
04-11-2019
01:02 PM
|
2
|
1
|
2882
|
|
POST
|
Hi Stuart ArcGIS Pro 2.4 SDK will support Visual Studio 2019. Thanks Uma
... View more
04-10-2019
01:19 PM
|
1
|
2
|
1420
|
|
POST
|
Hi, Answers are posted here: https://community.esri.com/thread/231883-start-up-page-for-an-arcgis-pro-add-in
... View more
04-10-2019
08:37 AM
|
0
|
0
|
767
|
|
POST
|
Hi Jaowon, You should create a Pro Configuration. This is similar to an add-in but it allows you to customize Pro's start-up experience. Using a Configuration you will be able to show a custom start page when the application launches. In this custom start page, you can display a control to list your layers. When the layers are selected, you can initialize a Pro session - a New Map in your case - with the layers selected. Here are some links that can get you started with this: 1. ProGuide: Configurations 2. ProConcepts: Configurations 3. Configuration Samples: https://github.com/Esri/arcgis-pro-sdk-community-samples/tree/master/Framework/ConfigWithMap https://github.com/Esri/arcgis-pro-sdk-community-samples/tree/master/Framework/ConfigWithStartWizard Thanks Uma
... View more
04-09-2019
09:38 AM
|
1
|
1
|
1785
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 04-14-2026 09:54 AM | |
| 1 | 01-21-2026 10:48 AM | |
| 1 | 09-18-2025 03:09 PM | |
| 1 | 11-04-2025 08:25 AM | |
| 1 | 09-23-2025 09:31 AM |
| Online Status |
Offline
|
| Date Last Visited |
04-16-2026
09:00 AM
|