|
POST
|
One of the differences between ArcGIS Desktop and ArcGIS Pro is that in ArcGIS Pro Editing is in essence always on, whereas in ArcGIS Desktop you had to start/stop editing. Consequently, if you have an add-in that customizes editing you have to do your house keeping when the project (or map) is loaded. If you want to have better control over edits you could use ArcGIS Pro's capability to 'Enable and Disable Edits' (see ProConcepts Editing · Esri/arcgis-pro-sdk Wiki (github.com)) and perform your house keeping in the code behind for the 'Enable/Disable Edits' button. In order to do so you would need to create your own 'Start/Stop Edit' button that calls the ArcGIS Pro API to enable/disable Pro's editing and also calls your house keeping code. You can change ArcGIS Pro's Backstage options programmatically using this API: EditingOptions Property—ArcGIS Pro You can also check out this sample: arcgis-pro-sdk-community-samples/Editing/DemoUseSelection at 6078006a3943364f2a7931b19d1eb03c8a99e1cf · Esri/arcgis-pro-sdk-community-samples (github.com) it shows how to enable / disable editing in Pro.
... View more
02-18-2023
08:15 AM
|
0
|
1
|
1585
|
|
POST
|
You could try to implement a 'custom' paste handler in your module class by overriding both CanPasteAsync and PasteAsync CanPasteAsync Method (Module)—ArcGIS Pro I think you would have to look at the content of the clipboard to find out if the clipboard data applies to your use case. You would need to return true on CanPasteAsync and then popup you own error message in PasteAsync. I attached a sample (released with 3.1) of a custom paste implementation. To make sure that your custom clipboard handler gets called regardless of any user interaction you need to set the Module's autoLoad setting to true in the config.daml file: <insertModule .... autoLoad="true" ...
... View more
02-02-2023
08:19 AM
|
0
|
0
|
740
|
|
POST
|
Can you share the csproj file? you can change your source file names etc. if need be.
... View more
01-26-2023
01:51 PM
|
0
|
0
|
1486
|
|
POST
|
Or if you want to open a project programmatically you can add the following snippet in the override for OnApplicationReady of your ConfigurationManager class implementation: protected override void OnApplicationReady()
{
try
{
var aprxPath = @"c:\...\ProProjectFile.aprx";
Project.OpenAsync(aprxPath);
}
catch (Exception ex)
{
MessageBox.Show ($@"Error: ex.Message");
}
} For the OnShowStartPage override just return null.
... View more
01-26-2023
01:46 PM
|
1
|
1
|
1171
|
|
POST
|
Does this sample do what you need? arcgis-pro-sdk-community-samples/Framework/Gallery at master · Esri/arcgis-pro-sdk-community-samples (github.com)
... View more
01-16-2023
09:35 AM
|
1
|
0
|
1019
|
|
POST
|
There are some examples that show WPF progressors on Dockpanes in the 2022 Palm Springs tech session (https://esri.github.io/arcgis-pro-sdk/techsessions/2022/PalmSprings/ImprovingYourDockpaneandProWindow.zip) , all 2022 tech sessions are here, the one you want to look at is called ' Improving Your Dockpane and ProWindow': Tech Sessions · Esri/arcgis-pro-sdk Wiki (github.com)
... View more
01-16-2023
08:19 AM
|
0
|
0
|
2373
|
|
POST
|
Please see my reply with attached sample code here: Copy geometry to clipboard - Esri Community
... View more
01-16-2023
07:44 AM
|
0
|
0
|
651
|
|
POST
|
Sorry for the delay. I attached a copy/paste sample project to this reply. As @GKmieliauskas mentioned there is no published ArcGIS Pro standard on copy/paste published (instead all copy/paste handling is custom), so you have to implement your own copy/paste handlers in your Module class. The attached sample implements the paste part since i encountered some issues with intercepting the copy (and cancopy) actions, which we will try to address this in an upcoming release of ArcGIS Pro. However, i think you can still use the attached sample to get your desired workflow done. The same has a readme.md included which describes the usage. But in summary the sample allows the operator to create a geometry, then select the destination layer (which could be determined through a TOC selection or other means) and then use the ArcGIS Pro built-in Paste button to paste the geometry into the destination layer.
... View more
01-16-2023
07:41 AM
|
2
|
1
|
3058
|
|
POST
|
i attached a small sample that worked for me. With 3.1 this will be added to Community Samples.
... View more
01-12-2023
01:14 PM
|
0
|
0
|
1612
|
|
POST
|
Regarding 2) you can use GP Tools to perform this workflow (Georeference a raster to a referenced layer—ArcGIS Pro | Documentation) You can first call on the 'Warp' GP Tool: How Warp works—ArcGIS Pro | Documentation and then use the 'Raster Projection' GP Tool: Project Raster (Data Management)—ArcGIS Pro | Documentation You can call these GP tools from the SDK.
... View more
12-22-2022
08:32 AM
|
1
|
1
|
949
|
|
POST
|
The following snippet worked for me: protected override async void OnClick()
{
var fcLayer = MapView.Active.Map.GetLayersAsFlattenedList().OfType<FeatureLayer>().Where(fl => fl.Name == "TestPoints").FirstOrDefault();
await QueuedTask.Run(() =>
{
List<CIMLabelClass> newLabels = new List<CIMLabelClass>()
{ new CIMLabelClass
{
Name = "labelFeatureLayer",
ExpressionEngine = LabelExpressionEngine.Arcade,
Expression = "Geometry($feature).z",
TextSymbol = SymbolFactory.Instance.ConstructTextSymbol().MakeSymbolReference(),
Visibility = true
}
};
var lyrDefn = fcLayer.GetDefinition() as CIMFeatureLayer;
lyrDefn.LabelClasses = newLabels.ToArray();
fcLayer.SetDefinition(lyrDefn);
fcLayer.SetLabelVisibility(true);
});
} @GKmieliauskas is correct as there can be multiple labels with visibility. The snippet above removes all but the new label from the array of labels.
... View more
12-21-2022
09:49 PM
|
0
|
0
|
918
|
|
POST
|
Back at the DevSummit 2017 an Esri Product Engineer (Tushar, he's no longer with esri) did a sample that pretty much does what you're trying to do in your use case 1. Start at minute 37 of the video: ArcGIS Pro SDK for .NET: Integration with ArcGIS Online - Esri Videos: GIS, Events, ArcGIS Products & Industries I attached the demo source code for your reference. Please note that the code is for ArcGIS Pro 1.4 and about 5 years old. However, it might provide you with some hints on how to possible use EsriHttpClient to accomplish your task.
... View more
12-14-2022
08:43 AM
|
1
|
0
|
1944
|
|
POST
|
Or you can use the 'built-in' functionality of ArcGIS Pro to create a connection to the portal and then use the ArcGISPortal class to get a token: ArcGISPortal Class—ArcGIS Pro You can also use EsriHttpClient Class—ArcGIS Pro for you rest type calls and you don't need to worry about the token (expiration etc.)
... View more
12-14-2022
07:09 AM
|
0
|
1
|
1951
|
|
POST
|
The tool documentation only shows 'File' as valid input. JSON To Features (Conversion)—ArcGIS Pro | Documentation This enhancement has to be implemented by the GP Tool (or GP Tools since i can imagine that this feature would be useful across many tools), so i would suggest to either add this to ArcGIS Pro Ideas - Esri Community or upvote the item if it's already there. For the time being you still have to stream into a temporary .json file and pass that to the tool.
... View more
12-14-2022
07:02 AM
|
0
|
1
|
801
|
|
POST
|
According to the ProConcept document for Pro SDK Custom Items this appears to be 'by design'. ProConcepts Custom Items · Esri/arcgis-pro-sdk Wiki (github.com) File extensions specified in the config.daml are case sensitive, hence only files with file extensions that are matched using a case sensitive compare will work. I am not sure of the reasons behind the reasons behind this limitation.
... View more
12-14-2022
06:47 AM
|
2
|
0
|
2241
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 10-07-2025 07:27 AM | |
| 2 | 2 weeks ago | |
| 1 | 07-30-2025 12:03 PM | |
| 1 | 10-06-2025 01:19 PM | |
| 1 | 10-06-2025 10:37 AM |
| Online Status |
Offline
|
| Date Last Visited |
Sunday
|