diff --git a/Content/AddInInfoManager/AddInInfoManager (C#).md b/Content/AddInInfoManager/AddInInfoManager (C#).md index 302a7404..9a1ee395 100644 --- a/Content/AddInInfoManager/AddInInfoManager (C#).md +++ b/Content/AddInInfoManager/AddInInfoManager (C#).md @@ -13,7 +13,7 @@ Language: C# Subject: Content Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Content/AddInInfoManager/Config.daml b/Content/AddInInfoManager/Config.daml index 1644439f..00801bd7 100644 --- a/Content/AddInInfoManager/Config.daml +++ b/Content/AddInInfoManager/Config.daml @@ -1,4 +1,4 @@ - + - diff --git a/Content/ArcGISOnlineConnect/ReadMe.md b/Content/ArcGISOnlineConnect/ReadMe.md index 30efc45c..309c8c9d 100644 --- a/Content/ArcGISOnlineConnect/ReadMe.md +++ b/Content/ArcGISOnlineConnect/ReadMe.md @@ -13,7 +13,7 @@ Language: C# Subject: Content Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Content/ContentFileExplorer/Config.daml b/Content/ContentFileExplorer/Config.daml index 1d2e0759..4773a263 100644 --- a/Content/ContentFileExplorer/Config.daml +++ b/Content/ContentFileExplorer/Config.daml @@ -1,4 +1,4 @@ - + - CustomCatalogContext CustomCatalogContext description Images\AddinDesktop32.png - ArcGIS Pro SDK Team, arcgisprosdk@esri.com + ArcGIS Pro SDK Team, arcgisprosdk@esri.com esri, http://www.esri.com 5/30/2017 1:16:14 PM, 2017 Content @@ -45,11 +44,7 @@ - diff --git a/Content/CustomCatalogContext/CustomCatalogContext (C#).md b/Content/CustomCatalogContext/CustomCatalogContext (C#).md index fecd91e2..0d46a8c2 100644 --- a/Content/CustomCatalogContext/CustomCatalogContext (C#).md +++ b/Content/CustomCatalogContext/CustomCatalogContext (C#).md @@ -13,7 +13,7 @@ Language: C# Subject: Content Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Content/CustomCatalogContext/ReadMe.md b/Content/CustomCatalogContext/ReadMe.md index fecd91e2..0d46a8c2 100644 --- a/Content/CustomCatalogContext/ReadMe.md +++ b/Content/CustomCatalogContext/ReadMe.md @@ -13,7 +13,7 @@ Language: C# Subject: Content Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Content/ExcelDropHandler/Config.daml b/Content/ExcelDropHandler/Config.daml index bb3b8fe8..6bd3b89b 100644 --- a/Content/ExcelDropHandler/Config.daml +++ b/Content/ExcelDropHandler/Config.daml @@ -1,10 +1,10 @@ - + ExcelDropHandler ExcelDropHandler description Images\AddinDesktop32.png - ArcGIS Pro SDK Team, arcgisprosdk@esri.com + ArcGIS Pro SDK Team, arcgisprosdk@esri.com esri, http://www.esri.com 6/19/2015 2:39:33 PM, 2015 Content diff --git a/Content/ExcelDropHandler/ExcelDropHandler (C#).md b/Content/ExcelDropHandler/ExcelDropHandler (C#).md index f908d038..dad8a1df 100644 --- a/Content/ExcelDropHandler/ExcelDropHandler (C#).md +++ b/Content/ExcelDropHandler/ExcelDropHandler (C#).md @@ -13,7 +13,7 @@ Language: C# Subject: Content Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Content/ExcelDropHandler/ReadMe.md b/Content/ExcelDropHandler/ReadMe.md index f908d038..dad8a1df 100644 --- a/Content/ExcelDropHandler/ReadMe.md +++ b/Content/ExcelDropHandler/ReadMe.md @@ -13,7 +13,7 @@ Language: C# Subject: Content Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Content/FolderConnectionManager/Config.daml b/Content/FolderConnectionManager/Config.daml index 103aac9e..7af3974a 100644 --- a/Content/FolderConnectionManager/Config.daml +++ b/Content/FolderConnectionManager/Config.daml @@ -1,4 +1,4 @@ - + - MetadataBrowserControl MetadataBrowserControl description Images\AddinDesktop32.png - ArcGIS Pro SDK Team, arcgisprosdk@esri.com - esri, http://www.esri.com + ArcGIS Pro SDK Team, arcgisprosdk@esri.com + esri, http://www.esri.com 9/5/2017 9:34:10 AM, 2017 Content - - + - + \ No newline at end of file diff --git a/Content/PortalInfoListAllFedServers/PortalInfoListAllFedServers (C#).md b/Content/PortalInfoListAllFedServers/PortalInfoListAllFedServers (C#).md index 884e5987..60432299 100644 --- a/Content/PortalInfoListAllFedServers/PortalInfoListAllFedServers (C#).md +++ b/Content/PortalInfoListAllFedServers/PortalInfoListAllFedServers (C#).md @@ -13,7 +13,7 @@ Language: C# Subject: Content Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Content/PortalInfoListAllFedServers/ReadMe.md b/Content/PortalInfoListAllFedServers/ReadMe.md index 884e5987..60432299 100644 --- a/Content/PortalInfoListAllFedServers/ReadMe.md +++ b/Content/PortalInfoListAllFedServers/ReadMe.md @@ -13,7 +13,7 @@ Language: C# Subject: Content Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Content/ProjectCustomItemEarthQuake/Config.daml b/Content/ProjectCustomItemEarthQuake/Config.daml index e5c756a0..7ee6abcc 100644 --- a/Content/ProjectCustomItemEarthQuake/Config.daml +++ b/Content/ProjectCustomItemEarthQuake/Config.daml @@ -1,4 +1,4 @@ - + - + QuakeItem QuakeItem description @@ -47,8 +45,7 @@ - + @@ -56,8 +53,7 @@ - + @@ -86,50 +82,28 @@ - - - - - - - + Add Earthquakes to your project. - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - Choose a batch job to remove from the project. - + Choose a batch job to remove from the project. - - + - Choose a batch job to remove from the project. - + Choose a batch job to remove from the project. diff --git a/DataReviewer/ReviewerAddin/ReadMe.md b/DataReviewer/ReviewerAddin/ReadMe.md index 660f6b63..4027e40d 100644 --- a/DataReviewer/ReviewerAddin/ReadMe.md +++ b/DataReviewer/ReviewerAddin/ReadMe.md @@ -15,7 +15,7 @@ Language: C# Subject: DataReviewer Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/DataReviewer/ReviewerAddin/ReviewerAddin (C#).md b/DataReviewer/ReviewerAddin/ReviewerAddin (C#).md index 660f6b63..4027e40d 100644 --- a/DataReviewer/ReviewerAddin/ReviewerAddin (C#).md +++ b/DataReviewer/ReviewerAddin/ReviewerAddin (C#).md @@ -15,7 +15,7 @@ Language: C# Subject: DataReviewer Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Editing/AddFeatureTest/AddFeatureTest (C#).md b/Editing/AddFeatureTest/AddFeatureTest (C#).md index a2ee9c52..61e5edb0 100644 --- a/Editing/AddFeatureTest/AddFeatureTest (C#).md +++ b/Editing/AddFeatureTest/AddFeatureTest (C#).md @@ -13,7 +13,7 @@ Language: C# Subject: Framework Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Editing/AddFeatureTest/Config.daml b/Editing/AddFeatureTest/Config.daml index 91458633..04ccfc1d 100644 --- a/Editing/AddFeatureTest/Config.daml +++ b/Editing/AddFeatureTest/Config.daml @@ -1,4 +1,4 @@ - + - + AnnoTools Sample illustrating how to create and modify annotation features. @@ -53,7 +53,7 @@ Click and drag over annotation features to modify their geometry. - + Click and drag over annotation features to modify their text and symbol. diff --git a/Editing/AnnoTools/ReadMe.md b/Editing/AnnoTools/ReadMe.md index daa18037..efd3e0bf 100644 --- a/Editing/AnnoTools/ReadMe.md +++ b/Editing/AnnoTools/ReadMe.md @@ -23,7 +23,7 @@ Language: C# Subject: Editing Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Editing/ConstructToolWithOptions/Config.daml b/Editing/ConstructToolWithOptions/Config.daml index 7e08d5a6..8b439220 100644 --- a/Editing/ConstructToolWithOptions/Config.daml +++ b/Editing/ConstructToolWithOptions/Config.daml @@ -1,4 +1,4 @@ - + - ConstructToolWithOptions @@ -47,13 +46,7 @@ - + This tool creates a Facility Site Point and allows to selected the subtype diff --git a/Editing/ConstructToolWithOptions/ConstructToolWithOptions (C#).md b/Editing/ConstructToolWithOptions/ConstructToolWithOptions (C#).md index 2edea0e2..bdf51001 100644 --- a/Editing/ConstructToolWithOptions/ConstructToolWithOptions (C#).md +++ b/Editing/ConstructToolWithOptions/ConstructToolWithOptions (C#).md @@ -13,7 +13,7 @@ Language: C# Subject: Framework Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2019 .NET Target Framework: 4.8 diff --git a/Editing/ConstructToolWithOptions/ReadMe.md b/Editing/ConstructToolWithOptions/ReadMe.md index 2edea0e2..bdf51001 100644 --- a/Editing/ConstructToolWithOptions/ReadMe.md +++ b/Editing/ConstructToolWithOptions/ReadMe.md @@ -13,7 +13,7 @@ Language: C# Subject: Framework Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2019 .NET Target Framework: 4.8 diff --git a/Editing/ConstructionTool/Config.daml b/Editing/ConstructionTool/Config.daml index 532bfb85..60fca37a 100644 --- a/Editing/ConstructionTool/Config.daml +++ b/Editing/ConstructionTool/Config.daml @@ -1,4 +1,4 @@ - + - - Simple sketch tool to construct point features. + + Simple sketch tool to construct point features. - diff --git a/Editing/ConstructionTool/ConstructionTool (C#).md b/Editing/ConstructionTool/ConstructionTool (C#).md index 5b933171..6a9f730e 100644 --- a/Editing/ConstructionTool/ConstructionTool (C#).md +++ b/Editing/ConstructionTool/ConstructionTool (C#).md @@ -15,7 +15,7 @@ Language: C# Subject: Editing Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Editing/ConstructionTool/ReadMe.md b/Editing/ConstructionTool/ReadMe.md index 5b933171..6a9f730e 100644 --- a/Editing/ConstructionTool/ReadMe.md +++ b/Editing/ConstructionTool/ReadMe.md @@ -15,7 +15,7 @@ Language: C# Subject: Editing Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Editing/ConstructionToolWithOptions/Config.daml b/Editing/ConstructionToolWithOptions/Config.daml index 07199925..bc8c5c04 100644 --- a/Editing/ConstructionToolWithOptions/Config.daml +++ b/Editing/ConstructionToolWithOptions/Config.daml @@ -1,4 +1,4 @@ - + - + Create a polygon with a fixed buffer. - + Create a circle with a fixed radius. - + Create a circle with a fixed radius. diff --git a/Editing/ConstructionToolWithOptions/ConstructionToolWithOptions (C#).md b/Editing/ConstructionToolWithOptions/ConstructionToolWithOptions (C#).md index bd427794..1717de22 100644 --- a/Editing/ConstructionToolWithOptions/ConstructionToolWithOptions (C#).md +++ b/Editing/ConstructionToolWithOptions/ConstructionToolWithOptions (C#).md @@ -17,7 +17,7 @@ Language: C# Subject: Editing Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Editing/ConstructionToolWithOptions/ReadMe.md b/Editing/ConstructionToolWithOptions/ReadMe.md index bd427794..1717de22 100644 --- a/Editing/ConstructionToolWithOptions/ReadMe.md +++ b/Editing/ConstructionToolWithOptions/ReadMe.md @@ -17,7 +17,7 @@ Language: C# Subject: Editing Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Editing/CreatePointsAlongLine3D/Config.daml b/Editing/CreatePointsAlongLine3D/Config.daml index bd7cf5b2..a3f80e17 100644 --- a/Editing/CreatePointsAlongLine3D/Config.daml +++ b/Editing/CreatePointsAlongLine3D/Config.daml @@ -1,4 +1,4 @@ - + - - + CreatePointsAlongLine3D Create points along a 3D line @@ -29,15 +27,11 @@ - - - - + + - + Create point features along a 3D line diff --git a/Editing/CreatePointsAlongLine3D/CreatePointsAlongLine3D (C#).md b/Editing/CreatePointsAlongLine3D/CreatePointsAlongLine3D (C#).md index a816ace9..48fe23c0 100644 --- a/Editing/CreatePointsAlongLine3D/CreatePointsAlongLine3D (C#).md +++ b/Editing/CreatePointsAlongLine3D/CreatePointsAlongLine3D (C#).md @@ -13,7 +13,7 @@ Language: C# Subject: Editing Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2019 .NET Target Framework: 4.8 diff --git a/Editing/CreatePointsAlongLine3D/ReadMe.md b/Editing/CreatePointsAlongLine3D/ReadMe.md index a816ace9..48fe23c0 100644 --- a/Editing/CreatePointsAlongLine3D/ReadMe.md +++ b/Editing/CreatePointsAlongLine3D/ReadMe.md @@ -13,7 +13,7 @@ Language: C# Subject: Editing Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2019 .NET Target Framework: 4.8 diff --git a/Editing/CrowdPlannerTool/Config.daml b/Editing/CrowdPlannerTool/Config.daml index ea84d229..b02aec15 100644 --- a/Editing/CrowdPlannerTool/Config.daml +++ b/Editing/CrowdPlannerTool/Config.daml @@ -1,4 +1,4 @@ - + - DatasetCompatibility diff --git a/Editing/DatasetCompatibility/DatasetCompatibility (C#).md b/Editing/DatasetCompatibility/DatasetCompatibility (C#).md index 530d76f4..50fade5c 100644 --- a/Editing/DatasetCompatibility/DatasetCompatibility (C#).md +++ b/Editing/DatasetCompatibility/DatasetCompatibility (C#).md @@ -13,7 +13,7 @@ Language: C# Subject: Editing Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Editing/DatasetCompatibility/ReadMe.md b/Editing/DatasetCompatibility/ReadMe.md index 530d76f4..50fade5c 100644 --- a/Editing/DatasetCompatibility/ReadMe.md +++ b/Editing/DatasetCompatibility/ReadMe.md @@ -13,7 +13,7 @@ Language: C# Subject: Editing Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Editing/DemoUseSelection/Config.daml b/Editing/DemoUseSelection/Config.daml new file mode 100644 index 00000000..f74cf20d --- /dev/null +++ b/Editing/DemoUseSelection/Config.daml @@ -0,0 +1,83 @@ + + + + + DemoUseSelection + DemoUseSelection description + Images\AddinDesktop32.png + ArcGIS Pro SDK Team, arcgisprosdk@esri.com + esri, http://www.esri.com + 6/2/2020 9:37:23 AM, 2020 + Editing + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Editing/DemoUseSelection/DarkImages/AddInDesktop16.png b/Editing/DemoUseSelection/DarkImages/AddInDesktop16.png new file mode 100644 index 00000000..0118942a Binary files /dev/null and b/Editing/DemoUseSelection/DarkImages/AddInDesktop16.png differ diff --git a/Editing/DemoUseSelection/DarkImages/AddInDesktop32.png b/Editing/DemoUseSelection/DarkImages/AddInDesktop32.png new file mode 100644 index 00000000..9713e3b1 Binary files /dev/null and b/Editing/DemoUseSelection/DarkImages/AddInDesktop32.png differ diff --git a/Editing/DemoUseSelection/DarkImages/GenericButtonBlue16.png b/Editing/DemoUseSelection/DarkImages/GenericButtonBlue16.png new file mode 100644 index 00000000..20b11875 Binary files /dev/null and b/Editing/DemoUseSelection/DarkImages/GenericButtonBlue16.png differ diff --git a/Editing/DemoUseSelection/DarkImages/GenericButtonBlue32.png b/Editing/DemoUseSelection/DarkImages/GenericButtonBlue32.png new file mode 100644 index 00000000..e3b26ab9 Binary files /dev/null and b/Editing/DemoUseSelection/DarkImages/GenericButtonBlue32.png differ diff --git a/Editing/DemoUseSelection/DarkImages/GenericButtonRed16.png b/Editing/DemoUseSelection/DarkImages/GenericButtonRed16.png new file mode 100644 index 00000000..6e372d76 Binary files /dev/null and b/Editing/DemoUseSelection/DarkImages/GenericButtonRed16.png differ diff --git a/Editing/DemoUseSelection/DarkImages/GenericButtonRed32.png b/Editing/DemoUseSelection/DarkImages/GenericButtonRed32.png new file mode 100644 index 00000000..2bf59bed Binary files /dev/null and b/Editing/DemoUseSelection/DarkImages/GenericButtonRed32.png differ diff --git a/Editing/DemoUseSelection/DemoUseSelection (C#).md b/Editing/DemoUseSelection/DemoUseSelection (C#).md new file mode 100644 index 00000000..c7797d07 --- /dev/null +++ b/Editing/DemoUseSelection/DemoUseSelection (C#).md @@ -0,0 +1,72 @@ +## DemoUseSelection + + +This sample shows two things.
+The first is the use of ActivateSelectAsync in conjunction with UseSelection in a couple of example editing tools. +The two tools both do the same thing - a Difference operation against any selected polygons intersected by the sketch.

+DifferenceTool 1 shows use of UseSelection = true and leverages built-in behavior of the SHIFT key to toggle the tool into selection mode.
+DifferenceTool 2 also uses UseSelection = true and a custom key - "W" to toggle into select mode. It also shows how to handle the SHIFT key to prevent the default behavior from intefering with the tool's use of "W".
+Developers can experiment by setting UseSelection to false to observe how that changes the behavior of the tools.

+The second thing demonstrated by the sample is the use of Project.Current.IsEditingEnabled in-conjunction with Project.Current.SetIsEditingEnabledAsync(true | false) to detect if a project has editing enabled and to toggle editing on|off. This is new at 2.6 + + +View it live + + +``` +Language: C# +Subject: Editing +Contributor: ArcGIS Pro SDK Team +Organization: Esri, http://www.esri.com +Date: 7/01/2020 +ArcGIS Pro: 2.6 +Visual Studio: 2019 +.NET Target Framework: 4.8 +``` + +## Resources + +* [API Reference online](https://pro.arcgis.com/en/pro-app/sdk/api-reference) +* ArcGIS Pro SDK for .NET (pro.arcgis.com) +* [arcgis-pro-sdk-community-samples](https://github.com/Esri/arcgis-pro-sdk-community-samples) +* [ArcGIS Pro DAML ID Reference](https://github.com/Esri/arcgis-pro-sdk/wiki/ArcGIS-Pro-DAML-ID-Reference) +* [FAQ](https://github.com/Esri/arcgis-pro-sdk/wiki/FAQ) +* [ArcGIS Pro SDK icons](https://github.com/Esri/arcgis-pro-sdk/releases/tag/2.4.0.19948) + +![ArcGIS Pro SDK for .NET Icons](https://Esri.github.io/arcgis-pro-sdk/images/Home/Image-of-icons.png "ArcGIS Pro SDK Icons") + +### Samples Data + +* Sample data for ArcGIS Pro SDK Community Samples can be downloaded from the [repo releases](https://github.com/Esri/arcgis-pro-sdk-community-samples/releases) page. + +## How to use the sample + +1. In Visual Studio click the Build menu. Then select Build Solution. +1. Click Start button to open ArcGIS Pro. +1. ArcGIS Pro will open. +1. Open any project which features you can edit, for example: 'C:\Data\FeatureTest\FeatureTest.aprx' +1. Click the Edit tab. Notice that edit functions like create/modify are enabled. +![UI](Screenshots/Screen1.png) + +1. Click the SEL tab. Then click 'Disable Editing' to disable editing. +![UI](Screenshots/Screen2.png) + +1. Click the Edit tab. Notice that edit functions like create/modify are now disabled. +![UI](Screenshots/Screen3.png) + +1. Click the SEL tab. Then click 'Enable Editing' to re-able editing. Notice that the 'Difference' custom tools are now re-abled as well. +![UI](Screenshots/Screen4.png) + +1. To utilize the "Edit" button you have to set the "Disable/Enable Editing" option in ArcGIS Pro options as shown here. +![UI](Screenshots/Screen5.png) + +1. Click 'Edit' to enable editing. Notice that the 'Enable/Disable Editing' buttons honor the 'Edit' button status and vice versa. +![UI](Screenshots/Screen6.png) + + + + + +      ArcGIS Pro SDK for Microsoft .NET Framework +             +[Home](https://github.com/Esri/arcgis-pro-sdk/wiki) | API Reference | [Requirements](https://github.com/Esri/arcgis-pro-sdk/wiki#requirements) | [Download](https://github.com/Esri/arcgis-pro-sdk/wiki#installing-arcgis-pro-sdk-for-net) | Samples diff --git a/Editing/DemoUseSelection/DemoUseSelection.csproj b/Editing/DemoUseSelection/DemoUseSelection.csproj new file mode 100644 index 00000000..a9225046 --- /dev/null +++ b/Editing/DemoUseSelection/DemoUseSelection.csproj @@ -0,0 +1,196 @@ + + + + Debug + AnyCPU + 8.0.30703 + 2.0 + {8F8DF5E0-B1B7-404E-B4A0-6567EC27CDEF} + Library + Properties + DemoUseSelection + DemoUseSelection + v4.8 + 512 + {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + Program + C:\Program Files\ArcGIS\Pro\bin\ArcGISPro.exe + AnyCPU + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + Program + C:\Program Files\ArcGIS\Pro\bin\ArcGISPro.exe + AnyCPU + + + $([MSBuild]::GetRegistryValueFromView('HKEY_LOCAL_MACHINE\SOFTWARE\ESRI\ArcGISPro', 'InstallDir', null, RegistryView.Registry64)) + $(registry:HKEY_CURRENT_USER\SOFTWARE\ESRI\ArcGISPro@InstallDir) + + + + + + + + + + + + + + + + C:\Program Files\ArcGIS\Pro\bin\ArcGIS.Desktop.Framework.dll + False + + + C:\Program Files\ArcGIS\Pro\bin\ArcGIS.Core.dll + False + + + C:\Program Files\ArcGIS\Pro\bin\Extensions\Core\ArcGIS.Desktop.Core.dll + False + + + C:\Program Files\ArcGIS\Pro\bin\Extensions\Mapping\ArcGIS.Desktop.Mapping.dll + False + + + C:\Program Files\ArcGIS\Pro\bin\Extensions\Catalog\ArcGIS.Desktop.Catalog.dll + False + + + C:\Program Files\ArcGIS\Pro\bin\Extensions\Editing\ArcGIS.Desktop.Editing.dll + False + + + C:\Program Files\ArcGIS\Pro\bin\Extensions\DesktopExtensions\ArcGIS.Desktop.Extensions.dll + False + + + C:\Program Files\ArcGIS\Pro\bin\Extensions\GeoProcessing\ArcGIS.Desktop.GeoProcessing.dll + False + + + C:\Program Files\ArcGIS\Pro\bin\Extensions\Layout\ArcGIS.Desktop.Layouts.dll + False + + + C:\Program Files\ArcGIS\Pro\bin\ArcGIS.Desktop.Shared.Wpf.dll + False + + + C:\Program Files\ArcGIS\Pro\bin\ArcGIS.Desktop.Ribbon.Wpf.dll + False + + + C:\Program Files\ArcGIS\Pro\bin\ArcGIS.Desktop.DataGrid.Contrib.Wpf.dll + False + + + C:\Program Files\ArcGIS\Pro\bin\ArcGIS.Desktop.Resources.dll + False + + + C:\Program Files\ArcGIS\Pro\bin\ArcGIS.Desktop.Resources.dll + False + + + C:\Program Files\ArcGIS\Pro\bin\ESRI.ArcGIS.ItemIndex.dll + False + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + BuildDefault + bin\Debug\DemoUseSelection.xml + + + BuildDefault + + + + + + + + + \ No newline at end of file diff --git a/Editing/DemoUseSelection/DemoUseSelection.sln b/Editing/DemoUseSelection/DemoUseSelection.sln new file mode 100644 index 00000000..dc6a5799 --- /dev/null +++ b/Editing/DemoUseSelection/DemoUseSelection.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29509.3 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DemoUseSelection", "DemoUseSelection.csproj", "{8F8DF5E0-B1B7-404E-B4A0-6567EC27CDEF}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {8F8DF5E0-B1B7-404E-B4A0-6567EC27CDEF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8F8DF5E0-B1B7-404E-B4A0-6567EC27CDEF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8F8DF5E0-B1B7-404E-B4A0-6567EC27CDEF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8F8DF5E0-B1B7-404E-B4A0-6567EC27CDEF}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {56E6735B-E1D7-4B1D-8676-508135A21B54} + EndGlobalSection +EndGlobal diff --git a/Editing/DemoUseSelection/Helpers/Extensions.cs b/Editing/DemoUseSelection/Helpers/Extensions.cs new file mode 100644 index 00000000..8896d644 --- /dev/null +++ b/Editing/DemoUseSelection/Helpers/Extensions.cs @@ -0,0 +1,53 @@ +/* + + Copyright 2020 Esri + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + + See the License for the specific language governing permissions and + limitations under the License. + +*/ +using ArcGIS.Core.Geometry; +using ArcGIS.Desktop.Editing; +using ArcGIS.Desktop.Editing.Attributes; +using ArcGIS.Desktop.Mapping; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace DemoUseSelection.Helpers +{ + public static class Extensions + { + public static void Difference(this EditOperation editOp, BasicFeatureLayer layer, + IEnumerable oids, Geometry diffGeom) + { + foreach (var oid in oids) + editOp.Difference(layer, oid, diffGeom); + } + + public static void Difference(this EditOperation editOp, BasicFeatureLayer layer, + long oid, Geometry diffGeom) + { + var insp = new Inspector(); + insp.Load(layer, oid); + + //do the difference + var geom = GeometryEngine.Instance.Difference((Geometry)insp["SHAPE"], diffGeom); + insp["SHAPE"] = geom; + //call modify + editOp.Modify(insp); + } + } +} diff --git a/Editing/DemoUseSelection/Images/AddInDesktop16.png b/Editing/DemoUseSelection/Images/AddInDesktop16.png new file mode 100644 index 00000000..5910bbf3 Binary files /dev/null and b/Editing/DemoUseSelection/Images/AddInDesktop16.png differ diff --git a/Editing/DemoUseSelection/Images/AddInDesktop32.png b/Editing/DemoUseSelection/Images/AddInDesktop32.png new file mode 100644 index 00000000..1d19084a Binary files /dev/null and b/Editing/DemoUseSelection/Images/AddInDesktop32.png differ diff --git a/Editing/DemoUseSelection/Images/GenericButtonBlue16.png b/Editing/DemoUseSelection/Images/GenericButtonBlue16.png new file mode 100644 index 00000000..ab6cad35 Binary files /dev/null and b/Editing/DemoUseSelection/Images/GenericButtonBlue16.png differ diff --git a/Editing/DemoUseSelection/Images/GenericButtonBlue32.png b/Editing/DemoUseSelection/Images/GenericButtonBlue32.png new file mode 100644 index 00000000..4a573fd6 Binary files /dev/null and b/Editing/DemoUseSelection/Images/GenericButtonBlue32.png differ diff --git a/Editing/DemoUseSelection/Images/GenericButtonRed16.png b/Editing/DemoUseSelection/Images/GenericButtonRed16.png new file mode 100644 index 00000000..58643bae Binary files /dev/null and b/Editing/DemoUseSelection/Images/GenericButtonRed16.png differ diff --git a/Editing/DemoUseSelection/Images/GenericButtonRed32.png b/Editing/DemoUseSelection/Images/GenericButtonRed32.png new file mode 100644 index 00000000..91276827 Binary files /dev/null and b/Editing/DemoUseSelection/Images/GenericButtonRed32.png differ diff --git a/Editing/DemoUseSelection/Module1.cs b/Editing/DemoUseSelection/Module1.cs new file mode 100644 index 00000000..f886f948 --- /dev/null +++ b/Editing/DemoUseSelection/Module1.cs @@ -0,0 +1,169 @@ +/* + + Copyright 2020 Esri + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + + See the License for the specific language governing permissions and + limitations under the License. + +*/ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Windows.Input; +using System.Threading.Tasks; +using ArcGIS.Core.CIM; +using ArcGIS.Core.Data; +using ArcGIS.Core.Geometry; +using ArcGIS.Desktop.Catalog; +using ArcGIS.Desktop.Core; +using ArcGIS.Desktop.Editing; +using ArcGIS.Desktop.Extensions; +using ArcGIS.Desktop.Framework; +using ArcGIS.Desktop.Framework.Contracts; +using ArcGIS.Desktop.Framework.Dialogs; +using ArcGIS.Desktop.Framework.Threading.Tasks; +using ArcGIS.Desktop.Mapping; + +namespace DemoUseSelection +{ + ///

+ /// This sample shows two things.
+ /// The first is the use of ActivateSelectAsync in conjunction + /// with UseSelection in a couple of example editing tools. + /// The two tools both do the same thing - a Difference operation + /// against any selected polygons intersected by the sketch.

+ /// DifferenceTool 1 shows use of UseSelection = true + /// and leverages built-in behavior of the SHIFT key to toggle + /// the tool into selection mode.
+ /// DifferenceTool 2 also uses UseSelection = true and + /// a custom key - "W" to toggle into select mode. It also + /// shows how to handle the SHIFT key to prevent the default + /// behavior from intefering with the tool's use of "W".
+ /// Developers can experiment by setting UseSelection to false + /// to observe how that changes the behavior of the tools.

+ /// The second thing demonstrated by the sample is the use + /// of Project.Current.IsEditingEnabled in-conjunction + /// with Project.Current.SetIsEditingEnabledAsync(true | false) + /// to detect if a project has editing enabled and to toggle + /// editing on|off. This is new at 2.6 + ///

+ /// + /// 1. In Visual Studio click the Build menu. Then select Build Solution. + /// 1. Click Start button to open ArcGIS Pro. + /// 1. ArcGIS Pro will open. + /// 1. Open any project which features you can edit, for example: 'C:\Data\FeatureTest\FeatureTest.aprx' + /// 1. Click the Edit tab. Notice that edit functions like create/modify are enabled. + /// ![UI](Screenshots/Screen1.png) + /// 1. Click the SEL tab. Then click 'Disable Editing' to disable editing. + /// ![UI](Screenshots/Screen2.png) + /// 1. Click the Edit tab. Notice that edit functions like create/modify are now disabled. + /// ![UI](Screenshots/Screen3.png) + /// 1. Click the SEL tab. Then click 'Enable Editing' to re-able editing. Notice that the 'Difference' custom tools are now re-abled as well. + /// ![UI](Screenshots/Screen4.png) + /// 1. To utilize the "Edit" button you have to set the "Disable/Enable Editing" option in ArcGIS Pro options as shown here. + /// ![UI](Screenshots/Screen5.png) + /// 1. Click 'Edit' to enable editing. Notice that the 'Enable/Disable Editing' buttons honor the 'Edit' button status and vice versa. + /// ![UI](Screenshots/Screen6.png) + /// + internal class Module1 : Module + { + private static Module1 _this = null; + + public const string ExploreTool = "esri_mapping_exploreTool"; + /// + /// Retrieve the singleton instance to this module here + /// + public static Module1 Current + { + get + { + return _this ?? (_this = (Module1)FrameworkApplication.FindModule("DemoUseSelection_Module")); + } + } + + public void DeactivateSelf() + { + FrameworkApplication.SetCurrentToolAsync(ExploreTool); + } + + public bool IsShiftKey(MapViewKeyEventArgs k) + { + return (k.Key == System.Windows.Input.Key.LeftShift || + k.Key == System.Windows.Input.Key.RightShift); + } + + public bool IsControlKey(MapViewKeyEventArgs k) + { + return (k.Key == System.Windows.Input.Key.LeftCtrl || + k.Key == System.Windows.Input.Key.RightCtrl); + } + + public bool IsShiftOrControl(MapViewKeyEventArgs k) + { + return IsShiftKey(k) || IsControlKey(k); + } + + public bool IsShiftDown() + { + return (Keyboard.Modifiers & ModifierKeys.Shift) + == ModifierKeys.Shift; + } + + public bool IsControlDown() + { + return (Keyboard.Modifiers & ModifierKeys.Control) + == ModifierKeys.Control; + } + + public Tuple IsShiftOrControlDown(MapViewKeyEventArgs k) + { + return new Tuple(IsShiftDown(), IsControlDown()); + } + + public Dictionary> FilterSelection( + Dictionary> selection) + { + return FilterSelection( + selection.ToDictionary(k => k.Key as MapMember, k => k.Value)); + } + + public Dictionary> FilterSelection( + Dictionary> selection) + { + return selection.Where(kvp => + { + if (kvp.Key is FeatureLayer fl) + { + return fl.ShapeType == esriGeometryType.esriGeometryPolygon; + } + return false; + }).ToDictionary(k => (FeatureLayer)k.Key, k => k.Value); + } + + #region Overrides + /// + /// Called by Framework when ArcGIS Pro is closing + /// + /// False to prevent Pro from closing, otherwise True + protected override bool CanUnload() + { + //TODO - add your business logic + //return false to ~cancel~ Application close + return true; + } + + #endregion Overrides + + } +} diff --git a/Editing/DemoUseSelection/Properties/AssemblyInfo.cs b/Editing/DemoUseSelection/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..928868c0 --- /dev/null +++ b/Editing/DemoUseSelection/Properties/AssemblyInfo.cs @@ -0,0 +1,54 @@ +/* + + Copyright 2020 Esri + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + + See the License for the specific language governing permissions and + limitations under the License. + +*/ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("DemoUseSelection")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Acme")] +[assembly: AssemblyProduct("DemoUseSelection")] +[assembly: AssemblyCopyright("Copyright © Acme 2020")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("8f8df5e0-b1b7-404e-b4a0-6567ec27cdef")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Editing/DemoUseSelection/ReadMe.md b/Editing/DemoUseSelection/ReadMe.md new file mode 100644 index 00000000..c7797d07 --- /dev/null +++ b/Editing/DemoUseSelection/ReadMe.md @@ -0,0 +1,72 @@ +## DemoUseSelection + + +This sample shows two things.
+The first is the use of ActivateSelectAsync in conjunction with UseSelection in a couple of example editing tools. +The two tools both do the same thing - a Difference operation against any selected polygons intersected by the sketch.

+DifferenceTool 1 shows use of UseSelection = true and leverages built-in behavior of the SHIFT key to toggle the tool into selection mode.
+DifferenceTool 2 also uses UseSelection = true and a custom key - "W" to toggle into select mode. It also shows how to handle the SHIFT key to prevent the default behavior from intefering with the tool's use of "W".
+Developers can experiment by setting UseSelection to false to observe how that changes the behavior of the tools.

+The second thing demonstrated by the sample is the use of Project.Current.IsEditingEnabled in-conjunction with Project.Current.SetIsEditingEnabledAsync(true | false) to detect if a project has editing enabled and to toggle editing on|off. This is new at 2.6 + + +View it live + + +``` +Language: C# +Subject: Editing +Contributor: ArcGIS Pro SDK Team +Organization: Esri, http://www.esri.com +Date: 7/01/2020 +ArcGIS Pro: 2.6 +Visual Studio: 2019 +.NET Target Framework: 4.8 +``` + +## Resources + +* [API Reference online](https://pro.arcgis.com/en/pro-app/sdk/api-reference) +* ArcGIS Pro SDK for .NET (pro.arcgis.com) +* [arcgis-pro-sdk-community-samples](https://github.com/Esri/arcgis-pro-sdk-community-samples) +* [ArcGIS Pro DAML ID Reference](https://github.com/Esri/arcgis-pro-sdk/wiki/ArcGIS-Pro-DAML-ID-Reference) +* [FAQ](https://github.com/Esri/arcgis-pro-sdk/wiki/FAQ) +* [ArcGIS Pro SDK icons](https://github.com/Esri/arcgis-pro-sdk/releases/tag/2.4.0.19948) + +![ArcGIS Pro SDK for .NET Icons](https://Esri.github.io/arcgis-pro-sdk/images/Home/Image-of-icons.png "ArcGIS Pro SDK Icons") + +### Samples Data + +* Sample data for ArcGIS Pro SDK Community Samples can be downloaded from the [repo releases](https://github.com/Esri/arcgis-pro-sdk-community-samples/releases) page. + +## How to use the sample + +1. In Visual Studio click the Build menu. Then select Build Solution. +1. Click Start button to open ArcGIS Pro. +1. ArcGIS Pro will open. +1. Open any project which features you can edit, for example: 'C:\Data\FeatureTest\FeatureTest.aprx' +1. Click the Edit tab. Notice that edit functions like create/modify are enabled. +![UI](Screenshots/Screen1.png) + +1. Click the SEL tab. Then click 'Disable Editing' to disable editing. +![UI](Screenshots/Screen2.png) + +1. Click the Edit tab. Notice that edit functions like create/modify are now disabled. +![UI](Screenshots/Screen3.png) + +1. Click the SEL tab. Then click 'Enable Editing' to re-able editing. Notice that the 'Difference' custom tools are now re-abled as well. +![UI](Screenshots/Screen4.png) + +1. To utilize the "Edit" button you have to set the "Disable/Enable Editing" option in ArcGIS Pro options as shown here. +![UI](Screenshots/Screen5.png) + +1. Click 'Edit' to enable editing. Notice that the 'Enable/Disable Editing' buttons honor the 'Edit' button status and vice versa. +![UI](Screenshots/Screen6.png) + + + + + +      ArcGIS Pro SDK for Microsoft .NET Framework +             +[Home](https://github.com/Esri/arcgis-pro-sdk/wiki) | API Reference | [Requirements](https://github.com/Esri/arcgis-pro-sdk/wiki#requirements) | [Download](https://github.com/Esri/arcgis-pro-sdk/wiki#installing-arcgis-pro-sdk-for-net) | Samples diff --git a/Editing/DemoUseSelection/Ribbon/DifferenceTool_v1.cs b/Editing/DemoUseSelection/Ribbon/DifferenceTool_v1.cs new file mode 100644 index 00000000..6e745d43 --- /dev/null +++ b/Editing/DemoUseSelection/Ribbon/DifferenceTool_v1.cs @@ -0,0 +1,97 @@ +/* + + Copyright 2020 Esri + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + + See the License for the specific language governing permissions and + limitations under the License. + +*/ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Input; +using ArcGIS.Core.CIM; +using ArcGIS.Core.Data; +using ArcGIS.Core.Geometry; +using ArcGIS.Desktop.Catalog; +using ArcGIS.Desktop.Core; +using ArcGIS.Desktop.Editing; +using ArcGIS.Desktop.Extensions; +using ArcGIS.Desktop.Framework; +using ArcGIS.Desktop.Framework.Contracts; +using ArcGIS.Desktop.Framework.Dialogs; +using ArcGIS.Desktop.Framework.Threading.Tasks; +using ArcGIS.Desktop.Mapping; +using DemoUseSelection.Helpers; + +namespace DemoUseSelection.Ribbon +{ + ///

+ /// Sketches a polygon that does a difference against underlying polygon features. + /// Illustrates the use of UseSelection = true and the built-in behavior of the + /// SHIFT key to be placed into select mode. + /// + /// If lines and points are also selected then they are unaffected by + /// the difference. + internal class DifferenceTool_v1 : MapTool + { + + public DifferenceTool_v1() + { + IsSketchTool = true; + SketchType = SketchGeometryType.Polygon; + SketchOutputMode = SketchOutputMode.Map; + + //To allow activation of "selection" mode + //Hold down the SHIFT key to toggle into + //selection mode + UseSelection = true;//set to false to "turn off" + } + + protected override Task OnToolActivateAsync(bool active) + { + return base.OnToolActivateAsync(active); + } + + protected override Task OnSketchCompleteAsync(Geometry geometry) + { + var mv = MapView.Active; + + return QueuedTask.Run(() => + { + + //filter out non-polygons + var sel_set = Module1.Current.FilterSelection(mv.Map.GetSelection()); + if (sel_set.Count() == 0) + return false; + + //do the difference + var editOp = new EditOperation() + { + Name = "Difference", + ErrorMessage = "Difference failed" + }; + + foreach (var kvp in sel_set) + { + var diffGeom = GeometryEngine.Instance.Project(geometry, + kvp.Key.GetSpatialReference()); + editOp.Difference(kvp.Key, kvp.Value, diffGeom); + } + return editOp.Execute(); + }); + } + } +} diff --git a/Editing/DemoUseSelection/Ribbon/DifferenceTool_v2.cs b/Editing/DemoUseSelection/Ribbon/DifferenceTool_v2.cs new file mode 100644 index 00000000..152460ca --- /dev/null +++ b/Editing/DemoUseSelection/Ribbon/DifferenceTool_v2.cs @@ -0,0 +1,197 @@ +/* + + Copyright 2020 Esri + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + + See the License for the specific language governing permissions and + limitations under the License. + +*/ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using ArcGIS.Core.CIM; +using ArcGIS.Core.Data; +using ArcGIS.Core.Geometry; +using ArcGIS.Desktop.Catalog; +using ArcGIS.Desktop.Core; +using ArcGIS.Desktop.Editing; +using ArcGIS.Desktop.Extensions; +using ArcGIS.Desktop.Framework; +using ArcGIS.Desktop.Framework.Contracts; +using ArcGIS.Desktop.Framework.Dialogs; +using ArcGIS.Desktop.Framework.Threading.Tasks; +using ArcGIS.Desktop.Mapping; +using DemoUseSelection.Helpers; + +namespace DemoUseSelection.Ribbon +{ + internal class DifferenceTool_v2 : MapTool + { + private bool _inSelMode = false; + private bool _sketchStarted = false; + + /// + /// In this example we are manually toggling to selection mode using + /// the key "W". We manually switch from sketch to selection and back + /// using: + /// Task<bool> ActivateSelectAsync(bool activate); + /// + /// rather than the built-in Shift key. Note that when we switch back + /// to sketch mode the sketch will be restored _if_ UseSelection = true + /// otherwise it is cleared. + /// + /// To prevent the built-in Shift key behavior of the base tool intefering + /// with our custom "W" key logic we also listen for the shift key and handle + /// that event (as well as "W"). + /// + public DifferenceTool_v2() + { + IsSketchTool = true; + SketchType = SketchGeometryType.Polygon; + SketchOutputMode = SketchOutputMode.Map; + //Set UseSelection = false to clear the sketch if we toggle + UseSelection = true; + } + + #region Key Handling + protected override void OnToolKeyDown(MapViewKeyEventArgs k) + { + System.Diagnostics.Debug.WriteLine($"OnToolKeyDown Key: {k.Key.ToString()}"); + //toggle sketch selection mode with a custom key + if (k.Key == System.Windows.Input.Key.W) + { + if (!_inSelMode) + { + _inSelMode = true; + k.Handled = true; + System.Diagnostics.Debug.WriteLine($"OnToolKeyDown: ActivateSelectAsync(true)"); + //toggle the tool to select mode. + //The sketch is saved if UseSelection = true; + ActivateSelectAsync(true); + } + } + else if (!_inSelMode) + { + //disable effect of Shift or Ctrl key + //in the base class. We do not want it to intefere with our tool. + //Mark the key event as handled to prevent further processing + k.Handled = Module1.Current.IsShiftKey(k); + } + } + + protected override Task HandleKeyDownAsync(MapViewKeyEventArgs k) + { + //Called when we return "k.Handled = true;" from OnToolKeyDown + //TODO any additional key down handling logic here + return Task.FromResult(0); + } + + protected override void OnToolKeyUp(MapViewKeyEventArgs k) + { + System.Diagnostics.Debug.WriteLine($"OnToolKeyUp Key: {k.Key.ToString()}"); + if (k.Key == System.Windows.Input.Key.W) + { + //if (_inSelMode) + System.Diagnostics.Debug.WriteLine($"OnToolKeyUp: _inSelMode {_inSelMode}"); + if (_inSelMode) + { + _inSelMode = false; + k.Handled = true;//process this one + System.Diagnostics.Debug.WriteLine($"OnToolKeyUp: ActivateSelectAsync(false)"); + //Toggle us back to sketch mode. With UseSelection = true + //the sketch is restored + ActivateSelectAsync(false); + + //Check if sketching was actually started when we toggled modes + if (!_sketchStarted) + { + //As sketching was not actually started we need to + //start it manually + this.StartSketchAsync(); + } + } + } + else if (_inSelMode) + { + //disable effect of Shift or Ctrl key + //in the base class. We do not want it to intefere with our tool. + //Mark the key event as handled to prevent further processing + k.Handled = Module1.Current.IsShiftKey(k); + } + + } + + protected override Task HandleKeyUpAsync(MapViewKeyEventArgs k) + { + //Called when we return "k.Handled = true;" from OnToolKeyUp + //TODO any additional key up handling logic here + return Task.FromResult(0); + } + + #endregion Key Handling + + protected override Task OnSketchModifiedAsync() + { + //Mark that sketching has actually started + _sketchStarted = true; + return base.OnSketchModifiedAsync(); + } + + protected override Task OnSketchCancelledAsync() + { + //Mark that the sketch was cleared + _sketchStarted = false; + return base.OnSketchCancelledAsync(); + } + + protected override Task OnToolActivateAsync(bool active) + { + //clear the flags + _inSelMode = false; + _sketchStarted = false; + return base.OnToolActivateAsync(active); + } + + protected override Task OnSketchCompleteAsync(Geometry geometry) + { + var mv = MapView.Active; + _sketchStarted = false; + + return QueuedTask.Run(() => + { + + //filter out non-polygons + var sel_set = Module1.Current.FilterSelection(mv.Map.GetSelection()); + if (sel_set.Count() == 0) + return false; + + //do the difference + var editOp = new EditOperation() + { + Name = "Difference", + ErrorMessage = "Difference failed" + }; + + foreach (var kvp in sel_set) + { + var diffGeom = GeometryEngine.Instance.Project(geometry, + kvp.Key.GetSpatialReference()); + editOp.Difference(kvp.Key, kvp.Value, diffGeom); + } + return editOp.Execute(); + }); + } + } +} diff --git a/Editing/DemoUseSelection/Ribbon/DisableEditing.cs b/Editing/DemoUseSelection/Ribbon/DisableEditing.cs new file mode 100644 index 00000000..cbaf7838 --- /dev/null +++ b/Editing/DemoUseSelection/Ribbon/DisableEditing.cs @@ -0,0 +1,76 @@ +/* + + Copyright 2020 Esri + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + + See the License for the specific language governing permissions and + limitations under the License. + +*/ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using ArcGIS.Core.CIM; +using ArcGIS.Core.Data; +using ArcGIS.Core.Geometry; +using ArcGIS.Desktop.Catalog; +using ArcGIS.Desktop.Core; +using ArcGIS.Desktop.Editing; +using ArcGIS.Desktop.Extensions; +using ArcGIS.Desktop.Framework; +using ArcGIS.Desktop.Framework.Contracts; +using ArcGIS.Desktop.Framework.Dialogs; +using ArcGIS.Desktop.Framework.Threading.Tasks; +using ArcGIS.Desktop.Mapping; + +namespace DemoUseSelection.Ribbon +{ + internal class DisableEditing : Button + { + protected override void OnClick() + { + //Are we editing? + if (Project.Current.IsEditingEnabled) + { + var res = MessageBox.Show("Do you want to disable editing? The demo tools will be disabled", + "Disable Editing?", System.Windows.MessageBoxButton.YesNoCancel); + if (res == System.Windows.MessageBoxResult.No || + res == System.Windows.MessageBoxResult.Cancel) + { + return; + } + //we must check for edits + if (Project.Current.HasEdits) + { + res = MessageBox.Show("Save edits?", + "Save Edits?", System.Windows.MessageBoxButton.YesNoCancel); + if (res == System.Windows.MessageBoxResult.Cancel) + return; + else if (res == System.Windows.MessageBoxResult.No) + Project.Current.DiscardEditsAsync(); + else + { + Project.Current.SaveEditsAsync(); + } + } + Project.Current.SetIsEditingEnabledAsync(false); + } + else + { + MessageBox.Show("Editing is already disabled", + "Editing Disabled", System.Windows.MessageBoxButton.OK); + } + } + } +} diff --git a/Editing/DemoUseSelection/Ribbon/EnableEditing.cs b/Editing/DemoUseSelection/Ribbon/EnableEditing.cs new file mode 100644 index 00000000..52e4e770 --- /dev/null +++ b/Editing/DemoUseSelection/Ribbon/EnableEditing.cs @@ -0,0 +1,62 @@ +/* + + Copyright 2020 Esri + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + + See the License for the specific language governing permissions and + limitations under the License. + +*/ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using ArcGIS.Core.CIM; +using ArcGIS.Core.Data; +using ArcGIS.Core.Geometry; +using ArcGIS.Desktop.Catalog; +using ArcGIS.Desktop.Core; +using ArcGIS.Desktop.Editing; +using ArcGIS.Desktop.Extensions; +using ArcGIS.Desktop.Framework; +using ArcGIS.Desktop.Framework.Contracts; +using ArcGIS.Desktop.Framework.Dialogs; +using ArcGIS.Desktop.Framework.Threading.Tasks; +using ArcGIS.Desktop.Mapping; + +namespace DemoUseSelection.Ribbon +{ + internal class EnableEditing : Button + { + protected override void OnClick() + { + //Can we edit ? + if (!Project.Current.IsEditingEnabled) + { + var res = MessageBox.Show("You must enable editing to use the sample tools. Would you like to enable it?", + "Enable Editing?", System.Windows.MessageBoxButton.YesNoCancel); + if (res == System.Windows.MessageBoxResult.No || + res == System.Windows.MessageBoxResult.Cancel) + { + return; + } + Project.Current.SetIsEditingEnabledAsync(true); + } + else + { + MessageBox.Show("Editing is already enabled", + "Editing Enabled", System.Windows.MessageBoxButton.OK); + } + } + } +} diff --git a/Editing/DemoUseSelection/Screenshots/Screen1.png b/Editing/DemoUseSelection/Screenshots/Screen1.png new file mode 100644 index 00000000..6ec8b74d Binary files /dev/null and b/Editing/DemoUseSelection/Screenshots/Screen1.png differ diff --git a/Editing/DemoUseSelection/Screenshots/Screen2.png b/Editing/DemoUseSelection/Screenshots/Screen2.png new file mode 100644 index 00000000..a593f5d1 Binary files /dev/null and b/Editing/DemoUseSelection/Screenshots/Screen2.png differ diff --git a/Editing/DemoUseSelection/Screenshots/Screen3.png b/Editing/DemoUseSelection/Screenshots/Screen3.png new file mode 100644 index 00000000..0974b6ce Binary files /dev/null and b/Editing/DemoUseSelection/Screenshots/Screen3.png differ diff --git a/Editing/DemoUseSelection/Screenshots/Screen4.png b/Editing/DemoUseSelection/Screenshots/Screen4.png new file mode 100644 index 00000000..c0993825 Binary files /dev/null and b/Editing/DemoUseSelection/Screenshots/Screen4.png differ diff --git a/Editing/DemoUseSelection/Screenshots/Screen5.png b/Editing/DemoUseSelection/Screenshots/Screen5.png new file mode 100644 index 00000000..0f3ac211 Binary files /dev/null and b/Editing/DemoUseSelection/Screenshots/Screen5.png differ diff --git a/Editing/DemoUseSelection/Screenshots/Screen6.png b/Editing/DemoUseSelection/Screenshots/Screen6.png new file mode 100644 index 00000000..3ae4dbd2 Binary files /dev/null and b/Editing/DemoUseSelection/Screenshots/Screen6.png differ diff --git a/Editing/DivideLines/Config.daml b/Editing/DivideLines/Config.daml index ef7d0007..dcc843ae 100644 --- a/Editing/DivideLines/Config.daml +++ b/Editing/DivideLines/Config.daml @@ -1,4 +1,4 @@ - + - Divide Lines Provides a tool to divide a polyline into equal number of parts or parts of a certain length. Images\AddinDesktop32.png - ArcGIS Pro SDK Team, arcgisprosdk@esri.com + ArcGIS Pro SDK Team, arcgisprosdk@esri.com esri, http://www.esri.com 6/12/2015 Editing @@ -29,7 +28,7 @@ - + @@ -50,17 +49,10 @@ - + - Divide a line into equal number of parts or parts of a certain length. - - + Divide a line into equal number of parts or parts of a certain length. + diff --git a/Editing/DivideLines/DivideLines (C#).md b/Editing/DivideLines/DivideLines (C#).md index e286135b..7faaa87f 100644 --- a/Editing/DivideLines/DivideLines (C#).md +++ b/Editing/DivideLines/DivideLines (C#).md @@ -12,7 +12,7 @@ Language: C# Subject: Editing Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Editing/DivideLines/ReadMe.md b/Editing/DivideLines/ReadMe.md index e286135b..7faaa87f 100644 --- a/Editing/DivideLines/ReadMe.md +++ b/Editing/DivideLines/ReadMe.md @@ -12,7 +12,7 @@ Language: C# Subject: Editing Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Editing/EditEvents/Config.daml b/Editing/EditEvents/Config.daml index 002ae8fc..708d9012 100644 --- a/Editing/EditEvents/Config.daml +++ b/Editing/EditEvents/Config.daml @@ -1,4 +1,4 @@ - + - EditEventsSample diff --git a/Editing/EditEvents/EditEvents (C#).md b/Editing/EditEvents/EditEvents (C#).md index 9a9c1644..b7254b06 100644 --- a/Editing/EditEvents/EditEvents (C#).md +++ b/Editing/EditEvents/EditEvents (C#).md @@ -13,7 +13,7 @@ Language: C# Subject: Editing Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Editing/EditEvents/ReadMe.md b/Editing/EditEvents/ReadMe.md index 9a9c1644..b7254b06 100644 --- a/Editing/EditEvents/ReadMe.md +++ b/Editing/EditEvents/ReadMe.md @@ -13,7 +13,7 @@ Language: C# Subject: Editing Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Editing/EditOperationRowEvent/Config.daml b/Editing/EditOperationRowEvent/Config.daml index b8a84f5a..5aa70691 100644 --- a/Editing/EditOperationRowEvent/Config.daml +++ b/Editing/EditOperationRowEvent/Config.daml @@ -1,4 +1,4 @@ - + - + Extend a line to the intersection of another feature. diff --git a/Editing/ExtendTool/ExtendTool (C#).md b/Editing/ExtendTool/ExtendTool (C#).md index 63b29919..2f70b2c7 100644 --- a/Editing/ExtendTool/ExtendTool (C#).md +++ b/Editing/ExtendTool/ExtendTool (C#).md @@ -13,7 +13,7 @@ Language: C# Subject: Editing Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Editing/ExtendTool/ReadMe.md b/Editing/ExtendTool/ReadMe.md index 63b29919..2f70b2c7 100644 --- a/Editing/ExtendTool/ReadMe.md +++ b/Editing/ExtendTool/ReadMe.md @@ -13,7 +13,7 @@ Language: C# Subject: Editing Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Editing/GeometryControl/Config.daml b/Editing/GeometryControl/Config.daml new file mode 100644 index 00000000..8ed5cffa --- /dev/null +++ b/Editing/GeometryControl/Config.daml @@ -0,0 +1,68 @@ + + + + + GeometryControl + Demonstrates the usage of the GeometryControl for viewing geometry vertices or sketch vertices. + Images\AddinDesktop32.png + ArcGIS Pro SDK Team, arcgisprosdk@esri.com + esri, http://www.esri.com + 4/2019 + Editing + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Editing/GeometryControl/DarkImages/AddInDesktop16.png b/Editing/GeometryControl/DarkImages/AddInDesktop16.png new file mode 100644 index 00000000..0118942a Binary files /dev/null and b/Editing/GeometryControl/DarkImages/AddInDesktop16.png differ diff --git a/Editing/GeometryControl/DarkImages/AddInDesktop32.png b/Editing/GeometryControl/DarkImages/AddInDesktop32.png new file mode 100644 index 00000000..9713e3b1 Binary files /dev/null and b/Editing/GeometryControl/DarkImages/AddInDesktop32.png differ diff --git a/Editing/GeometryControl/DarkImages/GenericButtonPurple16.png b/Editing/GeometryControl/DarkImages/GenericButtonPurple16.png new file mode 100644 index 00000000..013686b0 Binary files /dev/null and b/Editing/GeometryControl/DarkImages/GenericButtonPurple16.png differ diff --git a/Editing/GeometryControl/DarkImages/GenericButtonPurple32.png b/Editing/GeometryControl/DarkImages/GenericButtonPurple32.png new file mode 100644 index 00000000..7d871f5e Binary files /dev/null and b/Editing/GeometryControl/DarkImages/GenericButtonPurple32.png differ diff --git a/Editing/GeometryControl/DarkImages/GenericButtonRed16.png b/Editing/GeometryControl/DarkImages/GenericButtonRed16.png new file mode 100644 index 00000000..6e372d76 Binary files /dev/null and b/Editing/GeometryControl/DarkImages/GenericButtonRed16.png differ diff --git a/Editing/GeometryControl/DarkImages/GenericButtonRed32.png b/Editing/GeometryControl/DarkImages/GenericButtonRed32.png new file mode 100644 index 00000000..2bf59bed Binary files /dev/null and b/Editing/GeometryControl/DarkImages/GenericButtonRed32.png differ diff --git a/Editing/GeometryControl/GeometryControl (C#).md b/Editing/GeometryControl/GeometryControl (C#).md new file mode 100644 index 00000000..323dd929 --- /dev/null +++ b/Editing/GeometryControl/GeometryControl (C#).md @@ -0,0 +1,61 @@ +## GeometryControl + + +This sample demonstrates the UI GeometryControl. You can use this control to view sketch vertices or geometry vertices. + + + +View it live + + +``` +Language: C# +Subject: Editing +Contributor: ArcGIS Pro SDK Team +Organization: Esri, http://www.esri.com +Date: 7/01/2020 +ArcGIS Pro: 2.6 +Visual Studio: 2019 +.NET Target Framework: 4.8 +``` + +## Resources + +* [API Reference online](https://pro.arcgis.com/en/pro-app/sdk/api-reference) +* ArcGIS Pro SDK for .NET (pro.arcgis.com) +* [arcgis-pro-sdk-community-samples](https://github.com/Esri/arcgis-pro-sdk-community-samples) +* [ArcGIS Pro DAML ID Reference](https://github.com/Esri/arcgis-pro-sdk/wiki/ArcGIS-Pro-DAML-ID-Reference) +* [FAQ](https://github.com/Esri/arcgis-pro-sdk/wiki/FAQ) +* [ArcGIS Pro SDK icons](https://github.com/Esri/arcgis-pro-sdk/releases/tag/2.4.0.19948) + +![ArcGIS Pro SDK for .NET Icons](https://Esri.github.io/arcgis-pro-sdk/images/Home/Image-of-icons.png "ArcGIS Pro SDK Icons") + +### Samples Data + +* Sample data for ArcGIS Pro SDK Community Samples can be downloaded from the [repo releases](https://github.com/Esri/arcgis-pro-sdk-community-samples/releases) page. + +## How to use the sample + +1. In Visual Studio, build the solution. +1. Click Start button to open ArcGIS Pro. +1. Open any project containing data. +1. Activate the Add-in tab. +![UI](Screenshots/UI_Ribbon.png) + +1. Click the 'Show GeometryView Dockpane' button. A new dockpane should be displayed. +1. Use the Select tool on the Map tab to select a feature. The vertices of the feature's geometry should be displayed in the dockpane. +![UI](Screenshots/GeometryVertices.png) + +1. Click the 'Sketch Vertices' tool button. An empty control will be overlayed on the map. +![UI](Screenshots/SketchVertices.png) + +1. Start sketching with the tool. The vertices of the sketch should be displayed. +![UI](Screenshots/Sketchvertices2.png) + + + + + +      ArcGIS Pro SDK for Microsoft .NET Framework +             +[Home](https://github.com/Esri/arcgis-pro-sdk/wiki) | API Reference | [Requirements](https://github.com/Esri/arcgis-pro-sdk/wiki#requirements) | [Download](https://github.com/Esri/arcgis-pro-sdk/wiki#installing-arcgis-pro-sdk-for-net) | Samples diff --git a/Editing/GeometryControl/GeometryControl.csproj b/Editing/GeometryControl/GeometryControl.csproj new file mode 100644 index 00000000..d0692a5a --- /dev/null +++ b/Editing/GeometryControl/GeometryControl.csproj @@ -0,0 +1,209 @@ + + + + Debug + AnyCPU + 8.0.30703 + 2.0 + {448525A2-1F86-4436-B550-C1EACDC502DD} + Library + Properties + GeometryControl + GeometryControl + v4.8 + 512 + {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + Program + C:\Program Files\ArcGIS\Pro\bin\ArcGISPro.exe + AnyCPU + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + Program + C:\Program Files\ArcGIS\Pro\bin\ArcGISPro.exe + AnyCPU + + + $([MSBuild]::GetRegistryValueFromView('HKEY_LOCAL_MACHINE\SOFTWARE\ESRI\ArcGISPro', 'InstallDir', null, RegistryView.Registry64)) + $(registry:HKEY_CURRENT_USER\SOFTWARE\ESRI\ArcGISPro@InstallDir) + + + + + + + + + + + + + + + + C:\Program Files\ArcGIS\Pro\bin\ArcGIS.Desktop.Framework.dll + False + + + C:\Program Files\ArcGIS\Pro\bin\ArcGIS.Core.dll + False + + + C:\Program Files\ArcGIS\Pro\bin\Extensions\Core\ArcGIS.Desktop.Core.dll + False + + + C:\Program Files\ArcGIS\Pro\bin\Extensions\Mapping\ArcGIS.Desktop.Mapping.dll + False + + + C:\Program Files\ArcGIS\Pro\bin\Extensions\Catalog\ArcGIS.Desktop.Catalog.dll + False + + + C:\Program Files\ArcGIS\Pro\bin\Extensions\Editing\ArcGIS.Desktop.Editing.dll + False + + + C:\Program Files\ArcGIS\Pro\bin\Extensions\DesktopExtensions\ArcGIS.Desktop.Extensions.dll + False + + + C:\Program Files\ArcGIS\Pro\bin\Extensions\GeoProcessing\ArcGIS.Desktop.GeoProcessing.dll + False + + + C:\Program Files\ArcGIS\Pro\bin\Extensions\Layout\ArcGIS.Desktop.Layouts.dll + False + + + C:\Program Files\ArcGIS\Pro\bin\ArcGIS.Desktop.Shared.Wpf.dll + False + + + C:\Program Files\ArcGIS\Pro\bin\ArcGIS.Desktop.Ribbon.Wpf.dll + False + + + C:\Program Files\ArcGIS\Pro\bin\ArcGIS.Desktop.DataGrid.Contrib.Wpf.dll + False + + + C:\Program Files\ArcGIS\Pro\bin\ArcGIS.Desktop.Resources.dll + False + + + C:\Program Files\ArcGIS\Pro\bin\ArcGIS.Desktop.Resources.dll + False + + + C:\Program Files\ArcGIS\Pro\bin\ESRI.ArcGIS.ItemIndex.dll + False + + + + + + + + + + + + GeometryViewDockpane.xaml + + + + + + + SketchPropertiesView.xaml + + + + + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + BuildDefault + bin\Debug\GeometryControl.xml + + + BuildDefault + + + + + + + + + \ No newline at end of file diff --git a/Editing/GeometryControl/GeometryControl.sln b/Editing/GeometryControl/GeometryControl.sln new file mode 100644 index 00000000..06256bd5 --- /dev/null +++ b/Editing/GeometryControl/GeometryControl.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29509.3 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GeometryControl", "GeometryControl.csproj", "{448525A2-1F86-4436-B550-C1EACDC502DD}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {448525A2-1F86-4436-B550-C1EACDC502DD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {448525A2-1F86-4436-B550-C1EACDC502DD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {448525A2-1F86-4436-B550-C1EACDC502DD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {448525A2-1F86-4436-B550-C1EACDC502DD}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {68947521-84BD-4FD8-BA9D-49A2BA4F3B0F} + EndGlobalSection +EndGlobal diff --git a/Editing/GeometryControl/GeometryViewDockpane.xaml b/Editing/GeometryControl/GeometryViewDockpane.xaml new file mode 100644 index 00000000..50bbbf3f --- /dev/null +++ b/Editing/GeometryControl/GeometryViewDockpane.xaml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/Editing/GeometryControl/GeometryViewDockpane.xaml.cs b/Editing/GeometryControl/GeometryViewDockpane.xaml.cs new file mode 100644 index 00000000..89b6c2f3 --- /dev/null +++ b/Editing/GeometryControl/GeometryViewDockpane.xaml.cs @@ -0,0 +1,42 @@ +// Copyright 2020 Esri +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + + +namespace GeometryControl +{ + /// + /// Interaction logic for GeometryViewDockpaneView.xaml + /// + public partial class GeometryViewDockpaneView : UserControl + { + public GeometryViewDockpaneView() + { + InitializeComponent(); + } + } +} diff --git a/Editing/GeometryControl/GeometryViewDockpaneViewModel.cs b/Editing/GeometryControl/GeometryViewDockpaneViewModel.cs new file mode 100644 index 00000000..8eb5f979 --- /dev/null +++ b/Editing/GeometryControl/GeometryViewDockpaneViewModel.cs @@ -0,0 +1,114 @@ +// Copyright 2020 Esri +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using ArcGIS.Core.CIM; +using ArcGIS.Core.Data; +using ArcGIS.Core.Events; +using ArcGIS.Core.Geometry; +using ArcGIS.Desktop.Catalog; +using ArcGIS.Desktop.Core; +using ArcGIS.Desktop.Editing; +using ArcGIS.Desktop.Extensions; +using ArcGIS.Desktop.Framework; +using ArcGIS.Desktop.Framework.Contracts; +using ArcGIS.Desktop.Framework.Dialogs; +using ArcGIS.Desktop.Framework.Threading.Tasks; +using ArcGIS.Desktop.Mapping; + + +namespace GeometryControl +{ + internal class GeometryViewDockpaneViewModel : DockPane + { + private const string _dockPaneID = "GeometryControl_GeometryViewDockpane"; + + /// + /// Show the DockPane. + /// + internal static void Show() + { + DockPane pane = FrameworkApplication.DockPaneManager.Find(_dockPaneID); + if (pane == null) + return; + + pane.Activate(); + } + + private SubscriptionToken _selectionChangedEventToken; + protected GeometryViewDockpaneViewModel() + { + // subscribe to map selection changed event + if (_selectionChangedEventToken == null) + _selectionChangedEventToken = ArcGIS.Desktop.Mapping.Events.MapSelectionChangedEvent.Subscribe(OnSelectionChanged); + } + + // when the selection changes, obtain the first feature's geometry and assign to the GeometryControl + private async void OnSelectionChanged(ArcGIS.Desktop.Mapping.Events.MapSelectionChangedEventArgs args) + { + if (args == null) + return; + + var sel = args.Selection; + + // get the first BasicFeatureLayer + var member = sel.Keys.FirstOrDefault(mm => mm is BasicFeatureLayer); + if (member == null) + { + Clear(); + return; + } + + // get the first oid + var oids = sel[member]; + var oid = oids[0]; + + // get the geometry of that feature + var geom = await QueuedTask.Run(() => + { + var insp = new ArcGIS.Desktop.Editing.Attributes.Inspector(); + insp.Load(member, oid); + return insp.Shape; + }); + + // bind to the view + Geometry = geom; + } + + private Geometry _geometry; + public Geometry Geometry + { + get => _geometry; + set => SetProperty(ref _geometry, value); + } + + private void Clear() + => Geometry = null; + + } + + /// + /// Button implementation to show the DockPane. + /// + internal class GeometryViewDockpane_ShowButton : Button + { + protected override void OnClick() + { + GeometryViewDockpaneViewModel.Show(); + } + } +} diff --git a/Editing/GeometryControl/Images/AddInDesktop16.png b/Editing/GeometryControl/Images/AddInDesktop16.png new file mode 100644 index 00000000..5910bbf3 Binary files /dev/null and b/Editing/GeometryControl/Images/AddInDesktop16.png differ diff --git a/Editing/GeometryControl/Images/AddInDesktop32.png b/Editing/GeometryControl/Images/AddInDesktop32.png new file mode 100644 index 00000000..1d19084a Binary files /dev/null and b/Editing/GeometryControl/Images/AddInDesktop32.png differ diff --git a/Editing/GeometryControl/Images/GenericButtonPurple16.png b/Editing/GeometryControl/Images/GenericButtonPurple16.png new file mode 100644 index 00000000..01b08950 Binary files /dev/null and b/Editing/GeometryControl/Images/GenericButtonPurple16.png differ diff --git a/Editing/GeometryControl/Images/GenericButtonPurple32.png b/Editing/GeometryControl/Images/GenericButtonPurple32.png new file mode 100644 index 00000000..39f62dbd Binary files /dev/null and b/Editing/GeometryControl/Images/GenericButtonPurple32.png differ diff --git a/Editing/GeometryControl/Images/GenericButtonRed16.png b/Editing/GeometryControl/Images/GenericButtonRed16.png new file mode 100644 index 00000000..58643bae Binary files /dev/null and b/Editing/GeometryControl/Images/GenericButtonRed16.png differ diff --git a/Editing/GeometryControl/Images/GenericButtonRed32.png b/Editing/GeometryControl/Images/GenericButtonRed32.png new file mode 100644 index 00000000..91276827 Binary files /dev/null and b/Editing/GeometryControl/Images/GenericButtonRed32.png differ diff --git a/Editing/GeometryControl/ModifyToolWithSketchProperties.cs b/Editing/GeometryControl/ModifyToolWithSketchProperties.cs new file mode 100644 index 00000000..7f84a1e3 --- /dev/null +++ b/Editing/GeometryControl/ModifyToolWithSketchProperties.cs @@ -0,0 +1,102 @@ +// Copyright 2020 Esri +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using ArcGIS.Core.CIM; +using ArcGIS.Core.Data; +using ArcGIS.Core.Events; +using ArcGIS.Core.Geometry; +using ArcGIS.Desktop.Catalog; +using ArcGIS.Desktop.Core; +using ArcGIS.Desktop.Editing; +using ArcGIS.Desktop.Extensions; +using ArcGIS.Desktop.Framework; +using ArcGIS.Desktop.Framework.Contracts; +using ArcGIS.Desktop.Framework.Dialogs; +using ArcGIS.Desktop.Framework.Threading.Tasks; +using ArcGIS.Desktop.Mapping; + +namespace GeometryControl +{ + internal class ModifyToolWithSketchProperties : MapTool + { + public ModifyToolWithSketchProperties() + { + IsSketchTool = true; + SketchType = SketchGeometryType.Line; + SketchOutputMode = SketchOutputMode.Map; + + this.OverlayControlID = "GeometryControl_SketchPropertiesView"; + } + + private SubscriptionToken _TOCSelectionChangedEventToken; + + protected override Task OnToolActivateAsync(bool active) + { + // set sketch layer on activate + SetSketchLayer(); + + // subscribe to TOC selection changed event + _TOCSelectionChangedEventToken = ArcGIS.Desktop.Mapping.Events.TOCSelectionChangedEvent.Subscribe(OnTOCSelectionChanged); + + return base.OnToolActivateAsync(active); + } + + protected override Task OnToolDeactivateAsync(bool hasMapViewChanged) + { + // unsubscribe from TOC selection changed event + if (_TOCSelectionChangedEventToken != null) + ArcGIS.Desktop.Mapping.Events.TOCSelectionChangedEvent.Unsubscribe(OnTOCSelectionChanged); + _TOCSelectionChangedEventToken = null; + + return base.OnToolDeactivateAsync(hasMapViewChanged); + } + + protected override Task OnSketchCompleteAsync(Geometry geometry) + { + return base.OnSketchCompleteAsync(geometry); + } + + // when selection on the TOC changes, update the SketchLayer + private void OnTOCSelectionChanged(ArcGIS.Desktop.Mapping.Events.MapViewEventArgs args) + { + if (args == null) + return; + + SetSketchLayer(); + } + + // sets the SketchLayer on the overlay control to be the first item selected in the TOC. + // The properties of the layer's feature class determines whether the GeometryControl displays Z, M values. + private void SetSketchLayer() + { + // get the overlay viewmodel + var vm = OverlayEmbeddableControl as SketchPropertiesViewModel; + if (vm == null) + return; + + // get the first layer selected in the toc + var selectedLayer = MapView.Active.GetSelectedLayers().FirstOrDefault(); + // set the sketch layer property (in order to obtain Zs, Ms as appropriate) + if (selectedLayer is BasicFeatureLayer sbf) + vm.SketchLayer = sbf; + else + vm.SketchLayer = null; + } + } +} + diff --git a/Editing/GeometryControl/Module1.cs b/Editing/GeometryControl/Module1.cs new file mode 100644 index 00000000..a8318332 --- /dev/null +++ b/Editing/GeometryControl/Module1.cs @@ -0,0 +1,82 @@ +// Copyright 2020 Esri +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Windows.Input; +using System.Threading.Tasks; +using ArcGIS.Core.CIM; +using ArcGIS.Core.Data; +using ArcGIS.Core.Geometry; +using ArcGIS.Desktop.Catalog; +using ArcGIS.Desktop.Core; +using ArcGIS.Desktop.Editing; +using ArcGIS.Desktop.Extensions; +using ArcGIS.Desktop.Framework; +using ArcGIS.Desktop.Framework.Contracts; +using ArcGIS.Desktop.Framework.Dialogs; +using ArcGIS.Desktop.Framework.Threading.Tasks; +using ArcGIS.Desktop.Mapping; + +namespace GeometryControl +{ + /// + /// This sample demonstrates the UI GeometryControl. You can use this control to view sketch vertices or geometry vertices. + /// + /// + /// 1. In Visual Studio, build the solution. + /// 1. Click Start button to open ArcGIS Pro. + /// 1. Open any project containing data. + /// 1. Activate the Add-in tab. + /// ![UI](Screenshots/UI_Ribbon.png) + /// 1. Click the 'Show GeometryView Dockpane' button. A new dockpane should be displayed. + /// 1. Use the Select tool on the Map tab to select a feature. The vertices of the feature's geometry should be displayed in the dockpane. + /// ![UI](Screenshots/GeometryVertices.png) + /// 1. Click the 'Sketch Vertices' tool button. An empty control will be overlayed on the map. + /// ![UI](Screenshots/SketchVertices.png) + /// 1. Start sketching with the tool. The vertices of the sketch should be displayed. + /// ![UI](Screenshots/Sketchvertices2.png) + /// + internal class Module1 : Module + { + private static Module1 _this = null; + + /// + /// Retrieve the singleton instance to this module here + /// + public static Module1 Current + { + get + { + return _this ?? (_this = (Module1)FrameworkApplication.FindModule("GeometryControl_Module")); + } + } + + #region Overrides + /// + /// Called by Framework when ArcGIS Pro is closing + /// + /// False to prevent Pro from closing, otherwise True + protected override bool CanUnload() + { + //TODO - add your business logic + //return false to ~cancel~ Application close + return true; + } + + #endregion Overrides + + } +} diff --git a/Editing/GeometryControl/Properties/AssemblyInfo.cs b/Editing/GeometryControl/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..c10e4e29 --- /dev/null +++ b/Editing/GeometryControl/Properties/AssemblyInfo.cs @@ -0,0 +1,54 @@ +/* + + Copyright 2020 Esri + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + + See the License for the specific language governing permissions and + limitations under the License. + +*/ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("GeometryControl")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Acme")] +[assembly: AssemblyProduct("GeometryControl")] +[assembly: AssemblyCopyright("Copyright © Acme 2020")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("448525a2-1f86-4436-b550-c1eacdc502dd")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Editing/GeometryControl/ReadMe.md b/Editing/GeometryControl/ReadMe.md new file mode 100644 index 00000000..323dd929 --- /dev/null +++ b/Editing/GeometryControl/ReadMe.md @@ -0,0 +1,61 @@ +## GeometryControl + + +This sample demonstrates the UI GeometryControl. You can use this control to view sketch vertices or geometry vertices. + + + +View it live + + +``` +Language: C# +Subject: Editing +Contributor: ArcGIS Pro SDK Team +Organization: Esri, http://www.esri.com +Date: 7/01/2020 +ArcGIS Pro: 2.6 +Visual Studio: 2019 +.NET Target Framework: 4.8 +``` + +## Resources + +* [API Reference online](https://pro.arcgis.com/en/pro-app/sdk/api-reference) +* ArcGIS Pro SDK for .NET (pro.arcgis.com) +* [arcgis-pro-sdk-community-samples](https://github.com/Esri/arcgis-pro-sdk-community-samples) +* [ArcGIS Pro DAML ID Reference](https://github.com/Esri/arcgis-pro-sdk/wiki/ArcGIS-Pro-DAML-ID-Reference) +* [FAQ](https://github.com/Esri/arcgis-pro-sdk/wiki/FAQ) +* [ArcGIS Pro SDK icons](https://github.com/Esri/arcgis-pro-sdk/releases/tag/2.4.0.19948) + +![ArcGIS Pro SDK for .NET Icons](https://Esri.github.io/arcgis-pro-sdk/images/Home/Image-of-icons.png "ArcGIS Pro SDK Icons") + +### Samples Data + +* Sample data for ArcGIS Pro SDK Community Samples can be downloaded from the [repo releases](https://github.com/Esri/arcgis-pro-sdk-community-samples/releases) page. + +## How to use the sample + +1. In Visual Studio, build the solution. +1. Click Start button to open ArcGIS Pro. +1. Open any project containing data. +1. Activate the Add-in tab. +![UI](Screenshots/UI_Ribbon.png) + +1. Click the 'Show GeometryView Dockpane' button. A new dockpane should be displayed. +1. Use the Select tool on the Map tab to select a feature. The vertices of the feature's geometry should be displayed in the dockpane. +![UI](Screenshots/GeometryVertices.png) + +1. Click the 'Sketch Vertices' tool button. An empty control will be overlayed on the map. +![UI](Screenshots/SketchVertices.png) + +1. Start sketching with the tool. The vertices of the sketch should be displayed. +![UI](Screenshots/Sketchvertices2.png) + + + + + +      ArcGIS Pro SDK for Microsoft .NET Framework +             +[Home](https://github.com/Esri/arcgis-pro-sdk/wiki) | API Reference | [Requirements](https://github.com/Esri/arcgis-pro-sdk/wiki#requirements) | [Download](https://github.com/Esri/arcgis-pro-sdk/wiki#installing-arcgis-pro-sdk-for-net) | Samples diff --git a/Editing/GeometryControl/Screenshots/GeometryVertices.png b/Editing/GeometryControl/Screenshots/GeometryVertices.png new file mode 100644 index 00000000..7d363927 Binary files /dev/null and b/Editing/GeometryControl/Screenshots/GeometryVertices.png differ diff --git a/Editing/GeometryControl/Screenshots/SketchVertices.png b/Editing/GeometryControl/Screenshots/SketchVertices.png new file mode 100644 index 00000000..9445e5aa Binary files /dev/null and b/Editing/GeometryControl/Screenshots/SketchVertices.png differ diff --git a/Editing/GeometryControl/Screenshots/Sketchvertices2.png b/Editing/GeometryControl/Screenshots/Sketchvertices2.png new file mode 100644 index 00000000..f3e2acc4 Binary files /dev/null and b/Editing/GeometryControl/Screenshots/Sketchvertices2.png differ diff --git a/Editing/GeometryControl/Screenshots/UI_Ribbon.png b/Editing/GeometryControl/Screenshots/UI_Ribbon.png new file mode 100644 index 00000000..affc82f1 Binary files /dev/null and b/Editing/GeometryControl/Screenshots/UI_Ribbon.png differ diff --git a/Editing/GeometryControl/SketchPropertiesView.xaml b/Editing/GeometryControl/SketchPropertiesView.xaml new file mode 100644 index 00000000..d0903f29 --- /dev/null +++ b/Editing/GeometryControl/SketchPropertiesView.xaml @@ -0,0 +1,38 @@ + + + + + + + + + + + + + diff --git a/Editing/GeometryControl/SketchPropertiesView.xaml.cs b/Editing/GeometryControl/SketchPropertiesView.xaml.cs new file mode 100644 index 00000000..ed106733 --- /dev/null +++ b/Editing/GeometryControl/SketchPropertiesView.xaml.cs @@ -0,0 +1,42 @@ +// Copyright 2020 Esri +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + + +namespace GeometryControl +{ + /// + /// Interaction logic for SketchPropertiesViewView.xaml + /// + public partial class SketchPropertiesView : UserControl + { + public SketchPropertiesView() + { + InitializeComponent(); + } + } +} diff --git a/Editing/GeometryControl/SketchPropertiesViewModel.cs b/Editing/GeometryControl/SketchPropertiesViewModel.cs new file mode 100644 index 00000000..64c21803 --- /dev/null +++ b/Editing/GeometryControl/SketchPropertiesViewModel.cs @@ -0,0 +1,48 @@ +// Copyright 2020 Esri +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Xml.Linq; +using ArcGIS.Core.CIM; +using ArcGIS.Core.Data; +using ArcGIS.Core.Geometry; +using ArcGIS.Desktop.Catalog; +using ArcGIS.Desktop.Core; +using ArcGIS.Desktop.Editing; +using ArcGIS.Desktop.Extensions; +using ArcGIS.Desktop.Framework; +using ArcGIS.Desktop.Framework.Contracts; +using ArcGIS.Desktop.Framework.Controls; +using ArcGIS.Desktop.Framework.Dialogs; +using ArcGIS.Desktop.Framework.Threading.Tasks; +using ArcGIS.Desktop.Mapping; + + +namespace GeometryControl +{ + internal class SketchPropertiesViewModel : EmbeddableControl + { + public SketchPropertiesViewModel(XElement options, bool canChangeOptions) : base(options, canChangeOptions) { } + + private BasicFeatureLayer _sketchLayer; + public BasicFeatureLayer SketchLayer + { + get => _sketchLayer; + set => SetProperty(ref _sketchLayer, value); + } + } +} diff --git a/Editing/GridScaleCADLayer/Config.daml b/Editing/GridScaleCADLayer/Config.daml index 401daae8..5becef2b 100644 --- a/Editing/GridScaleCADLayer/Config.daml +++ b/Editing/GridScaleCADLayer/Config.daml @@ -1,4 +1,4 @@ - + + + + LayerSnapModes + Display layer snap modes in a dockpane + Images\AddinDesktop32.png + ArcGIS Pro SDK Team, arcgisprosdk@esri.com + esri, http://www.esri.com + 4/2020 + Editing + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Editing/LayerSnapModes/DarkImages/AddInDesktop16.png b/Editing/LayerSnapModes/DarkImages/AddInDesktop16.png new file mode 100644 index 00000000..0118942a Binary files /dev/null and b/Editing/LayerSnapModes/DarkImages/AddInDesktop16.png differ diff --git a/Editing/LayerSnapModes/DarkImages/AddInDesktop32.png b/Editing/LayerSnapModes/DarkImages/AddInDesktop32.png new file mode 100644 index 00000000..9713e3b1 Binary files /dev/null and b/Editing/LayerSnapModes/DarkImages/AddInDesktop32.png differ diff --git a/Editing/LayerSnapModes/DarkImages/GenericButtonPurple16.png b/Editing/LayerSnapModes/DarkImages/GenericButtonPurple16.png new file mode 100644 index 00000000..013686b0 Binary files /dev/null and b/Editing/LayerSnapModes/DarkImages/GenericButtonPurple16.png differ diff --git a/Editing/LayerSnapModes/DarkImages/GenericButtonPurple32.png b/Editing/LayerSnapModes/DarkImages/GenericButtonPurple32.png new file mode 100644 index 00000000..7d871f5e Binary files /dev/null and b/Editing/LayerSnapModes/DarkImages/GenericButtonPurple32.png differ diff --git a/Editing/LayerSnapModes/Images/AddInDesktop16.png b/Editing/LayerSnapModes/Images/AddInDesktop16.png new file mode 100644 index 00000000..5910bbf3 Binary files /dev/null and b/Editing/LayerSnapModes/Images/AddInDesktop16.png differ diff --git a/Editing/LayerSnapModes/Images/AddInDesktop32.png b/Editing/LayerSnapModes/Images/AddInDesktop32.png new file mode 100644 index 00000000..1d19084a Binary files /dev/null and b/Editing/LayerSnapModes/Images/AddInDesktop32.png differ diff --git a/Editing/LayerSnapModes/Images/GenericButtonPurple16.png b/Editing/LayerSnapModes/Images/GenericButtonPurple16.png new file mode 100644 index 00000000..01b08950 Binary files /dev/null and b/Editing/LayerSnapModes/Images/GenericButtonPurple16.png differ diff --git a/Editing/LayerSnapModes/Images/GenericButtonPurple32.png b/Editing/LayerSnapModes/Images/GenericButtonPurple32.png new file mode 100644 index 00000000..39f62dbd Binary files /dev/null and b/Editing/LayerSnapModes/Images/GenericButtonPurple32.png differ diff --git a/Editing/LayerSnapModes/LayerSnapModes (C#).md b/Editing/LayerSnapModes/LayerSnapModes (C#).md new file mode 100644 index 00000000..691da944 --- /dev/null +++ b/Editing/LayerSnapModes/LayerSnapModes (C#).md @@ -0,0 +1,55 @@ +## LayerSnapModes + + +This sample illustrates the use of layer snap modes, which provides the ability to set the snap mode (vertex, edge, end etc) on a per layer basis. +The layer snap modes are presented in a datagrid hosted by a simple dockpane. + + + +View it live + + +``` +Language: C# +Subject: Editing +Contributor: ArcGIS Pro SDK Team +Organization: Esri, http://www.esri.com +Date: 7/01/2020 +ArcGIS Pro: 2.6 +Visual Studio: 2019 +.NET Target Framework: 4.8 +``` + +## Resources + +* [API Reference online](https://pro.arcgis.com/en/pro-app/sdk/api-reference) +* ArcGIS Pro SDK for .NET (pro.arcgis.com) +* [arcgis-pro-sdk-community-samples](https://github.com/Esri/arcgis-pro-sdk-community-samples) +* [ArcGIS Pro DAML ID Reference](https://github.com/Esri/arcgis-pro-sdk/wiki/ArcGIS-Pro-DAML-ID-Reference) +* [FAQ](https://github.com/Esri/arcgis-pro-sdk/wiki/FAQ) +* [ArcGIS Pro SDK icons](https://github.com/Esri/arcgis-pro-sdk/releases/tag/2.4.0.19948) + +![ArcGIS Pro SDK for .NET Icons](https://Esri.github.io/arcgis-pro-sdk/images/Home/Image-of-icons.png "ArcGIS Pro SDK Icons") + +### Samples Data + +* Sample data for ArcGIS Pro SDK Community Samples can be downloaded from the [repo releases](https://github.com/Esri/arcgis-pro-sdk-community-samples/releases) page. + +## How to use the sample + +1. In Visual Studio, build the solution. +1. Click the Visual Studio Start button to open ArcGIS Pro. +1. In Pro, open a map with feature layers or create a new map and add some. +1. Turn on the application snap modes Vertex, Edge and End from the snapping dropdown on the editing tab. +1. On the add-in tab, click Show LayerSnapModes to display the LayerSnapModes dockpane. +![UI](Screenshots/lsm_dockpane.png) + +1. Toggle some of the layer snap modes and examine the effect when snapping to the layer with a tool such as the measure tool. + + + + + +      ArcGIS Pro SDK for Microsoft .NET Framework +             +[Home](https://github.com/Esri/arcgis-pro-sdk/wiki) | API Reference | [Requirements](https://github.com/Esri/arcgis-pro-sdk/wiki#requirements) | [Download](https://github.com/Esri/arcgis-pro-sdk/wiki#installing-arcgis-pro-sdk-for-net) | Samples diff --git a/Editing/LayerSnapModes/LayerSnapModes.csproj b/Editing/LayerSnapModes/LayerSnapModes.csproj new file mode 100644 index 00000000..0e3a1337 --- /dev/null +++ b/Editing/LayerSnapModes/LayerSnapModes.csproj @@ -0,0 +1,184 @@ + + + + Debug + AnyCPU + 8.0.30703 + 2.0 + {6F4571D5-2DE7-4717-8C4C-51130C0B473B} + Library + Properties + LayerSnapModes + LayerSnapModes + v4.8 + 512 + {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + Program + C:\Program Files\ArcGIS\Pro\bin\ArcGISPro.exe + AnyCPU + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + Program + C:\Program Files\ArcGIS\Pro\bin\ArcGISPro.exe + AnyCPU + + + $([MSBuild]::GetRegistryValueFromView('HKEY_LOCAL_MACHINE\SOFTWARE\ESRI\ArcGISPro', 'InstallDir', null, RegistryView.Registry64)) + $(registry:HKEY_CURRENT_USER\SOFTWARE\ESRI\ArcGISPro@InstallDir) + + + + + + + + + + + + + + + + C:\Program Files\ArcGIS\Pro\bin\ArcGIS.Desktop.Framework.dll + False + + + C:\Program Files\ArcGIS\Pro\bin\ArcGIS.Core.dll + False + + + C:\Program Files\ArcGIS\Pro\bin\Extensions\Core\ArcGIS.Desktop.Core.dll + False + + + C:\Program Files\ArcGIS\Pro\bin\Extensions\Mapping\ArcGIS.Desktop.Mapping.dll + False + + + C:\Program Files\ArcGIS\Pro\bin\Extensions\Catalog\ArcGIS.Desktop.Catalog.dll + False + + + C:\Program Files\ArcGIS\Pro\bin\Extensions\Editing\ArcGIS.Desktop.Editing.dll + False + + + C:\Program Files\ArcGIS\Pro\bin\Extensions\DesktopExtensions\ArcGIS.Desktop.Extensions.dll + False + + + C:\Program Files\ArcGIS\Pro\bin\Extensions\GeoProcessing\ArcGIS.Desktop.GeoProcessing.dll + False + + + C:\Program Files\ArcGIS\Pro\bin\Extensions\Layout\ArcGIS.Desktop.Layouts.dll + False + + + C:\Program Files\ArcGIS\Pro\bin\ArcGIS.Desktop.Shared.Wpf.dll + False + + + C:\Program Files\ArcGIS\Pro\bin\ArcGIS.Desktop.Ribbon.Wpf.dll + False + + + C:\Program Files\ArcGIS\Pro\bin\ArcGIS.Desktop.DataGrid.Contrib.Wpf.dll + False + + + C:\Program Files\ArcGIS\Pro\bin\ArcGIS.Desktop.Resources.dll + False + + + C:\Program Files\ArcGIS\Pro\bin\ArcGIS.Desktop.Resources.dll + False + + + C:\Program Files\ArcGIS\Pro\bin\ESRI.ArcGIS.ItemIndex.dll + False + + + + + + + + + + + + LayerSnapModesPane.xaml + + + + + + + + Designer + MSBuild:Compile + + + + + + + + + + + + + + + + + + + + + + BuildDefault + bin\Debug\LayerSnapModes.xml + + + BuildDefault + + + + + + + + + \ No newline at end of file diff --git a/Editing/LayerSnapModes/LayerSnapModes.sln b/Editing/LayerSnapModes/LayerSnapModes.sln new file mode 100644 index 00000000..a7947eb8 --- /dev/null +++ b/Editing/LayerSnapModes/LayerSnapModes.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30011.22 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LayerSnapModes", "LayerSnapModes.csproj", "{6F4571D5-2DE7-4717-8C4C-51130C0B473B}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {6F4571D5-2DE7-4717-8C4C-51130C0B473B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6F4571D5-2DE7-4717-8C4C-51130C0B473B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6F4571D5-2DE7-4717-8C4C-51130C0B473B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6F4571D5-2DE7-4717-8C4C-51130C0B473B}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {EFFF8C76-4BE4-46F1-8107-9453BD423E03} + EndGlobalSection +EndGlobal diff --git a/Editing/LayerSnapModes/LayerSnapModesPane.xaml b/Editing/LayerSnapModes/LayerSnapModesPane.xaml new file mode 100644 index 00000000..b912af9c --- /dev/null +++ b/Editing/LayerSnapModes/LayerSnapModesPane.xaml @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Editing/LayerSnapModes/LayerSnapModesPane.xaml.cs b/Editing/LayerSnapModes/LayerSnapModesPane.xaml.cs new file mode 100644 index 00000000..23e1e7f9 --- /dev/null +++ b/Editing/LayerSnapModes/LayerSnapModesPane.xaml.cs @@ -0,0 +1,30 @@ +//Copyright 2020 Esri + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +using System.Windows.Controls; + + +namespace LayerSnapModes +{ + /// + /// Interaction logic for LayerSnapModesPaneView.xaml + /// + public partial class LayerSnapModesPaneView : UserControl + { + public LayerSnapModesPaneView() + { + InitializeComponent(); + } + } +} diff --git a/Editing/LayerSnapModes/LayerSnapModesPaneViewModel.cs b/Editing/LayerSnapModes/LayerSnapModesPaneViewModel.cs new file mode 100644 index 00000000..c718d481 --- /dev/null +++ b/Editing/LayerSnapModes/LayerSnapModesPaneViewModel.cs @@ -0,0 +1,147 @@ +//Copyright 2020 Esri + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +using ArcGIS.Desktop.Framework; +using ArcGIS.Desktop.Framework.Contracts; +using ArcGIS.Desktop.Mapping; +using ArcGIS.Desktop.Mapping.Events; +using System; +using System.Collections.ObjectModel; +using System.Linq; + +namespace LayerSnapModes +{ + internal class LayerSnapModesPaneViewModel : DockPane + { + private const string _dockPaneID = "LayerSnapModes_LayerSnapModesPane"; + private static ObservableCollection _snapCollection = new ObservableCollection(); + + protected LayerSnapModesPaneViewModel() + { + //subscribe to events to populate snap layer list when the map changes, layers added/removed + ActiveMapViewChangedEvent.Subscribe(OnActiveMapViewChanged); + LayersAddedEvent.Subscribe(onLayersAddRem); + LayersRemovedEvent.Subscribe(onLayersAddRem); + } + + private void OnActiveMapViewChanged(ActiveMapViewChangedEventArgs obj) + { + if (obj.IncomingView == null) + return; + //populate the snap list with layers in the incoming active map + PopulateSnapList(); + } + + private void onLayersAddRem(LayerEventsArgs obj) + { + //regenerate snaplist when layers are added or removed + //run on UI Thread to sync layersadded event (which runs on background) + System.Windows.Application.Current.Dispatcher.BeginInvoke((Action)(() => { PopulateSnapList(); })); + } + /// + /// Show the DockPane. + /// + internal static void Show() + { + DockPane pane = FrameworkApplication.DockPaneManager.Find(_dockPaneID); + if (pane == null) + return; + PopulateSnapList(); + pane.Activate(); + } + + /// + /// Text shown near the top of the DockPane. + /// + private string _heading = "Layer Snap Modes"; + public string Heading + { + get => _heading; + set => SetProperty(ref _heading, value); + } + /// + /// Collection bound to datagrid + /// + public ObservableCollection SnapList + { + get => _snapCollection; + set => SetProperty(ref _snapCollection, value); + } + + public static void PopulateSnapList() + { + //populate the snaplist for the active map with feature layers + _snapCollection.Clear(); + var layerlist = MapView.Active.Map.GetLayersAsFlattenedList().OfType(); + foreach (var layer in layerlist) + { + var lsm = Snapping.GetLayerSnapModes(layer); + _snapCollection.Add(new SnapAgent(layer, lsm.Vertex, lsm.Edge, lsm.End)); + } + } + + public class SnapAgent : ViewModelBase + { + public SnapAgent(Layer layer, bool vertex, bool edge, bool end) { this.layer = layer; _vertex = vertex; _edge = edge; _end = end; } + + private bool _vertex; + private bool _edge; + private bool _end; + public Layer layer { get; set; } + public bool Vertex + { + get => _vertex; + set + { + SetProperty(ref _vertex, value); + Snapping.SetLayerSnapModes(layer, SnapMode.Vertex, value); + + //alternate method + //var lsm = Snapping.GetLayerSnapModes(layer); + //lsm.Vertex = value; + //Snapping.SetLayerSnapModes(layer, lsm); + } + } + public bool Edge + { + get => _edge; + set + { + SetProperty(ref _edge, value); + Snapping.SetLayerSnapModes(layer, SnapMode.Edge, value); + } + } + public bool End + { + get => _end; + set + { + SetProperty(ref _end, value); + Snapping.SetLayerSnapModes(layer, SnapMode.End, value); + } + } + } + } + + /// + /// Button implementation to show the DockPane. + /// + internal class LayerSnapModesPane_ShowButton : Button + { + protected override void OnClick() + { + LayerSnapModesPaneViewModel.Show(); + } + } +} diff --git a/Editing/LayerSnapModes/Module1.cs b/Editing/LayerSnapModes/Module1.cs new file mode 100644 index 00000000..dd4c878d --- /dev/null +++ b/Editing/LayerSnapModes/Module1.cs @@ -0,0 +1,64 @@ +//Copyright 2020 Esri + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +using ArcGIS.Desktop.Framework; +using ArcGIS.Desktop.Framework.Contracts; + +namespace LayerSnapModes +{ + + /// + /// This sample illustrates the use of layer snap modes, which provides the ability to set the snap mode (vertex, edge, end etc) on a per layer basis. + /// The layer snap modes are presented in a datagrid hosted by a simple dockpane. + /// + /// + /// 1. In Visual Studio, build the solution. + /// 1. Click the Visual Studio Start button to open ArcGIS Pro. + /// 1. In Pro, open a map with feature layers or create a new map and add some. + /// 1. Turn on the application snap modes Vertex, Edge and End from the snapping dropdown on the editing tab. + /// 1. On the add-in tab, click Show LayerSnapModes to display the LayerSnapModes dockpane. + /// ![UI](Screenshots/lsm_dockpane.png) + /// 1. Toggle some of the layer snap modes and examine the effect when snapping to the layer with a tool such as the measure tool. + /// + internal class Module1 : Module + { + private static Module1 _this = null; + + /// + /// Retrieve the singleton instance to this module here + /// + public static Module1 Current + { + get + { + return _this ?? (_this = (Module1)FrameworkApplication.FindModule("LayerSnapModes_Module")); + } + } + + #region Overrides + /// + /// Called by Framework when ArcGIS Pro is closing + /// + /// False to prevent Pro from closing, otherwise True + protected override bool CanUnload() + { + //TODO - add your business logic + //return false to ~cancel~ Application close + return true; + } + + #endregion Overrides + + } +} diff --git a/Editing/LayerSnapModes/Properties/AssemblyInfo.cs b/Editing/LayerSnapModes/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..73c2d21a --- /dev/null +++ b/Editing/LayerSnapModes/Properties/AssemblyInfo.cs @@ -0,0 +1,54 @@ +/* + + Copyright 2020 Esri + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + + See the License for the specific language governing permissions and + limitations under the License. + +*/ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("LayerSnapModes")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Acme")] +[assembly: AssemblyProduct("LayerSnapModes")] +[assembly: AssemblyCopyright("Copyright © Acme 2020")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("6f4571d5-2de7-4717-8c4c-51130c0b473b")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Editing/LayerSnapModes/ReadMe.md b/Editing/LayerSnapModes/ReadMe.md new file mode 100644 index 00000000..691da944 --- /dev/null +++ b/Editing/LayerSnapModes/ReadMe.md @@ -0,0 +1,55 @@ +## LayerSnapModes + + +This sample illustrates the use of layer snap modes, which provides the ability to set the snap mode (vertex, edge, end etc) on a per layer basis. +The layer snap modes are presented in a datagrid hosted by a simple dockpane. + + + +View it live + + +``` +Language: C# +Subject: Editing +Contributor: ArcGIS Pro SDK Team +Organization: Esri, http://www.esri.com +Date: 7/01/2020 +ArcGIS Pro: 2.6 +Visual Studio: 2019 +.NET Target Framework: 4.8 +``` + +## Resources + +* [API Reference online](https://pro.arcgis.com/en/pro-app/sdk/api-reference) +* ArcGIS Pro SDK for .NET (pro.arcgis.com) +* [arcgis-pro-sdk-community-samples](https://github.com/Esri/arcgis-pro-sdk-community-samples) +* [ArcGIS Pro DAML ID Reference](https://github.com/Esri/arcgis-pro-sdk/wiki/ArcGIS-Pro-DAML-ID-Reference) +* [FAQ](https://github.com/Esri/arcgis-pro-sdk/wiki/FAQ) +* [ArcGIS Pro SDK icons](https://github.com/Esri/arcgis-pro-sdk/releases/tag/2.4.0.19948) + +![ArcGIS Pro SDK for .NET Icons](https://Esri.github.io/arcgis-pro-sdk/images/Home/Image-of-icons.png "ArcGIS Pro SDK Icons") + +### Samples Data + +* Sample data for ArcGIS Pro SDK Community Samples can be downloaded from the [repo releases](https://github.com/Esri/arcgis-pro-sdk-community-samples/releases) page. + +## How to use the sample + +1. In Visual Studio, build the solution. +1. Click the Visual Studio Start button to open ArcGIS Pro. +1. In Pro, open a map with feature layers or create a new map and add some. +1. Turn on the application snap modes Vertex, Edge and End from the snapping dropdown on the editing tab. +1. On the add-in tab, click Show LayerSnapModes to display the LayerSnapModes dockpane. +![UI](Screenshots/lsm_dockpane.png) + +1. Toggle some of the layer snap modes and examine the effect when snapping to the layer with a tool such as the measure tool. + + + + + +      ArcGIS Pro SDK for Microsoft .NET Framework +             +[Home](https://github.com/Esri/arcgis-pro-sdk/wiki) | API Reference | [Requirements](https://github.com/Esri/arcgis-pro-sdk/wiki#requirements) | [Download](https://github.com/Esri/arcgis-pro-sdk/wiki#installing-arcgis-pro-sdk-for-net) | Samples diff --git a/Editing/LayerSnapModes/Screenshots/lsm_dockpane.png b/Editing/LayerSnapModes/Screenshots/lsm_dockpane.png new file mode 100644 index 00000000..755c871b Binary files /dev/null and b/Editing/LayerSnapModes/Screenshots/lsm_dockpane.png differ diff --git a/Editing/MainConnectorManhole/Config.daml b/Editing/MainConnectorManhole/Config.daml index e2c1514f..e9824659 100644 --- a/Editing/MainConnectorManhole/Config.daml +++ b/Editing/MainConnectorManhole/Config.daml @@ -1,4 +1,4 @@ - + - + Create a Main, Mahole and connector with the sketch. - + diff --git a/Editing/MainConnectorManhole/MainConnectorManhole (C#).md b/Editing/MainConnectorManhole/MainConnectorManhole (C#).md index 363673fc..c1f3080c 100644 --- a/Editing/MainConnectorManhole/MainConnectorManhole (C#).md +++ b/Editing/MainConnectorManhole/MainConnectorManhole (C#).md @@ -12,7 +12,7 @@ Language: C# Subject: Editing Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Editing/MainConnectorManhole/ReadMe.md b/Editing/MainConnectorManhole/ReadMe.md index 363673fc..c1f3080c 100644 --- a/Editing/MainConnectorManhole/ReadMe.md +++ b/Editing/MainConnectorManhole/ReadMe.md @@ -12,7 +12,7 @@ Language: C# Subject: Editing Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Editing/ModifyNewlyAddedFeatures/Config.daml b/Editing/ModifyNewlyAddedFeatures/Config.daml index 909381e1..3fed0e2f 100644 --- a/Editing/ModifyNewlyAddedFeatures/Config.daml +++ b/Editing/ModifyNewlyAddedFeatures/Config.daml @@ -1,4 +1,4 @@ - + - + @@ -43,19 +43,16 @@ @@ -65,4 +62,4 @@ - +
\ No newline at end of file diff --git a/Editing/ModifyNewlyAddedFeatures/ModifyNewlyAddedFeatures (C#).md b/Editing/ModifyNewlyAddedFeatures/ModifyNewlyAddedFeatures (C#).md index 6fc3fecb..2ae97d95 100644 --- a/Editing/ModifyNewlyAddedFeatures/ModifyNewlyAddedFeatures (C#).md +++ b/Editing/ModifyNewlyAddedFeatures/ModifyNewlyAddedFeatures (C#).md @@ -18,7 +18,7 @@ Language: C# Subject: Editing Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Editing/ModifyNewlyAddedFeatures/ReadMe.md b/Editing/ModifyNewlyAddedFeatures/ReadMe.md index 6fc3fecb..2ae97d95 100644 --- a/Editing/ModifyNewlyAddedFeatures/ReadMe.md +++ b/Editing/ModifyNewlyAddedFeatures/ReadMe.md @@ -18,7 +18,7 @@ Language: C# Subject: Editing Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Editing/MultipatchBuilder/Config.daml b/Editing/MultipatchBuilder/Config.daml index 0dc8ba9a..8d50a56a 100644 --- a/Editing/MultipatchBuilder/Config.daml +++ b/Editing/MultipatchBuilder/Config.daml @@ -1,4 +1,5 @@ - - - + Shows all textures: Use this drop down to select the texture for the building - diff --git a/Editing/MultipatchBuilder/InspectMultiPatch.cs b/Editing/MultipatchBuilder/InspectMultiPatch.cs index a3e064e4..e6b69129 100644 --- a/Editing/MultipatchBuilder/InspectMultiPatch.cs +++ b/Editing/MultipatchBuilder/InspectMultiPatch.cs @@ -1,4 +1,22 @@ -using System; +/* + + Copyright 2020 Esri + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + + See the License for the specific language governing permissions and + limitations under the License. + +*/ +using System; using System.Collections.Generic; using System.Linq; using System.Text; diff --git a/Editing/MultipatchBuilder/MakeWalls.cs b/Editing/MultipatchBuilder/MakeWalls.cs index 799ca992..d948ae79 100644 --- a/Editing/MultipatchBuilder/MakeWalls.cs +++ b/Editing/MultipatchBuilder/MakeWalls.cs @@ -1,4 +1,22 @@ -using ArcGIS.Desktop.Framework.Contracts; +/* + + Copyright 2020 Esri + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + + See the License for the specific language governing permissions and + limitations under the License. + +*/ +using ArcGIS.Desktop.Framework.Contracts; using System; using System.Collections.Generic; using System.Linq; diff --git a/Editing/MultipatchBuilder/MultipatchBuilder (C#).md b/Editing/MultipatchBuilder/MultipatchBuilder (C#).md index 0af58958..f50bd2c9 100644 --- a/Editing/MultipatchBuilder/MultipatchBuilder (C#).md +++ b/Editing/MultipatchBuilder/MultipatchBuilder (C#).md @@ -14,7 +14,7 @@ Language: C# Subject: Editing Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2019 .NET Target Framework: 4.8 diff --git a/Editing/MultipatchBuilder/ReadMe.md b/Editing/MultipatchBuilder/ReadMe.md index 0af58958..f50bd2c9 100644 --- a/Editing/MultipatchBuilder/ReadMe.md +++ b/Editing/MultipatchBuilder/ReadMe.md @@ -14,7 +14,7 @@ Language: C# Subject: Editing Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2019 .NET Target Framework: 4.8 diff --git a/Editing/README.md b/Editing/README.md index 5e5f7daf..1b090df9 100644 --- a/Editing/README.md +++ b/Editing/README.md @@ -21,16 +21,19 @@ This folder contains ArcGIS Pro Add-In Samples that fall under the 'Editing' top * [CreatePointsAlongLine3D (c#)](../../../tree/master/Editing/CreatePointsAlongLine3D) * [CrowdPlannerTool (c#)](../../../tree/master/Editing/CrowdPlannerTool) * [DatasetCompatibility (c#)](../../../tree/master/Editing/DatasetCompatibility) +* [DemoUseSelection (c#)](../../../tree/master/Editing/DemoUseSelection) * [DivideLines (c#)](../../../tree/master/Editing/DivideLines) * [EditEvents (c#)](../../../tree/master/Editing/EditEvents) * [EditingTemplates (c#)](../../../tree/master/Editing/EditingTemplates) * [EditOperationRowEvent (c#)](../../../tree/master/Editing/EditOperationRowEvent) * [ExtendTool (c#)](../../../tree/master/Editing/ExtendTool) +* [GeometryControl (c#)](../../../tree/master/Editing/GeometryControl) * [GridScaleCADLayer (c#)](../../../tree/master/Editing/GridScaleCADLayer) * [GroundToGrid (c#)](../../../tree/master/Editing/GroundToGrid) * [GroundToGridEvents (c#)](../../../tree/master/Editing/GroundToGridEvents) * [InspectorTool (c#)](../../../tree/master/Editing/InspectorTool) * [Inspector_AddAttributeAsync (c#)](../../../tree/master/Editing/Inspector_AddAttributeAsync) +* [LayerSnapModes (c#)](../../../tree/master/Editing/LayerSnapModes) * [MainConnectorManhole (c#)](../../../tree/master/Editing/MainConnectorManhole) * [ModifyNewlyAddedFeatures (c#)](../../../tree/master/Editing/ModifyNewlyAddedFeatures) * [MultipatchBuilder (c#)](../../../tree/master/Editing/MultipatchBuilder) diff --git a/Editing/ReplaceSketch/Config.daml b/Editing/ReplaceSketch/Config.daml index cb9474ba..a61b2c54 100644 --- a/Editing/ReplaceSketch/Config.daml +++ b/Editing/ReplaceSketch/Config.daml @@ -1,4 +1,4 @@ - + - ReplaceSketch Adds the ReplaceSketch command to the sketch context menu. This allows you to add the shape of a line or polygon to the edit sketch by right clicking on the feature and choosing this command. Images\AddinDesktop32.png - ArcGIS Pro SDK Team, arcgisprosdk@esri.com + ArcGIS Pro SDK Team, arcgisprosdk@esri.com esri, http://www.esri.com 3/30/2016 Editing diff --git a/Editing/ReplaceSketch/ReadMe.md b/Editing/ReplaceSketch/ReadMe.md index d672c048..16775e09 100644 --- a/Editing/ReplaceSketch/ReadMe.md +++ b/Editing/ReplaceSketch/ReadMe.md @@ -15,7 +15,7 @@ Language: C# Subject: Editing Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Editing/ReplaceSketch/ReplaceSketch (C#).md b/Editing/ReplaceSketch/ReplaceSketch (C#).md index d672c048..16775e09 100644 --- a/Editing/ReplaceSketch/ReplaceSketch (C#).md +++ b/Editing/ReplaceSketch/ReplaceSketch (C#).md @@ -15,7 +15,7 @@ Language: C# Subject: Editing Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Editing/RestartSketch/Config.daml b/Editing/RestartSketch/Config.daml index f691895e..d5173ee4 100644 --- a/Editing/RestartSketch/Config.daml +++ b/Editing/RestartSketch/Config.daml @@ -1,4 +1,4 @@ - + - diff --git a/Editing/RestartSketch/ReadMe.md b/Editing/RestartSketch/ReadMe.md index 57f2edc2..68fc42f3 100644 --- a/Editing/RestartSketch/ReadMe.md +++ b/Editing/RestartSketch/ReadMe.md @@ -13,7 +13,7 @@ Language: C# Subject: Editing Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Editing/RestartSketch/RestartSketch (C#).md b/Editing/RestartSketch/RestartSketch (C#).md index 57f2edc2..68fc42f3 100644 --- a/Editing/RestartSketch/RestartSketch (C#).md +++ b/Editing/RestartSketch/RestartSketch (C#).md @@ -13,7 +13,7 @@ Language: C# Subject: Editing Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Editing/SequentialNumberTool/Config.daml b/Editing/SequentialNumberTool/Config.daml index a3a9bfe0..afd50ba5 100644 --- a/Editing/SequentialNumberTool/Config.daml +++ b/Editing/SequentialNumberTool/Config.daml @@ -1,4 +1,4 @@ - + - - - - + + - - + + Sequentially number points, lines or polygons along a sketch. diff --git a/Editing/SequentialNumberTool/ReadMe.md b/Editing/SequentialNumberTool/ReadMe.md index d9b2fef6..872f6e1a 100644 --- a/Editing/SequentialNumberTool/ReadMe.md +++ b/Editing/SequentialNumberTool/ReadMe.md @@ -14,7 +14,7 @@ Language: C# Subject: Editing Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Editing/SequentialNumberTool/SeqNum (C#).md b/Editing/SequentialNumberTool/SeqNum (C#).md index d9b2fef6..872f6e1a 100644 --- a/Editing/SequentialNumberTool/SeqNum (C#).md +++ b/Editing/SequentialNumberTool/SeqNum (C#).md @@ -14,7 +14,7 @@ Language: C# Subject: Editing Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Editing/SketchToolDemo/ReadMe.md b/Editing/SketchToolDemo/ReadMe.md index 1b5658e5..d7429859 100644 --- a/Editing/SketchToolDemo/ReadMe.md +++ b/Editing/SketchToolDemo/ReadMe.md @@ -13,7 +13,7 @@ Language: C# Subject: Editing Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Editing/SketchToolDemo/SketchToolDemo (C#).md b/Editing/SketchToolDemo/SketchToolDemo (C#).md index 1b5658e5..d7429859 100644 --- a/Editing/SketchToolDemo/SketchToolDemo (C#).md +++ b/Editing/SketchToolDemo/SketchToolDemo (C#).md @@ -13,7 +13,7 @@ Language: C# Subject: Editing Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Editing/TransferAttributes/ReadMe.md b/Editing/TransferAttributes/ReadMe.md index 7e1d19d2..d57e0e82 100644 --- a/Editing/TransferAttributes/ReadMe.md +++ b/Editing/TransferAttributes/ReadMe.md @@ -15,7 +15,7 @@ Language: C# Subject: Editing Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2019 .NET Target Framework: 4.8 diff --git a/Editing/TransferAttributes/TransferAttributes (C#).md b/Editing/TransferAttributes/TransferAttributes (C#).md index 7e1d19d2..d57e0e82 100644 --- a/Editing/TransferAttributes/TransferAttributes (C#).md +++ b/Editing/TransferAttributes/TransferAttributes (C#).md @@ -15,7 +15,7 @@ Language: C# Subject: Editing Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2019 .NET Target Framework: 4.8 diff --git a/Editing/UpdateAttributesWithSketch/Config.daml b/Editing/UpdateAttributesWithSketch/Config.daml index 17778201..d5b2631f 100644 --- a/Editing/UpdateAttributesWithSketch/Config.daml +++ b/Editing/UpdateAttributesWithSketch/Config.daml @@ -1,4 +1,4 @@ - + - + Update attribute values for features that intersect the sketch. diff --git a/Editing/UpdateAttributesWithSketch/ReadMe.md b/Editing/UpdateAttributesWithSketch/ReadMe.md index 4c9a1dd5..17a7b176 100644 --- a/Editing/UpdateAttributesWithSketch/ReadMe.md +++ b/Editing/UpdateAttributesWithSketch/ReadMe.md @@ -13,7 +13,7 @@ Language: C# Subject: Editing Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Editing/UpdateAttributesWithSketch/UpdateAttributesWithSketch (C#).md b/Editing/UpdateAttributesWithSketch/UpdateAttributesWithSketch (C#).md index 4c9a1dd5..17a7b176 100644 --- a/Editing/UpdateAttributesWithSketch/UpdateAttributesWithSketch (C#).md +++ b/Editing/UpdateAttributesWithSketch/UpdateAttributesWithSketch (C#).md @@ -13,7 +13,7 @@ Language: C# Subject: Editing Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Framework/BackStage_PropertyPage/BackStage_PropertyPage (C#).md b/Framework/BackStage_PropertyPage/BackStage_PropertyPage (C#).md index 2a57d7a5..fb19fdad 100644 --- a/Framework/BackStage_PropertyPage/BackStage_PropertyPage (C#).md +++ b/Framework/BackStage_PropertyPage/BackStage_PropertyPage (C#).md @@ -17,7 +17,7 @@ Language: C# Subject: Framework Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Framework/BackStage_PropertyPage/Config.daml b/Framework/BackStage_PropertyPage/Config.daml index 8f504a94..a81cec7e 100644 --- a/Framework/BackStage_PropertyPage/Config.daml +++ b/Framework/BackStage_PropertyPage/Config.daml @@ -1,4 +1,4 @@ - + -This sample shows how to implement pane that contains a Chromium web browser control +This sample shows how to implement pane that contains a Chromium web browser control. For details on how to utilize the Chromium web browser control in an add-in see here: https://github.com/Esri/arcgis-pro-sdk/wiki/ProConcepts-Framework#chromiumwebbrowser @@ -13,7 +13,7 @@ Language: C# Subject: Framework Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2019 .NET Target Framework: 4.8 diff --git a/Framework/ChromiumWebBrowserSample/ChromiumWebBrowserSample.csproj b/Framework/ChromiumWebBrowserSample/ChromiumWebBrowserSample.csproj index fb5148df..31d1c5e3 100644 --- a/Framework/ChromiumWebBrowserSample/ChromiumWebBrowserSample.csproj +++ b/Framework/ChromiumWebBrowserSample/ChromiumWebBrowserSample.csproj @@ -175,7 +175,7 @@ - 3.7.0 + 4.0.1 2.0.20525 diff --git a/Framework/ChromiumWebBrowserSample/Config.daml b/Framework/ChromiumWebBrowserSample/Config.daml index 024b8b2d..a740b0f4 100644 --- a/Framework/ChromiumWebBrowserSample/Config.daml +++ b/Framework/ChromiumWebBrowserSample/Config.daml @@ -1,4 +1,4 @@ - + - ChromiumWebBrowserSample diff --git a/Framework/ChromiumWebBrowserSample/Module1.cs b/Framework/ChromiumWebBrowserSample/Module1.cs index d4a6c81e..07ce8698 100644 --- a/Framework/ChromiumWebBrowserSample/Module1.cs +++ b/Framework/ChromiumWebBrowserSample/Module1.cs @@ -37,17 +37,17 @@ limitations under the License. namespace ChromiumWebBrowserSample { /// - /// This sample shows how to implement pane that contains a Chromium web browser control - /// - /// - /// 1. In Visual Studio click the Build menu. Then select Build Solution. - /// 1. Click Start button to open ArcGIS Pro. - /// 1. ArcGIS Pro will open. - /// 1. Open any project file. - /// 1. Click on the Add-in tab on the ribbon and then on the "Open ChromePane" button. - /// 1. The pane opens showing the https://github.com/esri/arcgis-pro-sdk-community-samples page. - /// ![UI](Screenshots/Screen1.png) - /// + /// This sample shows how to implement pane that contains a Chromium web browser control. For details on how to utilize the Chromium web browser control in an add-in see here: https://github.com/Esri/arcgis-pro-sdk/wiki/ProConcepts-Framework#chromiumwebbrowser + /// + /// + /// 1. In Visual Studio click the Build menu. Then select Build Solution. + /// 1. Click Start button to open ArcGIS Pro. + /// 1. ArcGIS Pro will open. + /// 1. Open any project file. + /// 1. Click on the Add-in tab on the ribbon and then on the "Open ChromePane" button. + /// 1. The pane opens showing the https://github.com/esri/arcgis-pro-sdk-community-samples page. + /// ![UI](Screenshots/Screen1.png) + /// internal class Module1 : Module { private static Module1 _this = null; diff --git a/Framework/ChromiumWebBrowserSample/ReadMe.md b/Framework/ChromiumWebBrowserSample/ReadMe.md index 1fe71553..e376d06a 100644 --- a/Framework/ChromiumWebBrowserSample/ReadMe.md +++ b/Framework/ChromiumWebBrowserSample/ReadMe.md @@ -1,7 +1,7 @@ ## ChromiumWebBrowserSample -This sample shows how to implement pane that contains a Chromium web browser control +This sample shows how to implement pane that contains a Chromium web browser control. For details on how to utilize the Chromium web browser control in an add-in see here: https://github.com/Esri/arcgis-pro-sdk/wiki/ProConcepts-Framework#chromiumwebbrowser @@ -13,7 +13,7 @@ Language: C# Subject: Framework Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2019 .NET Target Framework: 4.8 diff --git a/Framework/CommandFilter/CommandFilter (C#).md b/Framework/CommandFilter/CommandFilter (C#).md index 0a1887a2..594fcd44 100644 --- a/Framework/CommandFilter/CommandFilter (C#).md +++ b/Framework/CommandFilter/CommandFilter (C#).md @@ -13,7 +13,7 @@ Language: C# Subject: Framework Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Framework/CommandFilter/Config.daml b/Framework/CommandFilter/Config.daml index 3af01e4f..6885f1e4 100644 --- a/Framework/CommandFilter/Config.daml +++ b/Framework/CommandFilter/Config.daml @@ -1,4 +1,4 @@ - + - diff --git a/Framework/CommandFilter/ReadMe.md b/Framework/CommandFilter/ReadMe.md index 0a1887a2..594fcd44 100644 --- a/Framework/CommandFilter/ReadMe.md +++ b/Framework/CommandFilter/ReadMe.md @@ -13,7 +13,7 @@ Language: C# Subject: Framework Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Framework/ConditionQuery/ConditionQuery (C#).md b/Framework/ConditionQuery/ConditionQuery (C#).md index 2de64f36..3d5ebad2 100644 --- a/Framework/ConditionQuery/ConditionQuery (C#).md +++ b/Framework/ConditionQuery/ConditionQuery (C#).md @@ -13,7 +13,7 @@ Language: C# Subject: Framework Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Framework/ConditionQuery/ConditionQuery.csproj b/Framework/ConditionQuery/ConditionQuery.csproj index 5bc6cc1b..a451ba0c 100644 --- a/Framework/ConditionQuery/ConditionQuery.csproj +++ b/Framework/ConditionQuery/ConditionQuery.csproj @@ -42,8 +42,8 @@ AnyCPU - - ..\..\packages\AvalonEdit.6.0.0\lib\net45\ICSharpCode.AvalonEdit.dll + + ..\..\packages\AvalonEdit.6.0.1\lib\net45\ICSharpCode.AvalonEdit.dll diff --git a/Framework/ConditionQuery/Config.daml b/Framework/ConditionQuery/Config.daml index 2a897298..8d6fa851 100644 --- a/Framework/ConditionQuery/Config.daml +++ b/Framework/ConditionQuery/Config.daml @@ -1,4 +1,4 @@ - + - ConditionQuery Queries the application state to determine which conditions are currently enabled Images\AddinDesktop32.png - ArcGIS Pro SDK Team, arcgisprosdk@esri.com + ArcGIS Pro SDK Team, arcgisprosdk@esri.com esri, http://www.esri.com 8/22/2016 3:49:35 PM, 2016 Framework diff --git a/Framework/ConditionQuery/ReadMe.md b/Framework/ConditionQuery/ReadMe.md index 2de64f36..3d5ebad2 100644 --- a/Framework/ConditionQuery/ReadMe.md +++ b/Framework/ConditionQuery/ReadMe.md @@ -13,7 +13,7 @@ Language: C# Subject: Framework Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Framework/ConditionQuery/packages.config b/Framework/ConditionQuery/packages.config index 803ba4b8..b1201a09 100644 --- a/Framework/ConditionQuery/packages.config +++ b/Framework/ConditionQuery/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file diff --git a/Framework/ConfigWithMap/Config.daml b/Framework/ConfigWithMap/Config.daml index 90ffeb9c..18f056ed 100644 --- a/Framework/ConfigWithMap/Config.daml +++ b/Framework/ConfigWithMap/Config.daml @@ -1,4 +1,4 @@ - + - - - + ConfigWithMap ConfigWithMap description Images\AddinDesktop32.png - ArcGIS Pro SDK Team, arcgisprosdk@esri.com + ArcGIS Pro SDK Team, arcgisprosdk@esri.com esri, http://www.esri.com 11/7/2016 10:32:40 AM, 2016 Framework - - - + - + - - - + - - - - + + @@ -69,42 +57,28 @@ - - - - - - - Tooltip text - + Tooltip text - - + + @@ -112,5 +100,5 @@ - + \ No newline at end of file diff --git a/Framework/ConfigureGallery/ConfigureGallery (C#).md b/Framework/ConfigureGallery/ConfigureGallery (C#).md index a7938037..8008a1dd 100644 --- a/Framework/ConfigureGallery/ConfigureGallery (C#).md +++ b/Framework/ConfigureGallery/ConfigureGallery (C#).md @@ -13,7 +13,7 @@ Language: C# Subject: Framework Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Framework/ConfigureGallery/ReadMe.md b/Framework/ConfigureGallery/ReadMe.md index a7938037..8008a1dd 100644 --- a/Framework/ConfigureGallery/ReadMe.md +++ b/Framework/ConfigureGallery/ReadMe.md @@ -13,7 +13,7 @@ Language: C# Subject: Framework Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Framework/CustomCatalog/Config.daml b/Framework/CustomCatalog/Config.daml index 2e82970b..127af91e 100644 --- a/Framework/CustomCatalog/Config.daml +++ b/Framework/CustomCatalog/Config.daml @@ -1,4 +1,4 @@ - + - CustomCategoriesExample diff --git a/Framework/CustomCategories/CustomCategoriesExample (C#).md b/Framework/CustomCategories/CustomCategoriesExample (C#).md index 67a2f90f..544675ce 100644 --- a/Framework/CustomCategories/CustomCategoriesExample (C#).md +++ b/Framework/CustomCategories/CustomCategoriesExample (C#).md @@ -14,7 +14,7 @@ Language: C# Subject: Framework Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Framework/CustomCategories/ExtraReport1/Config.daml b/Framework/CustomCategories/ExtraReport1/Config.daml index 7b1f9990..5cd837a4 100644 --- a/Framework/CustomCategories/ExtraReport1/Config.daml +++ b/Framework/CustomCategories/ExtraReport1/Config.daml @@ -1,4 +1,4 @@ - + - ExtraReport1 @@ -26,7 +25,8 @@ ArcGIS Pro SDK Team, arcgisprosdk@esri.com esri, http://www.esri.com 12/27/2018 3:47:24 PM, 2018 - Framework @@ -53,7 +53,9 @@ + + diff --git a/Framework/CustomCategories/ReadMe.md b/Framework/CustomCategories/ReadMe.md index 67a2f90f..544675ce 100644 --- a/Framework/CustomCategories/ReadMe.md +++ b/Framework/CustomCategories/ReadMe.md @@ -14,7 +14,7 @@ Language: C# Subject: Framework Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Framework/CustomEvent/Config.daml b/Framework/CustomEvent/Config.daml index fc185244..8a687004 100644 --- a/Framework/CustomEvent/Config.daml +++ b/Framework/CustomEvent/Config.daml @@ -1,4 +1,4 @@ - + - CustomEvent Provides an example of implementing a custom event Images\AddinDesktop32.png - ArcGIS Pro SDK Team, arcgisprosdk@esri.com + ArcGIS Pro SDK Team, arcgisprosdk@esri.com esri, http://www.esri.com 1/7/2016 1:11:24 PM, 2016 Framework diff --git a/Framework/CustomEvent/CustomEvent (C#).md b/Framework/CustomEvent/CustomEvent (C#).md index 1642c946..a786ba42 100644 --- a/Framework/CustomEvent/CustomEvent (C#).md +++ b/Framework/CustomEvent/CustomEvent (C#).md @@ -14,7 +14,7 @@ Language: C# Subject: Framework Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Framework/CustomEvent/ReadMe.md b/Framework/CustomEvent/ReadMe.md index 1642c946..a786ba42 100644 --- a/Framework/CustomEvent/ReadMe.md +++ b/Framework/CustomEvent/ReadMe.md @@ -14,7 +14,7 @@ Language: C# Subject: Framework Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Framework/CustomStyling/Config.daml b/Framework/CustomStyling/Config.daml index 36e19d7e..4313a1fb 100644 --- a/Framework/CustomStyling/Config.daml +++ b/Framework/CustomStyling/Config.daml @@ -1,4 +1,4 @@ - + - CustomStyling Sample showing how to apply custom styles that will work in-conjunction with Pro's Light and Dark themes Images\AddinDesktop32.png - ArcGIS Pro SDK Team, arcgisprosdk@esri.com + ArcGIS Pro SDK Team, arcgisprosdk@esri.com esri, http://www.esri.com 12/5/2016 2:20:27 PM, 2016 Framework diff --git a/Framework/CustomStyling/CustomStyling (C#).md b/Framework/CustomStyling/CustomStyling (C#).md index 8c962e40..32c18ae5 100644 --- a/Framework/CustomStyling/CustomStyling (C#).md +++ b/Framework/CustomStyling/CustomStyling (C#).md @@ -13,7 +13,7 @@ Language: C# Subject: Framework Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Framework/CustomStyling/ReadMe.md b/Framework/CustomStyling/ReadMe.md index 8c962e40..32c18ae5 100644 --- a/Framework/CustomStyling/ReadMe.md +++ b/Framework/CustomStyling/ReadMe.md @@ -13,7 +13,7 @@ Language: C# Subject: Framework Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Framework/DAML/Config.daml b/Framework/DAML/Config.daml index c9ef70c5..22ace877 100644 --- a/Framework/DAML/Config.daml +++ b/Framework/DAML/Config.daml @@ -1,4 +1,4 @@ - + - + - - - - - + + + + + diff --git a/Framework/DAML/DAML (C#).md b/Framework/DAML/DAML (C#).md index 440cb75c..16debc45 100644 --- a/Framework/DAML/DAML (C#).md +++ b/Framework/DAML/DAML (C#).md @@ -13,7 +13,7 @@ Language: C# Subject: Framework Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Framework/DAML/ReadMe.md b/Framework/DAML/ReadMe.md index 440cb75c..16debc45 100644 --- a/Framework/DAML/ReadMe.md +++ b/Framework/DAML/ReadMe.md @@ -13,7 +13,7 @@ Language: C# Subject: Framework Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Framework/DockPaneBookmarkAdvanced/Advanced UI Demo (C#).md b/Framework/DockPaneBookmarkAdvanced/Advanced UI Demo (C#).md index c9fac16d..4b7090b1 100644 --- a/Framework/DockPaneBookmarkAdvanced/Advanced UI Demo (C#).md +++ b/Framework/DockPaneBookmarkAdvanced/Advanced UI Demo (C#).md @@ -17,7 +17,7 @@ Language: C# Subject: Framework Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Framework/DockPaneBookmarkAdvanced/Config.daml b/Framework/DockPaneBookmarkAdvanced/Config.daml index 8d9664eb..6e901712 100644 --- a/Framework/DockPaneBookmarkAdvanced/Config.daml +++ b/Framework/DockPaneBookmarkAdvanced/Config.daml @@ -1,4 +1,4 @@ - + - + - + - - + diff --git a/Framework/DockpaneWithHelp/DockpaneWithHelp (C#).md b/Framework/DockpaneWithHelp/DockpaneWithHelp (C#).md index 9576b2b2..ef084390 100644 --- a/Framework/DockpaneWithHelp/DockpaneWithHelp (C#).md +++ b/Framework/DockpaneWithHelp/DockpaneWithHelp (C#).md @@ -13,7 +13,7 @@ Language: C# Subject: Framework Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2019 .NET Target Framework: 4.8 diff --git a/Framework/DockpaneWithHelp/ReadMe.md b/Framework/DockpaneWithHelp/ReadMe.md index 9576b2b2..ef084390 100644 --- a/Framework/DockpaneWithHelp/ReadMe.md +++ b/Framework/DockpaneWithHelp/ReadMe.md @@ -13,7 +13,7 @@ Language: C# Subject: Framework Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2019 .NET Target Framework: 4.8 diff --git a/Framework/DragAndDrop/Config.daml b/Framework/DragAndDrop/Config.daml index 4ea4ada9..23665840 100644 --- a/Framework/DragAndDrop/Config.daml +++ b/Framework/DragAndDrop/Config.daml @@ -1,4 +1,4 @@ - + - DragAndDrop DragAndDrop description Images\AddinDesktop32.png - ArcGIS Pro SDK Team, arcgisprosdk@esri.com + ArcGIS Pro SDK Team, arcgisprosdk@esri.com esri, http://www.esri.com 6/18/2019 6:00:12 AM, 2019 Framework @@ -44,6 +43,7 @@ + + + + diff --git a/Framework/DragAndDrop/DragAndDrop (C#).md b/Framework/DragAndDrop/DragAndDrop (C#).md index 35ea2dd2..11982a4b 100644 --- a/Framework/DragAndDrop/DragAndDrop (C#).md +++ b/Framework/DragAndDrop/DragAndDrop (C#).md @@ -13,7 +13,7 @@ Language: C# Subject: Framework Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2019 .NET Target Framework: 4.8 @@ -45,7 +45,9 @@ Visual Studio: 2019 1. Click Start button to open ArcGIS Pro. 1. In ArcGIS Pro create a new project using the Map template. 1. ArcGIS Pro displays a map view. -1. From the Add-in tab opend the -Drag and Drop Dockpane- +### Drag and drog from Catalog or the file system + +1. From the Add-in tab click the Drag and Drop button ![UI](Screenshots/Screen1.png) 1. Use the Windows file explorer to navigate to a Geodatabase folder, for example -C:\Data\SDK\SDK.gdb-, then drag & drop the folder into the dropzone in the Drag & Drop dockpane. @@ -57,6 +59,12 @@ Visual Studio: 2019 1. The feature class is added to the map. ![UI](Screenshots/Screen4.png) +### Drag and drop from the Map's TOC + +1. From the Add-In tab, click the Drag and Drop TOC Items button. The "Drag and drop TOC items" dockpane will open. +1. Drag any layer(s) from the active map's TOC to the text box in the dockpane. +1. The text box in the dockpane will list information about the map members being dragged and dropped. +![UI](Screenshots/Screen5.png) diff --git a/Framework/DragAndDrop/DragAndDrop.csproj b/Framework/DragAndDrop/DragAndDrop.csproj index 5d8700c2..023d4e19 100644 --- a/Framework/DragAndDrop/DragAndDrop.csproj +++ b/Framework/DragAndDrop/DragAndDrop.csproj @@ -132,7 +132,12 @@ DragAndDropDockpane1.xaml + + DragAndDropTOCItems.xaml + + + @@ -141,6 +146,10 @@ Designer MSBuild:Compile + + Designer + MSBuild:Compile + diff --git a/Framework/DragAndDrop/DragAndDropTOCItems.xaml b/Framework/DragAndDrop/DragAndDropTOCItems.xaml new file mode 100644 index 00000000..982bd86f --- /dev/null +++ b/Framework/DragAndDrop/DragAndDropTOCItems.xaml @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Framework/DragAndDrop/DragAndDropTOCItems.xaml.cs b/Framework/DragAndDrop/DragAndDropTOCItems.xaml.cs new file mode 100644 index 00000000..b71b17cd --- /dev/null +++ b/Framework/DragAndDrop/DragAndDropTOCItems.xaml.cs @@ -0,0 +1,47 @@ +/* + + Copyright 2020 Esri + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + + See the License for the specific language governing permissions and + limitations under the License. + +*/ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + + +namespace DragAndDrop +{ + /// + /// Interaction logic for DragAndDropTOCItemsView.xaml + /// + public partial class DragAndDropTOCItemsView : UserControl + { + public DragAndDropTOCItemsView() + { + InitializeComponent(); + } + } +} diff --git a/Framework/DragAndDrop/DragAndDropTOCItemsViewModel.cs b/Framework/DragAndDrop/DragAndDropTOCItemsViewModel.cs new file mode 100644 index 00000000..41b2ab0d --- /dev/null +++ b/Framework/DragAndDrop/DragAndDropTOCItemsViewModel.cs @@ -0,0 +1,135 @@ +/* + + Copyright 2020 Esri + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + + See the License for the specific language governing permissions and + limitations under the License. + +*/ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using ArcGIS.Core.CIM; +using ArcGIS.Core.Data; +using ArcGIS.Core.Geometry; +using ArcGIS.Desktop.Catalog; +using ArcGIS.Desktop.Core; +using ArcGIS.Desktop.Editing; +using ArcGIS.Desktop.Extensions; +using ArcGIS.Desktop.Framework; +using ArcGIS.Desktop.Framework.Contracts; +using ArcGIS.Desktop.Framework.Dialogs; +using ArcGIS.Desktop.Framework.DragDrop; +using ArcGIS.Desktop.Framework.Threading.Tasks; +using ArcGIS.Desktop.Mapping; +using DragAndDrop.Helpers; + +namespace DragAndDrop +{ + internal class DragAndDropTOCItemsViewModel : DockPane + { + private const string _dockPaneID = "DragAndDrop_DragAndDropTOCItems"; + private StringBuilder _sb = new StringBuilder(); + protected DragAndDropTOCItemsViewModel() { } + + /// + /// Show the DockPane. + /// + internal static void Show() + { + DockPane pane = FrameworkApplication.DockPaneManager.Find(_dockPaneID); + if (pane == null) + return; + + pane.Activate(); + } + #region Drag and Drop + public override void OnDragOver(DropInfo dropInfo) + { + //default is to accept our data types + dropInfo.Effects = DragDropEffects.All; + } + public override void OnDrop(DropInfo dropInfo) + { + if (dropInfo.HasTOCContent())//extension method + { + _sb.Clear(); + var mm = dropInfo.GetTOCContent();//extension method - returns all MapMembers being dropped + _sb.AppendLine($"No of Map Members: {mm.Count}"); + //get just feature layers, for example + var layers = dropInfo.GetTOCContentOfType(); //extension method + _sb.AppendLine($"No of FeatureLayers: {layers.Count}"); + + //which, honestly, is the same as doing this...so take your pick... + var layers2 = mm.OfType()?.ToList() ?? new List(); + //and then ditto for StandaloneTable, ElevationSurface, LabelClass, etc. + + //last, get the source map to which the map members belong + var mapuri = dropInfo.GetMapUri(); + //99 times out of a 100 this will be the active view map.... + //but, if not, get the actual map (or scene) this way + var map = FrameworkApplication.Panes.OfType()?.Select(mp => mp.MapView.Map) + .Where(m => m.URI == mapuri).First(); + _sb.AppendLine($"Map Name: {map.Name}"); + _sb.AppendLine($"Map URI: {mapuri}"); + TOCContentInfo = _sb.ToString(); + } + else //Data is not being dragged from the TOC + { + dropInfo.Handled = false; + ArcGIS.Desktop.Framework.Dialogs.MessageBox.Show($"Drag and drop only from the TOC here"); + return; + } + } + + + #endregion + + /// + /// Text shown near the top of the DockPane. + /// + private string _heading = "Drag and Drop from TOC"; + public string Heading + { + get { return _heading; } + set + { + SetProperty(ref _heading, value, () => Heading); + } + } + + private string _tocContentInfo = "Drag and drop from TOC"; + public string TOCContentInfo + { + get { return _tocContentInfo; } + set + { + SetProperty(ref _tocContentInfo, value, () => TOCContentInfo); + } + } + } + + /// + /// Button implementation to show the DockPane. + /// + internal class DragAndDropTOCItems_ShowButton : Button + { + protected override void OnClick() + { + DragAndDropTOCItemsViewModel.Show(); + } + } +} diff --git a/Framework/DragAndDrop/Helpers/DragDropExtensions.cs b/Framework/DragAndDrop/Helpers/DragDropExtensions.cs new file mode 100644 index 00000000..167cc4b0 --- /dev/null +++ b/Framework/DragAndDrop/Helpers/DragDropExtensions.cs @@ -0,0 +1,59 @@ +/* + + Copyright 2020 Esri + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + + See the License for the specific language governing permissions and + limitations under the License. + +*/ +using ArcGIS.Desktop.Framework.DragDrop; +using ArcGIS.Desktop.Mapping; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + + +namespace DragAndDrop.Helpers +{ + public static class DragDropExtensions + { + + public static bool HasTOCContent(this DropInfo dropInfo) + { + return dropInfo?.Data is TOCDragData; + } + + public static List GetTOCContent(this DropInfo dropInfo) + { + if (!HasTOCContent(dropInfo)) + return new List(); + var tocPayload = dropInfo.Data as TOCDragData; + //get the content + return tocPayload.DraggedContent.ToList(); ; + } + + public static List GetTOCContentOfType(this DropInfo dropInfo) where T : MapMember + { + return GetTOCContent(dropInfo).OfType()?.ToList() ?? new List(); + } + + public static string GetMapUri(this DropInfo dropInfo) + { + return HasTOCContent(dropInfo) ? ((TOCDragData)dropInfo.Data).SourceMapURI : string.Empty; + } + } + + } + diff --git a/Framework/DragAndDrop/Module1.cs b/Framework/DragAndDrop/Module1.cs index edb8f5a1..a3d7acc4 100644 --- a/Framework/DragAndDrop/Module1.cs +++ b/Framework/DragAndDrop/Module1.cs @@ -37,28 +37,34 @@ limitations under the License. namespace DragAndDrop { - /// - /// This sample shows how to implement drag & drop using a custom dockpane tree control. - /// - /// - /// 1. Download the Community Sample data (see under the 'Resources' section for downloading sample data) - /// 1. Make sure that the Sample data is unzipped in c:\data - /// 1. The project used for this sample is -C:\Data\SDK\SDK.gdb-. - /// 1. In Visual Studio click the Build menu. Then select Build Solution. - /// 1. Click Start button to open ArcGIS Pro. - /// 1. In ArcGIS Pro create a new project using the Map template. - /// 1. ArcGIS Pro displays a map view. - /// 1. From the Add-in tab opend the -Drag and Drop Dockpane- - /// ![UI](Screenshots/Screen1.png) - /// 1. Use the Windows file explorer to navigate to a Geodatabase folder, for example -C:\Data\SDK\SDK.gdb-, then drag & drop the folder into the dropzone in the Drag & Drop dockpane. - /// ![UI](Screenshots/Screen2.png) - /// 1. Notice that after the drop the Tree Control is being populated with the feature classes contained in the dropped Geodatabase. - /// 1. Drag one of the feature classes listed in the Tree Control onto the Map pane. - /// ![UI](Screenshots/Screen3.png) - /// 1. The feature class is added to the map. - /// ![UI](Screenshots/Screen4.png) - /// - internal class Module1 : Module + /// + /// This sample shows how to implement drag & drop using a custom dockpane tree control. + /// + /// + /// 1. Download the Community Sample data (see under the 'Resources' section for downloading sample data) + /// 1. Make sure that the Sample data is unzipped in c:\data + /// 1. The project used for this sample is -C:\Data\SDK\SDK.gdb-. + /// 1. In Visual Studio click the Build menu. Then select Build Solution. + /// 1. Click Start button to open ArcGIS Pro. + /// 1. In ArcGIS Pro create a new project using the Map template. + /// 1. ArcGIS Pro displays a map view. + /// ### Drag and drog from Catalog or the file system + /// 1. From the Add-in tab click the Drag and Drop button + /// ![UI](Screenshots/Screen1.png) + /// 1. Use the Windows file explorer to navigate to a Geodatabase folder, for example -C:\Data\SDK\SDK.gdb-, then drag & drop the folder into the dropzone in the Drag & Drop dockpane. + /// ![UI](Screenshots/Screen2.png) + /// 1. Notice that after the drop the Tree Control is being populated with the feature classes contained in the dropped Geodatabase. + /// 1. Drag one of the feature classes listed in the Tree Control onto the Map pane. + /// ![UI](Screenshots/Screen3.png) + /// 1. The feature class is added to the map. + /// ![UI](Screenshots/Screen4.png) + /// ### Drag and drop from the Map's TOC + /// 1. From the Add-In tab, click the Drag and Drop TOC Items button. The "Drag and drop TOC items" dockpane will open. + /// 1. Drag any layer(s) from the active map's TOC to the text box in the dockpane. + /// 1. The text box in the dockpane will list information about the map members being dragged and dropped. + /// ![UI](Screenshots/Screen5.png) + /// + internal class Module1 : Module { private static Module1 _this = null; diff --git a/Framework/DragAndDrop/ReadMe.md b/Framework/DragAndDrop/ReadMe.md index 35ea2dd2..11982a4b 100644 --- a/Framework/DragAndDrop/ReadMe.md +++ b/Framework/DragAndDrop/ReadMe.md @@ -13,7 +13,7 @@ Language: C# Subject: Framework Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2019 .NET Target Framework: 4.8 @@ -45,7 +45,9 @@ Visual Studio: 2019 1. Click Start button to open ArcGIS Pro. 1. In ArcGIS Pro create a new project using the Map template. 1. ArcGIS Pro displays a map view. -1. From the Add-in tab opend the -Drag and Drop Dockpane- +### Drag and drog from Catalog or the file system + +1. From the Add-in tab click the Drag and Drop button ![UI](Screenshots/Screen1.png) 1. Use the Windows file explorer to navigate to a Geodatabase folder, for example -C:\Data\SDK\SDK.gdb-, then drag & drop the folder into the dropzone in the Drag & Drop dockpane. @@ -57,6 +59,12 @@ Visual Studio: 2019 1. The feature class is added to the map. ![UI](Screenshots/Screen4.png) +### Drag and drop from the Map's TOC + +1. From the Add-In tab, click the Drag and Drop TOC Items button. The "Drag and drop TOC items" dockpane will open. +1. Drag any layer(s) from the active map's TOC to the text box in the dockpane. +1. The text box in the dockpane will list information about the map members being dragged and dropped. +![UI](Screenshots/Screen5.png) diff --git a/Framework/DragAndDrop/Screenshots/Screen5.png b/Framework/DragAndDrop/Screenshots/Screen5.png new file mode 100644 index 00000000..796ceea4 Binary files /dev/null and b/Framework/DragAndDrop/Screenshots/Screen5.png differ diff --git a/Framework/DynamicMenu/Config.daml b/Framework/DynamicMenu/Config.daml index 18786346..0fbce6c4 100644 --- a/Framework/DynamicMenu/Config.daml +++ b/Framework/DynamicMenu/Config.daml @@ -1,4 +1,4 @@ - + - + diff --git a/Framework/Gallery/GalleryDemo (C#).md b/Framework/Gallery/GalleryDemo (C#).md index 75e2a554..4ad4720e 100644 --- a/Framework/Gallery/GalleryDemo (C#).md +++ b/Framework/Gallery/GalleryDemo (C#).md @@ -15,7 +15,7 @@ Language: C# Subject: Framework Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Framework/Gallery/ReadMe.md b/Framework/Gallery/ReadMe.md index 75e2a554..4ad4720e 100644 --- a/Framework/Gallery/ReadMe.md +++ b/Framework/Gallery/ReadMe.md @@ -15,7 +15,7 @@ Language: C# Subject: Framework Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Framework/GetAddins/Config.daml b/Framework/GetAddins/Config.daml index 74b6a4a7..be1bfe32 100644 --- a/Framework/GetAddins/Config.daml +++ b/Framework/GetAddins/Config.daml @@ -1,4 +1,4 @@ - + - + diff --git a/Framework/GetAddins/GetAddins (C#).md b/Framework/GetAddins/GetAddins (C#).md index 1005110b..201d0cab 100644 --- a/Framework/GetAddins/GetAddins (C#).md +++ b/Framework/GetAddins/GetAddins (C#).md @@ -13,7 +13,7 @@ Language: C# Subject: Framework Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2019 .NET Target Framework: 4.8 diff --git a/Framework/GetAddins/ReadMe.md b/Framework/GetAddins/ReadMe.md index 1005110b..201d0cab 100644 --- a/Framework/GetAddins/ReadMe.md +++ b/Framework/GetAddins/ReadMe.md @@ -13,7 +13,7 @@ Language: C# Subject: Framework Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2019 .NET Target Framework: 4.8 diff --git a/Framework/HookProCommands/Config.daml b/Framework/HookProCommands/Config.daml index 6a80de00..2fee1967 100644 --- a/Framework/HookProCommands/Config.daml +++ b/Framework/HookProCommands/Config.daml @@ -1,10 +1,10 @@ - + HookProCommands HookProCommands description Images\AddinDesktop32.png - ArcGIS Pro SDK Team, arcgisprosdk@esri.com + ArcGIS Pro SDK Team, arcgisprosdk@esri.com esri, http://www.esri.com 2/28/2015 11:43:25 AM, 2015 Framework diff --git a/Framework/HookProCommands/HookProCommands (C#).md b/Framework/HookProCommands/HookProCommands (C#).md index c0f22868..30f296ca 100644 --- a/Framework/HookProCommands/HookProCommands (C#).md +++ b/Framework/HookProCommands/HookProCommands (C#).md @@ -13,7 +13,7 @@ Language: C# Subject: Framework Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Framework/HookProCommands/ReadMe.md b/Framework/HookProCommands/ReadMe.md index c0f22868..30f296ca 100644 --- a/Framework/HookProCommands/ReadMe.md +++ b/Framework/HookProCommands/ReadMe.md @@ -13,7 +13,7 @@ Language: C# Subject: Framework Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Framework/InsertIntoContextMenu/Config.daml b/Framework/InsertIntoContextMenu/Config.daml index 09d50484..e984e7eb 100644 --- a/Framework/InsertIntoContextMenu/Config.daml +++ b/Framework/InsertIntoContextMenu/Config.daml @@ -1,4 +1,4 @@ - + - + - - - - - - - - + + + + + + + + \ No newline at end of file diff --git a/Framework/InsertIntoContextMenu/InsertIntoContextMenu (C#).md b/Framework/InsertIntoContextMenu/InsertIntoContextMenu (C#).md index fbd68a55..57c3e26e 100644 --- a/Framework/InsertIntoContextMenu/InsertIntoContextMenu (C#).md +++ b/Framework/InsertIntoContextMenu/InsertIntoContextMenu (C#).md @@ -13,7 +13,7 @@ Language: C# Subject: Framework Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Framework/InsertIntoContextMenu/ReadMe.md b/Framework/InsertIntoContextMenu/ReadMe.md index fbd68a55..57c3e26e 100644 --- a/Framework/InsertIntoContextMenu/ReadMe.md +++ b/Framework/InsertIntoContextMenu/ReadMe.md @@ -13,7 +13,7 @@ Language: C# Subject: Framework Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Framework/Licensing/Config.daml b/Framework/Licensing/Config.daml index 97baa392..bdb2c6eb 100644 --- a/Framework/Licensing/Config.daml +++ b/Framework/Licensing/Config.daml @@ -1,4 +1,4 @@ - + - + - + diff --git a/Framework/OpenMapViews/OpenMapViews (C#).md b/Framework/OpenMapViews/OpenMapViews (C#).md index 00841d88..4ffe2af1 100644 --- a/Framework/OpenMapViews/OpenMapViews (C#).md +++ b/Framework/OpenMapViews/OpenMapViews (C#).md @@ -13,7 +13,7 @@ Language: C# Subject: Framework Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Framework/OpenMapViews/OpenMapViews.csproj b/Framework/OpenMapViews/OpenMapViews.csproj index e7a0db24..c62f5665 100644 --- a/Framework/OpenMapViews/OpenMapViews.csproj +++ b/Framework/OpenMapViews/OpenMapViews.csproj @@ -1,7 +1,8 @@  - Debug1591 + Debug + 1591 AnyCPU 8.0.30703 2.0 @@ -14,7 +15,8 @@ 512 {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - 1591 + + 1591 true full false @@ -26,7 +28,8 @@ C:\Program Files\ArcGIS\Pro\bin\ArcGISPro.exe AnyCPU - 1591 + + 1591 pdbonly true bin\Release\ @@ -138,11 +141,13 @@ BuildZipPostProcess: ArcGIS Pro install is NOT required to build the add-in. An esriAddinX package is created in your output folder. BuildNoPostProcess: ArcGIS Pro install is NOT required to build the add-in. An esriAddinX package is NOT created. --> - 1591 + + 1591 BuildDefault OpenMapViews.xml - 1591 + + 1591 BuildDefault diff --git a/Framework/OpenMapViews/ReadMe.md b/Framework/OpenMapViews/ReadMe.md index 00841d88..4ffe2af1 100644 --- a/Framework/OpenMapViews/ReadMe.md +++ b/Framework/OpenMapViews/ReadMe.md @@ -13,7 +13,7 @@ Language: C# Subject: Framework Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Framework/ProWindowMVVM/Config.daml b/Framework/ProWindowMVVM/Config.daml index 5740f8b7..5783504b 100644 --- a/Framework/ProWindowMVVM/Config.daml +++ b/Framework/ProWindowMVVM/Config.daml @@ -1,4 +1,23 @@ - + + + ProWindowMVVM ProWindowMVVM description @@ -28,9 +47,7 @@ - diff --git a/Framework/ProWindowMVVM/Module1.cs b/Framework/ProWindowMVVM/Module1.cs index 77bbeef3..0eef3361 100644 --- a/Framework/ProWindowMVVM/Module1.cs +++ b/Framework/ProWindowMVVM/Module1.cs @@ -1,4 +1,22 @@ -using System; +/* + + Copyright 2020 Esri + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + + See the License for the specific language governing permissions and + limitations under the License. + +*/ +using System; using System.Collections.Generic; using System.Linq; using System.Text; diff --git a/Framework/ProWindowMVVM/ProWindowDialog.xaml b/Framework/ProWindowMVVM/ProWindowDialog.xaml index 066cec54..8702749e 100644 --- a/Framework/ProWindowMVVM/ProWindowDialog.xaml +++ b/Framework/ProWindowMVVM/ProWindowDialog.xaml @@ -1,4 +1,22 @@ - + Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2019 .NET Target Framework: 4.8 diff --git a/Framework/ProWindowMVVM/Properties/AssemblyInfo.cs b/Framework/ProWindowMVVM/Properties/AssemblyInfo.cs index c157c835..6062ddf7 100644 --- a/Framework/ProWindowMVVM/Properties/AssemblyInfo.cs +++ b/Framework/ProWindowMVVM/Properties/AssemblyInfo.cs @@ -1,4 +1,22 @@ -using System.Reflection; +/* + + Copyright 2020 Esri + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + + See the License for the specific language governing permissions and + limitations under the License. + +*/ +using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; diff --git a/Framework/ProWindowMVVM/ReadMe.md b/Framework/ProWindowMVVM/ReadMe.md index 1aba0d08..8a378bdd 100644 --- a/Framework/ProWindowMVVM/ReadMe.md +++ b/Framework/ProWindowMVVM/ReadMe.md @@ -13,7 +13,7 @@ Language: C# Subject: Framework Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2019 .NET Target Framework: 4.8 diff --git a/Framework/ProWindowMVVM/TestProWindowDialog.cs b/Framework/ProWindowMVVM/TestProWindowDialog.cs index 54aca8a3..4674f6f5 100644 --- a/Framework/ProWindowMVVM/TestProWindowDialog.cs +++ b/Framework/ProWindowMVVM/TestProWindowDialog.cs @@ -1,4 +1,22 @@ -using System; +/* + + Copyright 2020 Esri + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + + See the License for the specific language governing permissions and + limitations under the License. + +*/ +using System; using System.Collections.Generic; using System.Linq; using System.Text; diff --git a/Framework/ProgressDialog/Config.daml b/Framework/ProgressDialog/Config.daml index 11d5a500..a1e79ab0 100644 --- a/Framework/ProgressDialog/Config.daml +++ b/Framework/ProgressDialog/Config.daml @@ -1,4 +1,4 @@ - + - - - + - RemoveAddins + RemoveAddins Customize the backstage by creating a Remove Add-in tab Images\AddinDesktop32.png - ArcGIS Pro SDK Team, arcgisprosdk@esri.com + ArcGIS Pro SDK Team, arcgisprosdk@esri.com esri, http://www.esri.com 1/8/2016 Framework - @@ -44,30 +37,23 @@ --> - - + - - - + - - - + + - - \ No newline at end of file diff --git a/Framework/RemoveAddins/ReadMe.md b/Framework/RemoveAddins/ReadMe.md index 3491bcb5..996e5e61 100644 --- a/Framework/RemoveAddins/ReadMe.md +++ b/Framework/RemoveAddins/ReadMe.md @@ -15,7 +15,7 @@ Language: C# Subject: Framework Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Framework/RemoveAddins/RemoveAddins (C#).md b/Framework/RemoveAddins/RemoveAddins (C#).md index 3491bcb5..996e5e61 100644 --- a/Framework/RemoveAddins/RemoveAddins (C#).md +++ b/Framework/RemoveAddins/RemoveAddins (C#).md @@ -15,7 +15,7 @@ Language: C# Subject: Framework Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Framework/ReusableUserControl/Config.daml b/Framework/ReusableUserControl/Config.daml index 5344cdf1..aab9e9e6 100644 --- a/Framework/ReusableUserControl/Config.daml +++ b/Framework/ReusableUserControl/Config.daml @@ -1,4 +1,4 @@ - + - + @@ -52,7 +52,7 @@ - + @@ -70,10 +70,10 @@ - + diff --git a/Framework/WizardSample/ReadMe.md b/Framework/WizardSample/ReadMe.md index 4f03ba51..b424fa1e 100644 --- a/Framework/WizardSample/ReadMe.md +++ b/Framework/WizardSample/ReadMe.md @@ -13,7 +13,7 @@ Language: C# Subject: Framework Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Framework/WizardSample/WizardSample (C#).md b/Framework/WizardSample/WizardSample (C#).md index 4f03ba51..b424fa1e 100644 --- a/Framework/WizardSample/WizardSample (C#).md +++ b/Framework/WizardSample/WizardSample (C#).md @@ -13,7 +13,7 @@ Language: C# Subject: Framework Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Framework/WorkingWithDAML/Config.daml b/Framework/WorkingWithDAML/Config.daml index 1299f509..ccb0f80e 100644 --- a/Framework/WorkingWithDAML/Config.daml +++ b/Framework/WorkingWithDAML/Config.daml @@ -1,4 +1,4 @@ - + - - diff --git a/Geodatabase/CalculateStatistics/ReadMe.md b/Geodatabase/CalculateStatistics/ReadMe.md index e01e422e..d0554423 100644 --- a/Geodatabase/CalculateStatistics/ReadMe.md +++ b/Geodatabase/CalculateStatistics/ReadMe.md @@ -13,7 +13,7 @@ Language: C# Subject: Geodatabase Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2019 .NET Target Framework: 4.8 diff --git a/Geodatabase/DatastoresDefinitionsAndDatasets/Config.daml b/Geodatabase/DatastoresDefinitionsAndDatasets/Config.daml index 905c80bb..ac77ff47 100644 --- a/Geodatabase/DatastoresDefinitionsAndDatasets/Config.daml +++ b/Geodatabase/DatastoresDefinitionsAndDatasets/Config.daml @@ -1,4 +1,4 @@ - + - + - + diff --git a/Geodatabase/DatastoresDefinitionsAndDatasets/DatastoresDefinitionsAndDatasets (C#).md b/Geodatabase/DatastoresDefinitionsAndDatasets/DatastoresDefinitionsAndDatasets (C#).md index a4910c16..1f4b2cbf 100644 --- a/Geodatabase/DatastoresDefinitionsAndDatasets/DatastoresDefinitionsAndDatasets (C#).md +++ b/Geodatabase/DatastoresDefinitionsAndDatasets/DatastoresDefinitionsAndDatasets (C#).md @@ -13,7 +13,7 @@ Language: C# Subject: Geodatabase Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Geodatabase/DatastoresDefinitionsAndDatasets/ReadMe.md b/Geodatabase/DatastoresDefinitionsAndDatasets/ReadMe.md index a4910c16..1f4b2cbf 100644 --- a/Geodatabase/DatastoresDefinitionsAndDatasets/ReadMe.md +++ b/Geodatabase/DatastoresDefinitionsAndDatasets/ReadMe.md @@ -13,7 +13,7 @@ Language: C# Subject: Geodatabase Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Geodatabase/DeleteFeaturesBasedOnSubtype/Config.daml b/Geodatabase/DeleteFeaturesBasedOnSubtype/Config.daml index 2bf144b1..260eef76 100644 --- a/Geodatabase/DeleteFeaturesBasedOnSubtype/Config.daml +++ b/Geodatabase/DeleteFeaturesBasedOnSubtype/Config.daml @@ -1,4 +1,4 @@ - + - DeleteFeaturesBasedOnSubtype Geodatabase An Addin which will list all subtypes for a Feature Class and allow deletion of all features which have the selected subtype Images\AddinDesktop32.png - ArcGIS Pro SDK Team, arcgisprosdk@esri.com + ArcGIS Pro SDK Team, arcgisprosdk@esri.com esri, http://www.esri.com 3/3/2015 11:30:56 AM, 2015 diff --git a/Geodatabase/DeleteFeaturesBasedOnSubtype/DeleteFeaturesBasedOnSubtype (C#).md b/Geodatabase/DeleteFeaturesBasedOnSubtype/DeleteFeaturesBasedOnSubtype (C#).md index 904df64a..cc6a8f71 100644 --- a/Geodatabase/DeleteFeaturesBasedOnSubtype/DeleteFeaturesBasedOnSubtype (C#).md +++ b/Geodatabase/DeleteFeaturesBasedOnSubtype/DeleteFeaturesBasedOnSubtype (C#).md @@ -13,7 +13,7 @@ Language: C# Subject: Geodatabase Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Geodatabase/DeleteFeaturesBasedOnSubtype/ReadMe.md b/Geodatabase/DeleteFeaturesBasedOnSubtype/ReadMe.md index 904df64a..cc6a8f71 100644 --- a/Geodatabase/DeleteFeaturesBasedOnSubtype/ReadMe.md +++ b/Geodatabase/DeleteFeaturesBasedOnSubtype/ReadMe.md @@ -13,7 +13,7 @@ Language: C# Subject: Geodatabase Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Geodatabase/DeleteFeaturesBasedOnSubtypeVersioned/Config.daml b/Geodatabase/DeleteFeaturesBasedOnSubtypeVersioned/Config.daml index 6e5323d0..defdab0f 100644 --- a/Geodatabase/DeleteFeaturesBasedOnSubtypeVersioned/Config.daml +++ b/Geodatabase/DeleteFeaturesBasedOnSubtypeVersioned/Config.daml @@ -1,4 +1,4 @@ - + - DeleteFeaturesBasedOnSubtypeVersioned This addin will list all subtypes for a Feature Class and allow deletion of all features in a new version which have the selected subtype Images\AddinDesktop32.png - ArcGIS Pro SDK Team, arcgisprosdk@esri.com + ArcGIS Pro SDK Team, arcgisprosdk@esri.com esri, http://www.esri.com 4/20/2015 12:56:28 PM, 2015 Geodatabase diff --git a/Geodatabase/DeleteFeaturesBasedOnSubtypeVersioned/DeleteFeaturesBasedOnSubtypeVersioned (C#).md b/Geodatabase/DeleteFeaturesBasedOnSubtypeVersioned/DeleteFeaturesBasedOnSubtypeVersioned (C#).md index 053a9e96..8f8f005e 100644 --- a/Geodatabase/DeleteFeaturesBasedOnSubtypeVersioned/DeleteFeaturesBasedOnSubtypeVersioned (C#).md +++ b/Geodatabase/DeleteFeaturesBasedOnSubtypeVersioned/DeleteFeaturesBasedOnSubtypeVersioned (C#).md @@ -13,7 +13,7 @@ Language: C# Subject: Geodatabase Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Geodatabase/DeleteFeaturesBasedOnSubtypeVersioned/ReadMe.md b/Geodatabase/DeleteFeaturesBasedOnSubtypeVersioned/ReadMe.md index 053a9e96..8f8f005e 100644 --- a/Geodatabase/DeleteFeaturesBasedOnSubtypeVersioned/ReadMe.md +++ b/Geodatabase/DeleteFeaturesBasedOnSubtypeVersioned/ReadMe.md @@ -13,7 +13,7 @@ Language: C# Subject: Geodatabase Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Geodatabase/DomainsUsage/Config.daml b/Geodatabase/DomainsUsage/Config.daml index ae9201bf..fcc1f30f 100644 --- a/Geodatabase/DomainsUsage/Config.daml +++ b/Geodatabase/DomainsUsage/Config.daml @@ -1,4 +1,4 @@ - + - diff --git a/Geodatabase/DynamicJoins/DynamicJoins (C#).md b/Geodatabase/DynamicJoins/DynamicJoins (C#).md index 7567c200..921e6aa4 100644 --- a/Geodatabase/DynamicJoins/DynamicJoins (C#).md +++ b/Geodatabase/DynamicJoins/DynamicJoins (C#).md @@ -13,7 +13,7 @@ Language: C# Subject: Geodatabase Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Geodatabase/DynamicJoins/ReadMe.md b/Geodatabase/DynamicJoins/ReadMe.md index 7567c200..921e6aa4 100644 --- a/Geodatabase/DynamicJoins/ReadMe.md +++ b/Geodatabase/DynamicJoins/ReadMe.md @@ -13,7 +13,7 @@ Language: C# Subject: Geodatabase Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Geodatabase/FavoriteQueries/Config.daml b/Geodatabase/FavoriteQueries/Config.daml index 228577a2..977a634b 100644 --- a/Geodatabase/FavoriteQueries/Config.daml +++ b/Geodatabase/FavoriteQueries/Config.daml @@ -1,4 +1,4 @@ - + + + - @@ -57,7 +58,7 @@ - + diff --git a/Layouts/DuplicateLayout/DuplicateLayout (C#).md b/Layouts/DuplicateLayout/DuplicateLayout (C#).md index 797f0a95..2fcfcf0e 100644 --- a/Layouts/DuplicateLayout/DuplicateLayout (C#).md +++ b/Layouts/DuplicateLayout/DuplicateLayout (C#).md @@ -13,7 +13,7 @@ Language: C# Subject: Framework Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Layouts/DuplicateLayout/ReadMe.md b/Layouts/DuplicateLayout/ReadMe.md index 797f0a95..2fcfcf0e 100644 --- a/Layouts/DuplicateLayout/ReadMe.md +++ b/Layouts/DuplicateLayout/ReadMe.md @@ -13,7 +13,7 @@ Language: C# Subject: Framework Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Layouts/LayoutMapSeries/Config.daml b/Layouts/LayoutMapSeries/Config.daml index 829330d5..9177082d 100644 --- a/Layouts/LayoutMapSeries/Config.daml +++ b/Layouts/LayoutMapSeries/Config.daml @@ -1,4 +1,4 @@ - + - ConstructMarkerFromFont Create a marker from a Font character and apply to a point layer. Images\AddinDesktop32.png - ArcGIS Pro SDK Team, arcgisprosdk@esri.com + ArcGIS Pro SDK Team, arcgisprosdk@esri.com esri, http://www.esri.com 5/25/2016 1:41:29 PM, 2016 Map Authoring diff --git a/Map-Authoring/ConstructMarkerFromFont/ConstructMarkerFromFont (C#).md b/Map-Authoring/ConstructMarkerFromFont/ConstructMarkerFromFont (C#).md index 8ccf917e..3e4ab677 100644 --- a/Map-Authoring/ConstructMarkerFromFont/ConstructMarkerFromFont (C#).md +++ b/Map-Authoring/ConstructMarkerFromFont/ConstructMarkerFromFont (C#).md @@ -14,7 +14,7 @@ Language: C# Subject: Map Authoring Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Map-Authoring/ConstructMarkerFromFont/ConstructMarkerFromFont.csproj b/Map-Authoring/ConstructMarkerFromFont/ConstructMarkerFromFont.csproj index edf1a7a7..154c40f9 100644 --- a/Map-Authoring/ConstructMarkerFromFont/ConstructMarkerFromFont.csproj +++ b/Map-Authoring/ConstructMarkerFromFont/ConstructMarkerFromFont.csproj @@ -82,20 +82,20 @@ C:\Program Files\ArcGIS\Pro\bin\Extensions\DesktopExtensions\ArcGIS.Desktop.Extensions.dll False - - ..\..\packages\Extended.Wpf.Toolkit.3.7.0\lib\net40\Xceed.Wpf.AvalonDock.dll + + ..\..\packages\Extended.Wpf.Toolkit.4.0.1\lib\net40\Xceed.Wpf.AvalonDock.dll - - ..\..\packages\Extended.Wpf.Toolkit.3.7.0\lib\net40\Xceed.Wpf.AvalonDock.Themes.Aero.dll + + ..\..\packages\Extended.Wpf.Toolkit.4.0.1\lib\net40\Xceed.Wpf.AvalonDock.Themes.Aero.dll - - ..\..\packages\Extended.Wpf.Toolkit.3.7.0\lib\net40\Xceed.Wpf.AvalonDock.Themes.Metro.dll + + ..\..\packages\Extended.Wpf.Toolkit.4.0.1\lib\net40\Xceed.Wpf.AvalonDock.Themes.Metro.dll - - ..\..\packages\Extended.Wpf.Toolkit.3.7.0\lib\net40\Xceed.Wpf.AvalonDock.Themes.VS2010.dll + + ..\..\packages\Extended.Wpf.Toolkit.4.0.1\lib\net40\Xceed.Wpf.AvalonDock.Themes.VS2010.dll - - ..\..\packages\Extended.Wpf.Toolkit.3.7.0\lib\net40\Xceed.Wpf.Toolkit.dll + + ..\..\packages\Extended.Wpf.Toolkit.4.0.1\lib\net40\Xceed.Wpf.Toolkit.dll diff --git a/Map-Authoring/ConstructMarkerFromFont/ReadMe.md b/Map-Authoring/ConstructMarkerFromFont/ReadMe.md index 8ccf917e..3e4ab677 100644 --- a/Map-Authoring/ConstructMarkerFromFont/ReadMe.md +++ b/Map-Authoring/ConstructMarkerFromFont/ReadMe.md @@ -14,7 +14,7 @@ Language: C# Subject: Map Authoring Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Map-Authoring/ConstructMarkerFromFont/packages.config b/Map-Authoring/ConstructMarkerFromFont/packages.config index 7d4de2e5..d2938d4a 100644 --- a/Map-Authoring/ConstructMarkerFromFont/packages.config +++ b/Map-Authoring/ConstructMarkerFromFont/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file diff --git a/Map-Authoring/CustomSymbolPicker/Config.daml b/Map-Authoring/CustomSymbolPicker/Config.daml index e0a55341..85f27e13 100644 --- a/Map-Authoring/CustomSymbolPicker/Config.daml +++ b/Map-Authoring/CustomSymbolPicker/Config.daml @@ -1,4 +1,4 @@ - + - CustomSymbolPicker Search symbols in styles, create a symbol gallery and apply symbol to a feature layer Images\AddinDesktop32.png - ArcGIS Pro SDK Team, arcgisprosdk@esri.com + ArcGIS Pro SDK Team, arcgisprosdk@esri.com esri, http://www.esri.com 4/11/2015 11:38:37 AM, 2015 Map Authoring - diff --git a/Map-Authoring/CustomSymbolPicker/CustomSymbolPicker (C#).md b/Map-Authoring/CustomSymbolPicker/CustomSymbolPicker (C#).md index a9b36ae6..4f3f661f 100644 --- a/Map-Authoring/CustomSymbolPicker/CustomSymbolPicker (C#).md +++ b/Map-Authoring/CustomSymbolPicker/CustomSymbolPicker (C#).md @@ -13,7 +13,7 @@ Language: C# Subject: Map Authoring Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Map-Authoring/CustomSymbolPicker/ReadMe.md b/Map-Authoring/CustomSymbolPicker/ReadMe.md index a9b36ae6..4f3f661f 100644 --- a/Map-Authoring/CustomSymbolPicker/ReadMe.md +++ b/Map-Authoring/CustomSymbolPicker/ReadMe.md @@ -13,7 +13,7 @@ Language: C# Subject: Map Authoring Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Map-Authoring/DictionarySymbolPreview/Config.daml b/Map-Authoring/DictionarySymbolPreview/Config.daml index 36929a37..b3dc53af 100644 --- a/Map-Authoring/DictionarySymbolPreview/Config.daml +++ b/Map-Authoring/DictionarySymbolPreview/Config.daml @@ -1,4 +1,4 @@ - + + + + DisplayFilters + DisplayFilters description + Images\AddinDesktop32.png + uma2526 + Acme + 7/6/2020 11:15:36 AM, 2020 + Framework + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Map-Authoring/DisplayFilters/DarkImages/AddInDesktop16.png b/Map-Authoring/DisplayFilters/DarkImages/AddInDesktop16.png new file mode 100644 index 00000000..0118942a Binary files /dev/null and b/Map-Authoring/DisplayFilters/DarkImages/AddInDesktop16.png differ diff --git a/Map-Authoring/DisplayFilters/DarkImages/AddInDesktop32.png b/Map-Authoring/DisplayFilters/DarkImages/AddInDesktop32.png new file mode 100644 index 00000000..9713e3b1 Binary files /dev/null and b/Map-Authoring/DisplayFilters/DarkImages/AddInDesktop32.png differ diff --git a/Map-Authoring/DisplayFilters/DarkImages/GenericButtonBlue16.png b/Map-Authoring/DisplayFilters/DarkImages/GenericButtonBlue16.png new file mode 100644 index 00000000..20b11875 Binary files /dev/null and b/Map-Authoring/DisplayFilters/DarkImages/GenericButtonBlue16.png differ diff --git a/Map-Authoring/DisplayFilters/DarkImages/GenericButtonBlue32.png b/Map-Authoring/DisplayFilters/DarkImages/GenericButtonBlue32.png new file mode 100644 index 00000000..e3b26ab9 Binary files /dev/null and b/Map-Authoring/DisplayFilters/DarkImages/GenericButtonBlue32.png differ diff --git a/Map-Authoring/DisplayFilters/DisplayFilters (C#).md b/Map-Authoring/DisplayFilters/DisplayFilters (C#).md new file mode 100644 index 00000000..f99a92d4 --- /dev/null +++ b/Map-Authoring/DisplayFilters/DisplayFilters (C#).md @@ -0,0 +1,60 @@ +## DisplayFilters + + +This sample demonstrates how to add Display Filters to Feature Layers. + + + +View it live + + +``` +Language: C# +Subject: Framework +Contributor: ArcGIS Pro SDK Team +Organization: Esri, http://www.esri.com +Date: 7/01/2020 +ArcGIS Pro: 2.6 +Visual Studio: 2019 +.NET Target Framework: 4.8 +``` + +## Resources + +* [API Reference online](https://pro.arcgis.com/en/pro-app/sdk/api-reference) +* ArcGIS Pro SDK for .NET (pro.arcgis.com) +* [arcgis-pro-sdk-community-samples](https://github.com/Esri/arcgis-pro-sdk-community-samples) +* [ArcGIS Pro DAML ID Reference](https://github.com/Esri/arcgis-pro-sdk/wiki/ArcGIS-Pro-DAML-ID-Reference) +* [FAQ](https://github.com/Esri/arcgis-pro-sdk/wiki/FAQ) +* [ArcGIS Pro SDK icons](https://github.com/Esri/arcgis-pro-sdk/releases/tag/2.4.0.19948) + +![ArcGIS Pro SDK for .NET Icons](https://Esri.github.io/arcgis-pro-sdk/images/Home/Image-of-icons.png "ArcGIS Pro SDK Icons") + +### Samples Data + +* Sample data for ArcGIS Pro SDK Community Samples can be downloaded from the [repo releases](https://github.com/Esri/arcgis-pro-sdk-community-samples/releases) page. + +## How to use the sample + +1. Download the Community Sample data (see under the 'Resources' section for downloading sample data). The sample data contains a folder called 'C:\Data\DisplayFilters' with sample data required for this solution. Make sure that the Sample data is unzipped in c:\data and "C:\Data\DisplayFilters" is available. +1. In Visual Studio click the Build menu. Then select Build Solution. +1. Click Start button to open ArcGIS Pro. +1. ArcGIS Pro will open. +1. Create a new blank Map project. +1. Add the C:\Data\DisplayFilters\Hydrology.lpkx layer file to the map. This is a sample dataset of the Hydrology in the US available with the [ArcGIS Pro SDK Community Data](https://github.com/Esri/arcgis-pro-sdk-community-samples#samples-data). +1. [UI](screenshots/Hydrology.png) +1. Click the Add-In tab. There should be two buttons created by this sample on this tab in the "Display Filters" group: Apply Display Filters 1 amd Apply Display Filters 2. +[UI](screenshots/Buttons.png) + +1. These buttons create and apply display filters to view the dense Hydrology dataset. +1. The "Apply Display Filters 1" button uses the CIMDefinition of the Hydrology layer using the GetDefinition\SetDefinition method pair. +1. The "Apply Display Filters 2" button uses the LayerDocument class to retrieve and work with the CIMDefinition. +![UI](screenshots/DisplayFilter.png) + + + + + +      ArcGIS Pro SDK for Microsoft .NET Framework +             +[Home](https://github.com/Esri/arcgis-pro-sdk/wiki) | API Reference | [Requirements](https://github.com/Esri/arcgis-pro-sdk/wiki#requirements) | [Download](https://github.com/Esri/arcgis-pro-sdk/wiki#installing-arcgis-pro-sdk-for-net) | Samples diff --git a/Map-Authoring/DisplayFilters/DisplayFilters.csproj b/Map-Authoring/DisplayFilters/DisplayFilters.csproj new file mode 100644 index 00000000..f1484c1b --- /dev/null +++ b/Map-Authoring/DisplayFilters/DisplayFilters.csproj @@ -0,0 +1,177 @@ + + + + Debug + AnyCPU + 8.0.30703 + 2.0 + {219BA09D-CA22-4BA9-B8BF-AE490499A656} + Library + Properties + DisplayFilters + DisplayFilters + v4.8 + 512 + {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + Program + C:\Program Files\ArcGIS\Pro\bin\ArcGISPro.exe + AnyCPU + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + Program + C:\Program Files\ArcGIS\Pro\bin\ArcGISPro.exe + AnyCPU + + + $([MSBuild]::GetRegistryValueFromView('HKEY_LOCAL_MACHINE\SOFTWARE\ESRI\ArcGISPro', 'InstallDir', null, RegistryView.Registry64)) + $(registry:HKEY_CURRENT_USER\SOFTWARE\ESRI\ArcGISPro@InstallDir) + + + + + + + + + + + + + + + + C:\Program Files\ArcGIS\Pro\bin\ArcGIS.Desktop.Framework.dll + False + + + C:\Program Files\ArcGIS\Pro\bin\ArcGIS.Core.dll + False + + + C:\Program Files\ArcGIS\Pro\bin\Extensions\Core\ArcGIS.Desktop.Core.dll + False + + + C:\Program Files\ArcGIS\Pro\bin\Extensions\Mapping\ArcGIS.Desktop.Mapping.dll + False + + + C:\Program Files\ArcGIS\Pro\bin\Extensions\Catalog\ArcGIS.Desktop.Catalog.dll + False + + + C:\Program Files\ArcGIS\Pro\bin\Extensions\Editing\ArcGIS.Desktop.Editing.dll + False + + + C:\Program Files\ArcGIS\Pro\bin\Extensions\DesktopExtensions\ArcGIS.Desktop.Extensions.dll + False + + + C:\Program Files\ArcGIS\Pro\bin\Extensions\GeoProcessing\ArcGIS.Desktop.GeoProcessing.dll + False + + + C:\Program Files\ArcGIS\Pro\bin\Extensions\Layout\ArcGIS.Desktop.Layouts.dll + False + + + C:\Program Files\ArcGIS\Pro\bin\ArcGIS.Desktop.Shared.Wpf.dll + False + + + C:\Program Files\ArcGIS\Pro\bin\ArcGIS.Desktop.Ribbon.Wpf.dll + False + + + C:\Program Files\ArcGIS\Pro\bin\ArcGIS.Desktop.DataGrid.Contrib.Wpf.dll + False + + + C:\Program Files\ArcGIS\Pro\bin\ArcGIS.Desktop.Resources.dll + False + + + C:\Program Files\ArcGIS\Pro\bin\ArcGIS.Desktop.Resources.dll + False + + + C:\Program Files\ArcGIS\Pro\bin\ESRI.ArcGIS.ItemIndex.dll + False + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + BuildDefault + bin\Debug\DisplayFilters.xml + + + BuildDefault + + + + + + + + + \ No newline at end of file diff --git a/Map-Authoring/DisplayFilters/DisplayFilters.sln b/Map-Authoring/DisplayFilters/DisplayFilters.sln new file mode 100644 index 00000000..f73a2657 --- /dev/null +++ b/Map-Authoring/DisplayFilters/DisplayFilters.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29905.134 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DisplayFilters", "DisplayFilters.csproj", "{219BA09D-CA22-4BA9-B8BF-AE490499A656}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {219BA09D-CA22-4BA9-B8BF-AE490499A656}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {219BA09D-CA22-4BA9-B8BF-AE490499A656}.Debug|Any CPU.Build.0 = Debug|Any CPU + {219BA09D-CA22-4BA9-B8BF-AE490499A656}.Release|Any CPU.ActiveCfg = Release|Any CPU + {219BA09D-CA22-4BA9-B8BF-AE490499A656}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {29C47899-850A-44E1-B036-2BB04608B02F} + EndGlobalSection +EndGlobal diff --git a/Map-Authoring/DisplayFilters/Images/AddInDesktop16.png b/Map-Authoring/DisplayFilters/Images/AddInDesktop16.png new file mode 100644 index 00000000..5910bbf3 Binary files /dev/null and b/Map-Authoring/DisplayFilters/Images/AddInDesktop16.png differ diff --git a/Map-Authoring/DisplayFilters/Images/AddInDesktop32.png b/Map-Authoring/DisplayFilters/Images/AddInDesktop32.png new file mode 100644 index 00000000..1d19084a Binary files /dev/null and b/Map-Authoring/DisplayFilters/Images/AddInDesktop32.png differ diff --git a/Map-Authoring/DisplayFilters/Images/GenericButtonBlue16.png b/Map-Authoring/DisplayFilters/Images/GenericButtonBlue16.png new file mode 100644 index 00000000..ab6cad35 Binary files /dev/null and b/Map-Authoring/DisplayFilters/Images/GenericButtonBlue16.png differ diff --git a/Map-Authoring/DisplayFilters/Images/GenericButtonBlue32.png b/Map-Authoring/DisplayFilters/Images/GenericButtonBlue32.png new file mode 100644 index 00000000..4a573fd6 Binary files /dev/null and b/Map-Authoring/DisplayFilters/Images/GenericButtonBlue32.png differ diff --git a/Map-Authoring/DisplayFilters/Module1.cs b/Map-Authoring/DisplayFilters/Module1.cs new file mode 100644 index 00000000..0cb7e18f --- /dev/null +++ b/Map-Authoring/DisplayFilters/Module1.cs @@ -0,0 +1,88 @@ +/* + + Copyright 2020 Esri + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + + See the License for the specific language governing permissions and + limitations under the License. + +*/ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Windows.Input; +using System.Threading.Tasks; +using ArcGIS.Core.CIM; +using ArcGIS.Core.Data; +using ArcGIS.Core.Geometry; +using ArcGIS.Desktop.Catalog; +using ArcGIS.Desktop.Core; +using ArcGIS.Desktop.Editing; +using ArcGIS.Desktop.Extensions; +using ArcGIS.Desktop.Framework; +using ArcGIS.Desktop.Framework.Contracts; +using ArcGIS.Desktop.Framework.Dialogs; +using ArcGIS.Desktop.Framework.Threading.Tasks; +using ArcGIS.Desktop.Mapping; + +namespace DisplayFilters +{ + /// + /// This sample demonstrates how to add Display Filters to Feature Layers. + /// + /// + /// 1. Download the Community Sample data (see under the 'Resources' section for downloading sample data). The sample data contains a folder called 'C:\Data\DisplayFilters' with sample data required for this solution. Make sure that the Sample data is unzipped in c:\data and "C:\Data\DisplayFilters" is available. + /// 1. In Visual Studio click the Build menu. Then select Build Solution. + /// 1. Click Start button to open ArcGIS Pro. + /// 1. ArcGIS Pro will open. + /// 1. Create a new blank Map project. + /// 1. Add the C:\Data\DisplayFilters\Hydrology.lpkx layer file to the map. This is a sample dataset of the Hydrology in the US available with the [ArcGIS Pro SDK Community Data](https://github.com/Esri/arcgis-pro-sdk-community-samples#samples-data). + /// 1. [UI](screenshots/Hydrology.png) + /// 1. Click the Add-In tab. There should be two buttons created by this sample on this tab in the "Display Filters" group: Apply Display Filters 1 amd Apply Display Filters 2. + /// [UI](screenshots/Buttons.png) + /// 1. These buttons create and apply display filters to view the dense Hydrology dataset. + /// 1. The "Apply Display Filters 1" button uses the CIMDefinition of the Hydrology layer using the GetDefinition\SetDefinition method pair. + /// 1. The "Apply Display Filters 2" button uses the LayerDocument class to retrieve and work with the CIMDefinition. + /// ![UI](screenshots/DisplayFilter.png) + /// + internal class Module1 : Module + { + private static Module1 _this = null; + + /// + /// Retrieve the singleton instance to this module here + /// + public static Module1 Current + { + get + { + return _this ?? (_this = (Module1)FrameworkApplication.FindModule("DisplayFilters_Module")); + } + } + + #region Overrides + /// + /// Called by Framework when ArcGIS Pro is closing + /// + /// False to prevent Pro from closing, otherwise True + protected override bool CanUnload() + { + //TODO - add your business logic + //return false to ~cancel~ Application close + return true; + } + + #endregion Overrides + + } +} diff --git a/Map-Authoring/DisplayFilters/Properties/AssemblyInfo.cs b/Map-Authoring/DisplayFilters/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..9c792a1b --- /dev/null +++ b/Map-Authoring/DisplayFilters/Properties/AssemblyInfo.cs @@ -0,0 +1,54 @@ +/* + + Copyright 2020 Esri + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + + See the License for the specific language governing permissions and + limitations under the License. + +*/ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("DisplayFilters")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Acme")] +[assembly: AssemblyProduct("DisplayFilters")] +[assembly: AssemblyCopyright("Copyright © Acme 2020")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("219ba09d-ca22-4ba9-b8bf-ae490499a656")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Map-Authoring/DisplayFilters/ReadMe.md b/Map-Authoring/DisplayFilters/ReadMe.md new file mode 100644 index 00000000..f99a92d4 --- /dev/null +++ b/Map-Authoring/DisplayFilters/ReadMe.md @@ -0,0 +1,60 @@ +## DisplayFilters + + +This sample demonstrates how to add Display Filters to Feature Layers. + + + +View it live + + +``` +Language: C# +Subject: Framework +Contributor: ArcGIS Pro SDK Team +Organization: Esri, http://www.esri.com +Date: 7/01/2020 +ArcGIS Pro: 2.6 +Visual Studio: 2019 +.NET Target Framework: 4.8 +``` + +## Resources + +* [API Reference online](https://pro.arcgis.com/en/pro-app/sdk/api-reference) +* ArcGIS Pro SDK for .NET (pro.arcgis.com) +* [arcgis-pro-sdk-community-samples](https://github.com/Esri/arcgis-pro-sdk-community-samples) +* [ArcGIS Pro DAML ID Reference](https://github.com/Esri/arcgis-pro-sdk/wiki/ArcGIS-Pro-DAML-ID-Reference) +* [FAQ](https://github.com/Esri/arcgis-pro-sdk/wiki/FAQ) +* [ArcGIS Pro SDK icons](https://github.com/Esri/arcgis-pro-sdk/releases/tag/2.4.0.19948) + +![ArcGIS Pro SDK for .NET Icons](https://Esri.github.io/arcgis-pro-sdk/images/Home/Image-of-icons.png "ArcGIS Pro SDK Icons") + +### Samples Data + +* Sample data for ArcGIS Pro SDK Community Samples can be downloaded from the [repo releases](https://github.com/Esri/arcgis-pro-sdk-community-samples/releases) page. + +## How to use the sample + +1. Download the Community Sample data (see under the 'Resources' section for downloading sample data). The sample data contains a folder called 'C:\Data\DisplayFilters' with sample data required for this solution. Make sure that the Sample data is unzipped in c:\data and "C:\Data\DisplayFilters" is available. +1. In Visual Studio click the Build menu. Then select Build Solution. +1. Click Start button to open ArcGIS Pro. +1. ArcGIS Pro will open. +1. Create a new blank Map project. +1. Add the C:\Data\DisplayFilters\Hydrology.lpkx layer file to the map. This is a sample dataset of the Hydrology in the US available with the [ArcGIS Pro SDK Community Data](https://github.com/Esri/arcgis-pro-sdk-community-samples#samples-data). +1. [UI](screenshots/Hydrology.png) +1. Click the Add-In tab. There should be two buttons created by this sample on this tab in the "Display Filters" group: Apply Display Filters 1 amd Apply Display Filters 2. +[UI](screenshots/Buttons.png) + +1. These buttons create and apply display filters to view the dense Hydrology dataset. +1. The "Apply Display Filters 1" button uses the CIMDefinition of the Hydrology layer using the GetDefinition\SetDefinition method pair. +1. The "Apply Display Filters 2" button uses the LayerDocument class to retrieve and work with the CIMDefinition. +![UI](screenshots/DisplayFilter.png) + + + + + +      ArcGIS Pro SDK for Microsoft .NET Framework +             +[Home](https://github.com/Esri/arcgis-pro-sdk/wiki) | API Reference | [Requirements](https://github.com/Esri/arcgis-pro-sdk/wiki#requirements) | [Download](https://github.com/Esri/arcgis-pro-sdk/wiki#installing-arcgis-pro-sdk-for-net) | Samples diff --git a/Map-Authoring/DisplayFilters/screenshots/DisplayFilter.PNG b/Map-Authoring/DisplayFilters/screenshots/DisplayFilter.PNG new file mode 100644 index 00000000..52e53bcd Binary files /dev/null and b/Map-Authoring/DisplayFilters/screenshots/DisplayFilter.PNG differ diff --git a/Map-Authoring/DisplayFilters/screenshots/Hydrology.PNG b/Map-Authoring/DisplayFilters/screenshots/Hydrology.PNG new file mode 100644 index 00000000..5537aac7 Binary files /dev/null and b/Map-Authoring/DisplayFilters/screenshots/Hydrology.PNG differ diff --git a/Map-Authoring/DisplayFilters/screenshots/buttons.PNG b/Map-Authoring/DisplayFilters/screenshots/buttons.PNG new file mode 100644 index 00000000..bf71280d Binary files /dev/null and b/Map-Authoring/DisplayFilters/screenshots/buttons.PNG differ diff --git a/Map-Authoring/ExportWeb3DObjectResource/Config.daml b/Map-Authoring/ExportWeb3DObjectResource/Config.daml index 000f1508..4d5b2a15 100644 --- a/Map-Authoring/ExportWeb3DObjectResource/Config.daml +++ b/Map-Authoring/ExportWeb3DObjectResource/Config.daml @@ -1,4 +1,4 @@ - + - + - - + diff --git a/Map-Authoring/GetSymbolSwatch/GetSymbolSwatch (C#).md b/Map-Authoring/GetSymbolSwatch/GetSymbolSwatch (C#).md index a4c5a528..b8ee059a 100644 --- a/Map-Authoring/GetSymbolSwatch/GetSymbolSwatch (C#).md +++ b/Map-Authoring/GetSymbolSwatch/GetSymbolSwatch (C#).md @@ -13,7 +13,7 @@ Language: C# Subject: Map-Authoring Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Map-Authoring/GetSymbolSwatch/ReadMe.md b/Map-Authoring/GetSymbolSwatch/ReadMe.md index a4c5a528..b8ee059a 100644 --- a/Map-Authoring/GetSymbolSwatch/ReadMe.md +++ b/Map-Authoring/GetSymbolSwatch/ReadMe.md @@ -13,7 +13,7 @@ Language: C# Subject: Map-Authoring Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Map-Authoring/GraphicsLayers/AddGraphicsLayer.cs b/Map-Authoring/GraphicsLayers/AddGraphicsLayer.cs new file mode 100644 index 00000000..3846639d --- /dev/null +++ b/Map-Authoring/GraphicsLayers/AddGraphicsLayer.cs @@ -0,0 +1,63 @@ +/* + + Copyright 2020 Esri + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + + See the License for the specific language governing permissions and + limitations under the License. + +*/ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using ArcGIS.Core.CIM; +using ArcGIS.Core.Data; +using ArcGIS.Core.Geometry; +using ArcGIS.Desktop.Catalog; +using ArcGIS.Desktop.Core; +using ArcGIS.Desktop.Editing; +using ArcGIS.Desktop.Extensions; +using ArcGIS.Desktop.Framework; +using ArcGIS.Desktop.Framework.Contracts; +using ArcGIS.Desktop.Framework.Dialogs; +using ArcGIS.Desktop.Framework.Threading.Tasks; +using ArcGIS.Desktop.Mapping; + +namespace GraphicsLayers +{ + internal class AddGraphicsLayer : Button + { + protected override void OnClick() + { + GroupLayer selectedGroupLayer = null; + + //If one group layer is selected, then add graphics layer to that one layer + if (MapView.Active.GetSelectedLayers().Count == 1) + selectedGroupLayer = MapView.Active.GetSelectedLayers()[0] as GroupLayer; + + var graphicsLayerCreationParams = new GraphicsLayerCreationParams {Name = "Graphics Layer" }; + QueuedTask.Run( () => { + if (selectedGroupLayer != null) + LayerFactory.Instance.CreateLayer(graphicsLayerCreationParams, selectedGroupLayer, +LayerPosition.AutoArrange); + if (selectedGroupLayer == null) + LayerFactory.Instance.CreateLayer(graphicsLayerCreationParams, MapView.Active.Map, +LayerPosition.AutoArrange); + + }); + + + } + } +} diff --git a/Map-Authoring/GraphicsLayers/Align/AlignLeft.cs b/Map-Authoring/GraphicsLayers/Align/AlignLeft.cs new file mode 100644 index 00000000..d0f5943b --- /dev/null +++ b/Map-Authoring/GraphicsLayers/Align/AlignLeft.cs @@ -0,0 +1,79 @@ +/* + + Copyright 2020 Esri + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + + See the License for the specific language governing permissions and + limitations under the License. + +*/ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Input; +using ArcGIS.Core.CIM; +using ArcGIS.Core.Data; +using ArcGIS.Core.Geometry; +using ArcGIS.Desktop.Catalog; +using ArcGIS.Desktop.Core; +using ArcGIS.Desktop.Editing; +using ArcGIS.Desktop.Extensions; +using ArcGIS.Desktop.Framework; +using ArcGIS.Desktop.Framework.Contracts; +using ArcGIS.Desktop.Framework.Dialogs; +using ArcGIS.Desktop.Framework.Threading.Tasks; +using ArcGIS.Desktop.Mapping; + +namespace GraphicsLayers.Align +{ + internal class AlignLeft : MapTool + { + public AlignLeft() + { + IsSketchTool = true; + SketchType = SketchGeometryType.Rectangle; + SketchOutputMode = SketchOutputMode.Map; + } + + protected override Task OnToolActivateAsync(bool active) + { + return base.OnToolActivateAsync(active); + } + + protected override async Task OnSketchCompleteAsync(Geometry geometry) + { + return await QueuedTask.Run(() => { + var selPoly = geometry as Polygon; + //Select graphics + var selectedElements = MapView.Active.SelectElements(selPoly); + if (selectedElements.Count < 2) + { + MessageBox.Show("Select more than 1 graphic element to align.", "Align Left"); + return true; + } + //Get the ID of Pro's Align Left button and use it. + var alignLeftCmd = FrameworkApplication.GetPlugInWrapper("esri_layouts_alignLeft") as ICommand; + if (alignLeftCmd != null) + { + if (alignLeftCmd.CanExecute(null)) + { + alignLeftCmd.Execute(null); + } + } + return true; + + }); + } + } +} diff --git a/Map-Authoring/GraphicsLayers/Align/AlignTop.cs b/Map-Authoring/GraphicsLayers/Align/AlignTop.cs new file mode 100644 index 00000000..b5cc1657 --- /dev/null +++ b/Map-Authoring/GraphicsLayers/Align/AlignTop.cs @@ -0,0 +1,79 @@ +/* + + Copyright 2020 Esri + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + + See the License for the specific language governing permissions and + limitations under the License. + +*/ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Input; +using ArcGIS.Core.CIM; +using ArcGIS.Core.Data; +using ArcGIS.Core.Geometry; +using ArcGIS.Desktop.Catalog; +using ArcGIS.Desktop.Core; +using ArcGIS.Desktop.Editing; +using ArcGIS.Desktop.Extensions; +using ArcGIS.Desktop.Framework; +using ArcGIS.Desktop.Framework.Contracts; +using ArcGIS.Desktop.Framework.Dialogs; +using ArcGIS.Desktop.Framework.Threading.Tasks; +using ArcGIS.Desktop.Mapping; + +namespace GraphicsLayers.Align +{ + internal class AlignTop : MapTool + { + public AlignTop() + { + IsSketchTool = true; + SketchType = SketchGeometryType.Rectangle; + SketchOutputMode = SketchOutputMode.Map; + } + + protected override Task OnToolActivateAsync(bool active) + { + return base.OnToolActivateAsync(active); + } + + protected override async Task OnSketchCompleteAsync(Geometry geometry) + { + return await QueuedTask.Run(() => { + var selPoly = geometry as Polygon; + //Select graphics + var selectedElements = MapView.Active.SelectElements(selPoly); + if (selectedElements.Count < 2) + { + MessageBox.Show("Select more than 1 graphic element to align.", "Align Top"); + return true; + } + //Get the ID of Pro's Align Left button and use it. + var alignLeftCmd = FrameworkApplication.GetPlugInWrapper("esri_layouts_alignTop") as ICommand; + if (alignLeftCmd != null) + { + if (alignLeftCmd.CanExecute(null)) + { + alignLeftCmd.Execute(null); + } + } + return true; + + }); + } + } +} diff --git a/Map-Authoring/GraphicsLayers/ArrangeGraphics/GroupElements.cs b/Map-Authoring/GraphicsLayers/ArrangeGraphics/GroupElements.cs new file mode 100644 index 00000000..935fb698 --- /dev/null +++ b/Map-Authoring/GraphicsLayers/ArrangeGraphics/GroupElements.cs @@ -0,0 +1,57 @@ +/* + + Copyright 2020 Esri + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + + See the License for the specific language governing permissions and + limitations under the License. + +*/ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using ArcGIS.Core.CIM; +using ArcGIS.Core.Data; +using ArcGIS.Core.Geometry; +using ArcGIS.Desktop.Catalog; +using ArcGIS.Desktop.Core; +using ArcGIS.Desktop.Editing; +using ArcGIS.Desktop.Extensions; +using ArcGIS.Desktop.Framework; +using ArcGIS.Desktop.Framework.Contracts; +using ArcGIS.Desktop.Framework.Dialogs; +using ArcGIS.Desktop.Framework.Threading.Tasks; +using ArcGIS.Desktop.Mapping; + +namespace GraphicsLayers.ArrangeGraphics +{ + internal class GroupElements : Button + { + protected override void OnClick() + { + QueuedTask.Run( () => { + //get the selected graphic elements + //elements selected in multiple Graphic layers, no op. + if (Module1.Current.GLWithElements.Count > 1) return; + //get graphics layer + var gl = Module1.Current.GLWithElements.FirstOrDefault().Key; + //Get selected elements in graphics layer + var elements = Module1.Current.GLWithElements.FirstOrDefault().Value; + //group the selected elements + gl.GroupElements(elements); + }); + + } + } +} diff --git a/Map-Authoring/GraphicsLayers/ArrangeGraphics/SelectGraphicsToGroup.cs b/Map-Authoring/GraphicsLayers/ArrangeGraphics/SelectGraphicsToGroup.cs new file mode 100644 index 00000000..b8527000 --- /dev/null +++ b/Map-Authoring/GraphicsLayers/ArrangeGraphics/SelectGraphicsToGroup.cs @@ -0,0 +1,97 @@ +/* + + Copyright 2020 Esri + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + + See the License for the specific language governing permissions and + limitations under the License. + +*/ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using ArcGIS.Core.CIM; +using ArcGIS.Core.Data; +using ArcGIS.Core.Geometry; +using ArcGIS.Desktop.Catalog; +using ArcGIS.Desktop.Core; +using ArcGIS.Desktop.Editing; +using ArcGIS.Desktop.Extensions; +using ArcGIS.Desktop.Framework; +using ArcGIS.Desktop.Framework.Contracts; +using ArcGIS.Desktop.Framework.Dialogs; +using ArcGIS.Desktop.Framework.Threading.Tasks; +using ArcGIS.Desktop.Layouts; +using ArcGIS.Desktop.Mapping; + +namespace GraphicsLayers.ArrangeGraphics +{ + internal class SelectGraphicsToGroup : MapTool + { + public SelectGraphicsToGroup() + { + IsSketchTool = true; + SketchType = SketchGeometryType.Rectangle; + SketchOutputMode = SketchOutputMode.Map; + } + + protected override Task OnToolActivateAsync(bool active) + { + return base.OnToolActivateAsync(active); + } + + protected override async Task OnSketchCompleteAsync(Geometry geometry) + { + return await QueuedTask.Run( () => { + //Select elements in geometry + var selectedElements = MapView.Active.SelectElements(geometry, SelectionCombinationMethod.New); + + Dictionary> glElements = new Dictionary>(); + + foreach (var selElement in selectedElements) + { + //Get element's parent + var elementContainer = selElement.GetParent() as GraphicsLayer; + if (glElements.ContainsKey(elementContainer)) + { + glElements[elementContainer].Add(selElement); + } + else + glElements.Add(elementContainer, new List { selElement}); + } + + //The dictionary is now populated + if (glElements.Count == 0) + { + MessageBox.Show($"No elements selected."); + return true; + } + //elements selected in multiple Graphic layers, no op. + if (glElements.Count > 1) + { + MessageBox.Show($"Select elements in the same graphics layer to group them."); + return true; + } + //get graphics layer + var gl = glElements.FirstOrDefault().Key; + //Get selected elements in graphics layer + var elements = glElements.FirstOrDefault().Value; + if (elements.Count == 0) return true; + if (elements.Count == 1) return true; + gl.GroupElements(elements); + return true; + }); + } + } +} diff --git a/Map-Authoring/GraphicsLayers/ArrangeGraphics/UnGroupElements.cs b/Map-Authoring/GraphicsLayers/ArrangeGraphics/UnGroupElements.cs new file mode 100644 index 00000000..87510a4e --- /dev/null +++ b/Map-Authoring/GraphicsLayers/ArrangeGraphics/UnGroupElements.cs @@ -0,0 +1,66 @@ +/* + + Copyright 2020 Esri + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + + See the License for the specific language governing permissions and + limitations under the License. + +*/ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using ArcGIS.Core.CIM; +using ArcGIS.Core.Data; +using ArcGIS.Core.Geometry; +using ArcGIS.Desktop.Catalog; +using ArcGIS.Desktop.Core; +using ArcGIS.Desktop.Editing; +using ArcGIS.Desktop.Extensions; +using ArcGIS.Desktop.Framework; +using ArcGIS.Desktop.Framework.Contracts; +using ArcGIS.Desktop.Framework.Dialogs; +using ArcGIS.Desktop.Framework.Threading.Tasks; +using ArcGIS.Desktop.Layouts; +using ArcGIS.Desktop.Mapping; + +namespace GraphicsLayers.ArrangeGraphics +{ + internal class UnGroupElements : Button + { + protected override void OnClick() + { + //return if no target graphics layer + QueuedTask.Run( () => { + //get the selected graphic elements + //elements selected in multiple Graphic layers, no op. + if (Module1.Current.GLWithElements.Count > 1) return; + //get graphics layer + var gl = Module1.Current.GLWithElements.FirstOrDefault().Key; + //Get selected elements in graphics layer + var elements = Module1.Current.GLWithElements.FirstOrDefault().Value; + List groupElements = new List(); + foreach (var element in elements) + { + if (element is GroupElement) + groupElements.Add(element as GroupElement); + } + //return if no graphic elements are grouped selected + if (groupElements.Count() == 0) return; + //Ungroup the selected elements + gl.UnGroupElements(groupElements); + }); + } + } +} diff --git a/Map-Authoring/GraphicsLayers/Clipboard/CopyGraphics.cs b/Map-Authoring/GraphicsLayers/Clipboard/CopyGraphics.cs new file mode 100644 index 00000000..6251c6b0 --- /dev/null +++ b/Map-Authoring/GraphicsLayers/Clipboard/CopyGraphics.cs @@ -0,0 +1,49 @@ +/* + + Copyright 2020 Esri + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + + See the License for the specific language governing permissions and + limitations under the License. + +*/ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using ArcGIS.Core.CIM; +using ArcGIS.Core.Data; +using ArcGIS.Core.Geometry; +using ArcGIS.Desktop.Catalog; +using ArcGIS.Desktop.Core; +using ArcGIS.Desktop.Editing; +using ArcGIS.Desktop.Extensions; +using ArcGIS.Desktop.Framework; +using ArcGIS.Desktop.Framework.Contracts; +using ArcGIS.Desktop.Framework.Dialogs; +using ArcGIS.Desktop.Framework.Threading.Tasks; +using ArcGIS.Desktop.Layouts; +using ArcGIS.Desktop.Mapping; + +namespace GraphicsLayers.Clipboard +{ + internal class CopyGraphics : Button + { + protected override void OnClick() + { + if (Module1.Current.GraphicsLayerSelectedElements.Count == 0) return; //nothing selected + //save the selected elements to collection (clipboard) + Module1.Current.ClipboardGraphicsLyrSelelectedElements = new Dictionary>(Module1.Current.GraphicsLayerSelectedElements); + } + } +} diff --git a/Map-Authoring/GraphicsLayers/Clipboard/PasteGraphics.cs b/Map-Authoring/GraphicsLayers/Clipboard/PasteGraphics.cs new file mode 100644 index 00000000..75d96c75 --- /dev/null +++ b/Map-Authoring/GraphicsLayers/Clipboard/PasteGraphics.cs @@ -0,0 +1,68 @@ +/* + + Copyright 2020 Esri + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + + See the License for the specific language governing permissions and + limitations under the License. + +*/ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using ArcGIS.Core.CIM; +using ArcGIS.Core.Data; +using ArcGIS.Core.Geometry; +using ArcGIS.Desktop.Catalog; +using ArcGIS.Desktop.Core; +using ArcGIS.Desktop.Editing; +using ArcGIS.Desktop.Extensions; +using ArcGIS.Desktop.Framework; +using ArcGIS.Desktop.Framework.Contracts; +using ArcGIS.Desktop.Framework.Dialogs; +using ArcGIS.Desktop.Framework.Threading.Tasks; +using ArcGIS.Desktop.Layouts; +using ArcGIS.Desktop.Mapping; +using GraphicsLayers.Helpers; + +namespace GraphicsLayers.Clipboard +{ + internal class PasteGraphics : Button + { + protected override void OnClick() + { + if (Module1.Current.SelectedGraphicsLayerTOC == null) + { + MessageBox.Show("Select a graphics layer in the TOC", "No graphics layer selected", + System.Windows.MessageBoxButton.OK, System.Windows.MessageBoxImage.Exclamation); + return; + } + if (Module1.Current.ClipboardGraphicsLyrSelelectedElements == null) + { + MessageBox.Show("No graphic elements to paste", "Unable to paste", + System.Windows.MessageBoxButton.OK, System.Windows.MessageBoxImage.Exclamation); + return; + } + QueuedTask.Run( () => { + foreach (var kvp in Module1.Current.ClipboardGraphicsLyrSelelectedElements) + { + var selElements = kvp.Value; + if (selElements.Count == 0) continue; + var gl = kvp.Key; + Module1.Current.SelectedGraphicsLayerTOC.CustomCopyElements(selElements); + } + }); + } + } +} diff --git a/Map-Authoring/GraphicsLayers/Clipboard/PasteIntoGroup.cs b/Map-Authoring/GraphicsLayers/Clipboard/PasteIntoGroup.cs new file mode 100644 index 00000000..2297f353 --- /dev/null +++ b/Map-Authoring/GraphicsLayers/Clipboard/PasteIntoGroup.cs @@ -0,0 +1,78 @@ +/* + + Copyright 2020 Esri + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + + See the License for the specific language governing permissions and + limitations under the License. + +*/ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using ArcGIS.Core.CIM; +using ArcGIS.Core.Data; +using ArcGIS.Core.Geometry; +using ArcGIS.Desktop.Catalog; +using ArcGIS.Desktop.Core; +using ArcGIS.Desktop.Editing; +using ArcGIS.Desktop.Extensions; +using ArcGIS.Desktop.Framework; +using ArcGIS.Desktop.Framework.Contracts; +using ArcGIS.Desktop.Framework.Dialogs; +using ArcGIS.Desktop.Framework.Threading.Tasks; +using ArcGIS.Desktop.Layouts; +using ArcGIS.Desktop.Mapping; + +namespace GraphicsLayers.Clipboard +{ + internal class PasteIntoGroup : MapTool + { + public PasteIntoGroup() + { + IsSketchTool = true; + SketchType = SketchGeometryType.Point; + SketchOutputMode = SketchOutputMode.Map; + } + + protected override Task OnToolActivateAsync(bool active) + { + return base.OnToolActivateAsync(active); + } + + protected override Task OnSketchCompleteAsync(Geometry geometry) + { + return QueuedTask.Run(() => + { + var selPoint = geometry as MapPoint; + var elems = MapView.Active.SelectElements(selPoint, SelectionCombinationMethod.New); + if (elems.Count > 1) + return true; + //Get the first elements (there should only be one now) + var element = elems.FirstOrDefault(); + //Check if it is a Group Element + if (element is GroupElement) + { + //Copy Clipboard into group element + foreach (var kvp in Module1.Current.ClipboardGraphicsLyrSelelectedElements) + { + kvp.Key.CopyElements(element as GroupElement, kvp.Value); + } + //Select the group element + } + return true; + }); + } + } +} diff --git a/Map-Authoring/GraphicsLayers/CommandFilterOrder.cs b/Map-Authoring/GraphicsLayers/CommandFilterOrder.cs new file mode 100644 index 00000000..d99d919f --- /dev/null +++ b/Map-Authoring/GraphicsLayers/CommandFilterOrder.cs @@ -0,0 +1,120 @@ +/* + + Copyright 2020 Esri + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + + See the License for the specific language governing permissions and + limitations under the License. + +*/ +using ArcGIS.Desktop.Framework; +using ArcGIS.Desktop.Framework.Contracts; +using ArcGIS.Desktop.Mapping; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace GraphicsLayers +{ + class CommandFilterOrder : CustomizationFilter + { + public CommandFilterOrder() + { + Register(); + } + /// + /// Implement your custom filtering logic here. OnCommandExecute is called every time + /// a command is clicked on the UI. + /// + /// + /// + protected override bool OnCommandToExecute(string ID) + { + if (ID == "esri_layouts_sendBackward") + { + //Send to back was clicked. So selected elements can all go front + Module1.SetState("can_bring_forward_state", true); + //calculate if elements can backwards after button click (ZOrder change) + Module1.SetState("can_send_backward_state", ZOrderCheck(ID)); + } + if (ID == "esri_layouts_bringForward") + { + //Bring fwd was clicked. So selected elements can all go backwards. + Module1.SetState("can_send_backward_state", true); + //calculate if elements can forward after button click (ZOrder change) + Module1.SetState("can_bring_forward_state", ZOrderCheck(ID)); + } + if (ID == "GraphicsLayerExamples_Clipboard_CopyGraphics") + Module1.SetState("can_paste_graphics_state", true); + return true; + } + + /// + /// Register for command filtering. Customization filters must be registered before they are + /// called. + /// + public void Register() + { + FrameworkApplication.RegisterCustomizationFilter(this); + + } + /// + /// Unregister for command filtering + /// + public void UnRegister() + { + FrameworkApplication.UnregisterCustomizationFilter(this); + } + + /// + /// Implements IDisposable + /// + public void Dispose() + { + UnRegister(); + } + + internal static bool ZOrderCheck(string buttonId) + { + ///////////////////////////////////////////////////////////////////// + //command filter triggered (Pro's back or forward button was clicked.) + // State for our button needs to be calculated based on this + // Calculate the ZOrder of the elements after Pro's button is clicked. + + int zorderCheck; + var h = Module1.Current.GLWithElements.FirstOrDefault().Key; + + int elementCount = Module1.Current.GLWithElements.FirstOrDefault().Key.GetElements().Count; + var selectedElements = Module1.Current.GLWithElements.FirstOrDefault().Value; + //User has clicked the Pro Send To back button. + //if current Zorder is 1, it changes to 0 after button click. + //Any element with a current zorder of 1 should disable "our" send to back button. + // zorderCheck = 1 Check all the selected elements in this case for zorder value of 1. + //User has clicked Pro's Bring Forward button. + //If current Zorder of button is (Selected Elements count - 1) + //Our Bring Forward button should disable + //zorderCheck = elementCount - 1 + zorderCheck = buttonId == "esri_layouts_sendBackward" ? 1 : elementCount - 2; + //Check if any of the current elements have this zorder. + //Exit if they do + foreach (var el in selectedElements) + { + var zorder = el.GetZOrder(); + if (zorder == zorderCheck) + return false; + } + return true; + } + } +} diff --git a/Map-Authoring/GraphicsLayers/Config.daml b/Map-Authoring/GraphicsLayers/Config.daml new file mode 100644 index 00000000..589ff261 --- /dev/null +++ b/Map-Authoring/GraphicsLayers/Config.daml @@ -0,0 +1,218 @@ + + + + + GraphicsLayers + GraphicsLayers description + Images\AddinDesktop32.png + ArcGIS Pro SDK Team, arcgisprosdk@esri.com + esri, http://www.esri.com + 3/31/2020 1:52:42 PM, 2020 + Map Authoring + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Select graphic elements within rectangle + + + Select graphic elements within lasso + + + Select text graphic elements within rectangle + + + Select graphics to group + + + + + + + + + + + Select the graphics to align left + + + Select the graphics to align top + + + + + Select a Group element to copy graphic elements in the clipboard into. + + + + + Collection of tools to create graphic elements + + + + + + + + + + diff --git a/Map-Authoring/LabelLineFeatures/LabelLineFeatures (C#).md b/Map-Authoring/LabelLineFeatures/LabelLineFeatures (C#).md index 27bcf260..4de8df15 100644 --- a/Map-Authoring/LabelLineFeatures/LabelLineFeatures (C#).md +++ b/Map-Authoring/LabelLineFeatures/LabelLineFeatures (C#).md @@ -13,7 +13,7 @@ Language: C# Subject: Map Authoring Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2019 .NET Target Framework: 4.8 diff --git a/Map-Authoring/LabelLineFeatures/ReadMe.md b/Map-Authoring/LabelLineFeatures/ReadMe.md index 27bcf260..4de8df15 100644 --- a/Map-Authoring/LabelLineFeatures/ReadMe.md +++ b/Map-Authoring/LabelLineFeatures/ReadMe.md @@ -13,7 +13,7 @@ Language: C# Subject: Map Authoring Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2019 .NET Target Framework: 4.8 diff --git a/Map-Authoring/LayersPane/Config.daml b/Map-Authoring/LayersPane/Config.daml index 38029220..48a70703 100644 --- a/Map-Authoring/LayersPane/Config.daml +++ b/Map-Authoring/LayersPane/Config.daml @@ -1,4 +1,4 @@ - + - PlaceText diff --git a/Map-Authoring/PlaceText/PlaceText (C#).md b/Map-Authoring/PlaceText/PlaceText (C#).md index 6e4944af..7b8dbf91 100644 --- a/Map-Authoring/PlaceText/PlaceText (C#).md +++ b/Map-Authoring/PlaceText/PlaceText (C#).md @@ -13,7 +13,7 @@ Language: C# Subject: Map Authoring Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Map-Authoring/PlaceText/ReadMe.md b/Map-Authoring/PlaceText/ReadMe.md index 6e4944af..7b8dbf91 100644 --- a/Map-Authoring/PlaceText/ReadMe.md +++ b/Map-Authoring/PlaceText/ReadMe.md @@ -13,7 +13,7 @@ Language: C# Subject: Map Authoring Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Map-Authoring/ProceduralSymbolLayersWithRulePackages/Config.daml b/Map-Authoring/ProceduralSymbolLayersWithRulePackages/Config.daml index 02740093..b102ab67 100644 --- a/Map-Authoring/ProceduralSymbolLayersWithRulePackages/Config.daml +++ b/Map-Authoring/ProceduralSymbolLayersWithRulePackages/Config.daml @@ -1,4 +1,4 @@ - + - - diff --git a/Map-Authoring/Renderer/Module1.cs b/Map-Authoring/Renderer/Module1.cs index ae03847a..a7c9a093 100644 --- a/Map-Authoring/Renderer/Module1.cs +++ b/Map-Authoring/Renderer/Module1.cs @@ -37,12 +37,15 @@ namespace Renderer /// * Unclassed color gradient to define quantities /// * Proportional Renderer /// * Heat map renderer + /// * Chart renderer /// /// + /// 1. Download the Community Sample data (see under the 'Resources' section for downloading sample data). The sample data contains a folder called 'C:\Data\Renderers' with sample data required for this solution. Make sure that the Sample data is unzipped in c:\data and "C:\Data\Renderers" is available. /// 1. In Visual Studio click the Build menu. Then select Build Solution. /// 1. Click Start button to open ArcGIS Pro. /// 1. ArcGIS Pro will open. - /// 1. Open any project file that contains points, polygon and line feature layers. + /// 1. Create a new blank Map project. + /// 1. Add the C:\Data\Renderers\USDemographics.lpkx layer file to the map. /// 1. In Add-in tab, click the "Apply Renderer" button. /// 1. The first point feature layer in your project's TOC will be rendered with an "Unique Value Renderer". /// To experiment with the various renderers available with this sample, follow the steps below: @@ -64,7 +67,7 @@ namespace Renderer /// 1. Open any project and test the Apply Renderer button again. /// ![UI](screenshots/Renderers.png) /// #### Attribute Driven Symbology - /// 1. Create a new Local Scene. Add the c:\Data\FlightPathPoints.lyrx layer file to the scene. This layer draws a point geometry rendered with a helicopter symbol. The data for this layer holds the Tilt angles (X, Y and Z) for the helicopter. + /// 1. Create a new Local Scene. Add the C:\Data\Renderers\FlightPathPoints.lyrx layer file to the scene. This layer draws a point geometry rendered with a helicopter symbol. The data for this layer holds the Tilt angles (X, Y and Z) for the helicopter. /// 1. Use the Navigate button to tilt the view so that you can see the helicopter to display it over the map. /// ![Tilt](screenshots/tilt.png) /// 1. Click the AttributeDriverSymbology button on the Add-In tab. diff --git a/Map-Authoring/Renderer/ProportionalRenderers.cs b/Map-Authoring/Renderer/ProportionalRenderers.cs index 74cb1e00..2d45ecad 100644 --- a/Map-Authoring/Renderer/ProportionalRenderers.cs +++ b/Map-Authoring/Renderer/ProportionalRenderers.cs @@ -39,7 +39,7 @@ internal static class ProportionalRenderers /// /// /// - internal static Task ProportionalRenderer(FeatureLayer featureLayer) + internal static Task ProportionalRendererAsync(FeatureLayer featureLayer) { return QueuedTask.Run(() => { @@ -59,6 +59,7 @@ internal static Task ProportionalRenderer(FeatureLayer featureLayer) featureLayer.SetRenderer(propRndr); }); } + #endregion } } diff --git a/Map-Authoring/Renderer/ReadMe.md b/Map-Authoring/Renderer/ReadMe.md index bf1c18a3..5fe5cc62 100644 --- a/Map-Authoring/Renderer/ReadMe.md +++ b/Map-Authoring/Renderer/ReadMe.md @@ -10,6 +10,7 @@ This sample renders feature layers with various types of renderers. There are ex * Unclassed color gradient to define quantities * Proportional Renderer * Heat map renderer + * Chart renderer @@ -21,7 +22,7 @@ Language: C# Subject: Map Authoring Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 @@ -44,10 +45,12 @@ Visual Studio: 2017, 2019 ## How to use the sample +1. Download the Community Sample data (see under the 'Resources' section for downloading sample data). The sample data contains a folder called 'C:\Data\Renderers' with sample data required for this solution. Make sure that the Sample data is unzipped in c:\data and "C:\Data\Renderers" is available. 1. In Visual Studio click the Build menu. Then select Build Solution. 1. Click Start button to open ArcGIS Pro. 1. ArcGIS Pro will open. -1. Open any project file that contains points, polygon and line feature layers. +1. Create a new blank Map project. +1. Add the C:\Data\Renderers\USDemographics.lpkx layer file to the map. 1. In Add-in tab, click the "Apply Renderer" button. 1. The first point feature layer in your project's TOC will be rendered with an "Unique Value Renderer". To experiment with the various renderers available with this sample, follow the steps below: @@ -71,7 +74,7 @@ To experiment with the various renderers available with this sample, follow the ![UI](screenshots/Renderers.png) #### Attribute Driven Symbology -1. Create a new Local Scene. Add the c:\Data\FlightPathPoints.lyrx layer file to the scene. This layer draws a point geometry rendered with a helicopter symbol. The data for this layer holds the Tilt angles (X, Y and Z) for the helicopter. +1. Create a new Local Scene. Add the C:\Data\Renderers\FlightPathPoints.lyrx layer file to the scene. This layer draws a point geometry rendered with a helicopter symbol. The data for this layer holds the Tilt angles (X, Y and Z) for the helicopter. 1. Use the Navigate button to tilt the view so that you can see the helicopter to display it over the map. ![Tilt](screenshots/tilt.png) diff --git a/Map-Authoring/Renderer/Renderer (C#).md b/Map-Authoring/Renderer/Renderer (C#).md index bf1c18a3..5fe5cc62 100644 --- a/Map-Authoring/Renderer/Renderer (C#).md +++ b/Map-Authoring/Renderer/Renderer (C#).md @@ -10,6 +10,7 @@ This sample renders feature layers with various types of renderers. There are ex * Unclassed color gradient to define quantities * Proportional Renderer * Heat map renderer + * Chart renderer @@ -21,7 +22,7 @@ Language: C# Subject: Map Authoring Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 @@ -44,10 +45,12 @@ Visual Studio: 2017, 2019 ## How to use the sample +1. Download the Community Sample data (see under the 'Resources' section for downloading sample data). The sample data contains a folder called 'C:\Data\Renderers' with sample data required for this solution. Make sure that the Sample data is unzipped in c:\data and "C:\Data\Renderers" is available. 1. In Visual Studio click the Build menu. Then select Build Solution. 1. Click Start button to open ArcGIS Pro. 1. ArcGIS Pro will open. -1. Open any project file that contains points, polygon and line feature layers. +1. Create a new blank Map project. +1. Add the C:\Data\Renderers\USDemographics.lpkx layer file to the map. 1. In Add-in tab, click the "Apply Renderer" button. 1. The first point feature layer in your project's TOC will be rendered with an "Unique Value Renderer". To experiment with the various renderers available with this sample, follow the steps below: @@ -71,7 +74,7 @@ To experiment with the various renderers available with this sample, follow the ![UI](screenshots/Renderers.png) #### Attribute Driven Symbology -1. Create a new Local Scene. Add the c:\Data\FlightPathPoints.lyrx layer file to the scene. This layer draws a point geometry rendered with a helicopter symbol. The data for this layer holds the Tilt angles (X, Y and Z) for the helicopter. +1. Create a new Local Scene. Add the C:\Data\Renderers\FlightPathPoints.lyrx layer file to the scene. This layer draws a point geometry rendered with a helicopter symbol. The data for this layer holds the Tilt angles (X, Y and Z) for the helicopter. 1. Use the Navigate button to tilt the view so that you can see the helicopter to display it over the map. ![Tilt](screenshots/tilt.png) diff --git a/Map-Authoring/Renderer/Renderer.csproj b/Map-Authoring/Renderer/Renderer.csproj index c11be5e5..3684b452 100644 --- a/Map-Authoring/Renderer/Renderer.csproj +++ b/Map-Authoring/Renderer/Renderer.csproj @@ -97,6 +97,7 @@ + diff --git a/Map-Authoring/Renderer/Renderer.xml b/Map-Authoring/Renderer/Renderer.xml index 897ac9b8..2b5c7426 100644 --- a/Map-Authoring/Renderer/Renderer.xml +++ b/Map-Authoring/Renderer/Renderer.xml @@ -4,6 +4,34 @@ Renderer + + + Renders a feature layer using Pie chart symbols to represent data + + + ![Pie chart renderer](http://Esri.github.io/arcgis-pro-sdk/images/Renderers/pie-chart.png) + + + + + + + Renders a feature layer using Bar chart symbols to represent data + + + ![bar chart renderer](http://Esri.github.io/arcgis-pro-sdk/images/Renderers/bar-chart.png) + + + + + + Renders a feature layer using stacked bar chart symbols to represent data + + + ![stacked bar chart renderer](http://Esri.github.io/arcgis-pro-sdk/images/Renderers/stacked-bar-chart.png) + + + Renders a feature layer using graduated colors to draw quantities. @@ -13,7 +41,7 @@ - + Renders a feature layer using graduated colors to draw quantities. The outline width is varied based on attributes. ![graduatedColorOutline.png](http://Esri.github.io/arcgis-pro-sdk/images/Renderers/graduatedColorOutline.png "Graduated colors with natural breaks renderer.") @@ -69,12 +97,15 @@ * Unclassed color gradient to define quantities * Proportional Renderer * Heat map renderer + * Chart renderer + 1. Download the Community Sample data (see under the 'Resources' section for downloading sample data). The sample data contains a folder called 'C:\Data\Renderers' with sample data required for this solution. Make sure that the Sample data is unzipped in c:\data and "C:\Data\Renderers" is available. 1. In Visual Studio click the Build menu. Then select Build Solution. 1. Click Start button to open ArcGIS Pro. 1. ArcGIS Pro will open. - 1. Open any project file that contains points, polygon and line feature layers. + 1. Create a new blank Map project. + 1. Add the C:\Data\Renderers\USDemographics.lpkx layer file to the map. 1. In Add-in tab, click the "Apply Renderer" button. 1. The first point feature layer in your project's TOC will be rendered with an "Unique Value Renderer". To experiment with the various renderers available with this sample, follow the steps below: @@ -96,7 +127,7 @@ 1. Open any project and test the Apply Renderer button again. ![UI](screenshots/Renderers.png) #### Attribute Driven Symbology - 1. Create a new Local Scene. Add the c:\Data\FlightPathPoints.lyrx layer file to the scene. This layer draws a point geometry rendered with a helicopter symbol. The data for this layer holds the Tilt angles (X, Y and Z) for the helicopter. + 1. Create a new Local Scene. Add the C:\Data\Renderers\FlightPathPoints.lyrx layer file to the scene. This layer draws a point geometry rendered with a helicopter symbol. The data for this layer holds the Tilt angles (X, Y and Z) for the helicopter. 1. Use the Navigate button to tilt the view so that you can see the helicopter to display it over the map. ![Tilt](screenshots/tilt.png) 1. Click the AttributeDriverSymbology button on the Add-In tab. @@ -115,7 +146,7 @@ False to prevent Pro from closing, otherwise True - + Renders a feature layer using proportional symbols to draw quantities. ![Proportional Symbols renderer](http://Esri.github.io/arcgis-pro-sdk/images/Renderers/proportional-renderer.png) @@ -157,7 +188,7 @@ - + Renders a feature layer using unique values from one or multiple fields diff --git a/Map-Authoring/Renderer/UniqueValueRenderers.cs b/Map-Authoring/Renderer/UniqueValueRenderers.cs index 269bd612..cee2493a 100644 --- a/Map-Authoring/Renderer/UniqueValueRenderers.cs +++ b/Map-Authoring/Renderer/UniqueValueRenderers.cs @@ -42,7 +42,7 @@ internal static class UniqueValueRenderers /// /// ![Unique Value renderer](http://Esri.github.io/arcgis-pro-sdk/images/Renderers/unique-value.png) /// - internal static Task UniqueValueRenderer(FeatureLayer featureLayer) + internal static Task UniqueValueRendererAsync(FeatureLayer featureLayer) { return QueuedTask.Run(() => { diff --git a/Map-Authoring/Renderer/screenshots/bar-chart.png b/Map-Authoring/Renderer/screenshots/bar-chart.png new file mode 100644 index 00000000..a0510396 Binary files /dev/null and b/Map-Authoring/Renderer/screenshots/bar-chart.png differ diff --git a/Map-Authoring/Renderer/screenshots/pie-chart.png b/Map-Authoring/Renderer/screenshots/pie-chart.png new file mode 100644 index 00000000..d742d82b Binary files /dev/null and b/Map-Authoring/Renderer/screenshots/pie-chart.png differ diff --git a/Map-Authoring/Renderer/screenshots/stacked-bar-chart.png b/Map-Authoring/Renderer/screenshots/stacked-bar-chart.png new file mode 100644 index 00000000..4d5bf7f4 Binary files /dev/null and b/Map-Authoring/Renderer/screenshots/stacked-bar-chart.png differ diff --git a/Map-Authoring/SymbolLookup/Config.daml b/Map-Authoring/SymbolLookup/Config.daml index 7f6a2ba8..6f059dd3 100644 --- a/Map-Authoring/SymbolLookup/Config.daml +++ b/Map-Authoring/SymbolLookup/Config.daml @@ -1,4 +1,4 @@ - + + diff --git a/Map-Authoring/TextSymbols/ReadMe.md b/Map-Authoring/TextSymbols/ReadMe.md index 25353a8c..b1156a28 100644 --- a/Map-Authoring/TextSymbols/ReadMe.md +++ b/Map-Authoring/TextSymbols/ReadMe.md @@ -16,7 +16,7 @@ Language: C# Subject: Map Authoring Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Map-Authoring/TextSymbols/TextSymbols (C#).md b/Map-Authoring/TextSymbols/TextSymbols (C#).md index 25353a8c..b1156a28 100644 --- a/Map-Authoring/TextSymbols/TextSymbols (C#).md +++ b/Map-Authoring/TextSymbols/TextSymbols (C#).md @@ -16,7 +16,7 @@ Language: C# Subject: Map Authoring Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Map-Authoring/WorkingWithRasterLayers/Config.daml b/Map-Authoring/WorkingWithRasterLayers/Config.daml index 27bb802e..2825ea95 100644 --- a/Map-Authoring/WorkingWithRasterLayers/Config.daml +++ b/Map-Authoring/WorkingWithRasterLayers/Config.daml @@ -1,4 +1,4 @@ - + - - - - - @@ -59,42 +54,32 @@ an empty group--> - - - - - - - + + + + + + - - Tooltip text diff --git a/Map-Exploration/AnimationFromPath/ReadMe.md b/Map-Exploration/AnimationFromPath/ReadMe.md index e7b312f6..7c92cb2b 100644 --- a/Map-Exploration/AnimationFromPath/ReadMe.md +++ b/Map-Exploration/AnimationFromPath/ReadMe.md @@ -19,7 +19,7 @@ Language: C# Subject: Map Exploration Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Map-Exploration/AnimationTools/AnimationTools (C#).md b/Map-Exploration/AnimationTools/AnimationTools (C#).md index 0c828f3d..65a144a9 100644 --- a/Map-Exploration/AnimationTools/AnimationTools (C#).md +++ b/Map-Exploration/AnimationTools/AnimationTools (C#).md @@ -13,7 +13,7 @@ Language: C# Subject: Map Exploration Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Map-Exploration/AnimationTools/Config.daml b/Map-Exploration/AnimationTools/Config.daml index 6daeac37..b075984b 100644 --- a/Map-Exploration/AnimationTools/Config.daml +++ b/Map-Exploration/AnimationTools/Config.daml @@ -1,4 +1,4 @@ - + - Enter the speed of the vehicle in Miles-Per-Hour which you would like the vehicle to simulate traveling in your animation. - + Enter the speed of the vehicle in Miles-Per-Hour which you would like the vehicle to simulate traveling in your animation. - Choose the vehicle you wish to track when building your animation. NOTE: This assumes you have previously built the route for this vehicle. - + Choose the vehicle you wish to track when building your animation. NOTE: This assumes you have previously built the route for this vehicle. diff --git a/Map-Exploration/AnimationTools/ReadMe.md b/Map-Exploration/AnimationTools/ReadMe.md index 0c828f3d..65a144a9 100644 --- a/Map-Exploration/AnimationTools/ReadMe.md +++ b/Map-Exploration/AnimationTools/ReadMe.md @@ -13,7 +13,7 @@ Language: C# Subject: Map Exploration Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Map-Exploration/BasicMapTool/BasicMapTool (C#).md b/Map-Exploration/BasicMapTool/BasicMapTool (C#).md index 54dfd295..7bc83794 100644 --- a/Map-Exploration/BasicMapTool/BasicMapTool (C#).md +++ b/Map-Exploration/BasicMapTool/BasicMapTool (C#).md @@ -13,7 +13,7 @@ Language: C# Subject: Map Exploration Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Map-Exploration/BasicMapTool/Config.daml b/Map-Exploration/BasicMapTool/Config.daml index 15e5efc3..04d2d700 100644 --- a/Map-Exploration/BasicMapTool/Config.daml +++ b/Map-Exploration/BasicMapTool/Config.daml @@ -1,4 +1,4 @@ - + - Navigating camera with ArcGIS Pro Navigating camera with ArcGIS Pro Images\AddinDesktop32.png - ArcGIS Pro SDK Team, arcgisprosdk@esri.com + ArcGIS Pro SDK Team, arcgisprosdk@esri.com esri, http://www.esri.com 11/13/2014 Map-Exploration diff --git a/Map-Exploration/CameraNavigation/ReadMe.md b/Map-Exploration/CameraNavigation/ReadMe.md index 8eb83a34..6aea1bf3 100644 --- a/Map-Exploration/CameraNavigation/ReadMe.md +++ b/Map-Exploration/CameraNavigation/ReadMe.md @@ -13,7 +13,7 @@ Language: C# Subject: Map-Exploration Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Map-Exploration/CustomAnimation/Config.daml b/Map-Exploration/CustomAnimation/Config.daml index cb24f666..6921c192 100644 --- a/Map-Exploration/CustomAnimation/Config.daml +++ b/Map-Exploration/CustomAnimation/Config.daml @@ -1,4 +1,4 @@ - + - CustomPaneWithContents @@ -48,8 +47,7 @@ - diff --git a/Map-Exploration/CustomPaneWithContents/CustomPaneWithContents (C#).md b/Map-Exploration/CustomPaneWithContents/CustomPaneWithContents (C#).md index c8a81fbe..0bb7e08a 100644 --- a/Map-Exploration/CustomPaneWithContents/CustomPaneWithContents (C#).md +++ b/Map-Exploration/CustomPaneWithContents/CustomPaneWithContents (C#).md @@ -13,7 +13,7 @@ Language: C# Subject: Map-Exploration Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Map-Exploration/CustomPaneWithContents/ReadMe.md b/Map-Exploration/CustomPaneWithContents/ReadMe.md index c8a81fbe..0bb7e08a 100644 --- a/Map-Exploration/CustomPaneWithContents/ReadMe.md +++ b/Map-Exploration/CustomPaneWithContents/ReadMe.md @@ -13,7 +13,7 @@ Language: C# Subject: Map-Exploration Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Map-Exploration/CustomPopup/Config.daml b/Map-Exploration/CustomPopup/Config.daml index 5691ec5f..defacd92 100644 --- a/Map-Exploration/CustomPopup/Config.daml +++ b/Map-Exploration/CustomPopup/Config.daml @@ -1,4 +1,4 @@ - + - LayerPopups @@ -25,7 +24,7 @@ defines a set of 'helper' classes modelled after the similar pattern ArcGIS.Desktop.Mapping implements for Renderer definitions. Popups can be defined that incorporate text, field values, images, charts, etc. Images\AddinDesktop32.png - ArcGIS Pro SDK Team, arcgisprosdk@esri.com + ArcGIS Pro SDK Team, arcgisprosdk@esri.com esri, http://www.esri.com 3/29/2016 2:42:36 PM, 2016 Map Exploration @@ -58,7 +57,7 @@ - diff --git a/Map-Exploration/LayerPopups/LayerPopups (C#).md b/Map-Exploration/LayerPopups/LayerPopups (C#).md index 636866ee..f29c381b 100644 --- a/Map-Exploration/LayerPopups/LayerPopups (C#).md +++ b/Map-Exploration/LayerPopups/LayerPopups (C#).md @@ -13,7 +13,7 @@ Language: C# Subject: Map Exploration Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Map-Exploration/LayerPopups/ReadMe.md b/Map-Exploration/LayerPopups/ReadMe.md index 636866ee..f29c381b 100644 --- a/Map-Exploration/LayerPopups/ReadMe.md +++ b/Map-Exploration/LayerPopups/ReadMe.md @@ -13,7 +13,7 @@ Language: C# Subject: Map Exploration Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Map-Exploration/MagnifierWindow/Config.daml b/Map-Exploration/MagnifierWindow/Config.daml index a0042dbb..109532dd 100644 --- a/Map-Exploration/MagnifierWindow/Config.daml +++ b/Map-Exploration/MagnifierWindow/Config.daml @@ -1,4 +1,4 @@ - + - + - Identify features on the current map using a circular sketch. - + Identify features on the current map using a circular sketch. diff --git a/Map-Exploration/MapToolIdentify/MapToolIdentify (C#).md b/Map-Exploration/MapToolIdentify/MapToolIdentify (C#).md index 98791aa4..b9cfd06c 100644 --- a/Map-Exploration/MapToolIdentify/MapToolIdentify (C#).md +++ b/Map-Exploration/MapToolIdentify/MapToolIdentify (C#).md @@ -13,7 +13,7 @@ Language: C# Subject: Map-Exploration Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Map-Exploration/MapToolIdentify/ReadMe.md b/Map-Exploration/MapToolIdentify/ReadMe.md index 98791aa4..b9cfd06c 100644 --- a/Map-Exploration/MapToolIdentify/ReadMe.md +++ b/Map-Exploration/MapToolIdentify/ReadMe.md @@ -13,7 +13,7 @@ Language: C# Subject: Map-Exploration Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Map-Exploration/MapToolIdentifyWithDockpane/Config.daml b/Map-Exploration/MapToolIdentifyWithDockpane/Config.daml index 9af0aafd..878446fe 100644 --- a/Map-Exploration/MapToolIdentifyWithDockpane/Config.daml +++ b/Map-Exploration/MapToolIdentifyWithDockpane/Config.daml @@ -1,4 +1,4 @@ - + - + - Select features on the current map using a rectangular sketch. - + Select features on the current map using a rectangular sketch. diff --git a/Map-Exploration/MapToolSelect/MapToolSelect (C#).md b/Map-Exploration/MapToolSelect/MapToolSelect (C#).md index b767b845..595b029e 100644 --- a/Map-Exploration/MapToolSelect/MapToolSelect (C#).md +++ b/Map-Exploration/MapToolSelect/MapToolSelect (C#).md @@ -13,7 +13,7 @@ Language: C# Subject: Map-Exploration Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Map-Exploration/MapToolSelect/ReadMe.md b/Map-Exploration/MapToolSelect/ReadMe.md index b767b845..595b029e 100644 --- a/Map-Exploration/MapToolSelect/ReadMe.md +++ b/Map-Exploration/MapToolSelect/ReadMe.md @@ -13,7 +13,7 @@ Language: C# Subject: Map-Exploration Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Map-Exploration/MapToolWithCustomPopup/Config.daml b/Map-Exploration/MapToolWithCustomPopup/Config.daml index 1515d2b1..b8010b0e 100644 --- a/Map-Exploration/MapToolWithCustomPopup/Config.daml +++ b/Map-Exploration/MapToolWithCustomPopup/Config.daml @@ -1,4 +1,4 @@ - + - + - + Shows a custom pop-up for features in the map. @@ -54,7 +51,7 @@ - + diff --git a/Map-Exploration/MapToolWithCustomPopup/MapToolWithCustomPopup (C#).md b/Map-Exploration/MapToolWithCustomPopup/MapToolWithCustomPopup (C#).md index 70bfeee4..71e215b4 100644 --- a/Map-Exploration/MapToolWithCustomPopup/MapToolWithCustomPopup (C#).md +++ b/Map-Exploration/MapToolWithCustomPopup/MapToolWithCustomPopup (C#).md @@ -15,7 +15,7 @@ Language: C# Subject: Map-Exploration Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Map-Exploration/MapToolWithCustomPopup/ReadMe.md b/Map-Exploration/MapToolWithCustomPopup/ReadMe.md index 70bfeee4..71e215b4 100644 --- a/Map-Exploration/MapToolWithCustomPopup/ReadMe.md +++ b/Map-Exploration/MapToolWithCustomPopup/ReadMe.md @@ -15,7 +15,7 @@ Language: C# Subject: Map-Exploration Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Map-Exploration/MapToolWithDynamicMenu/Config.daml b/Map-Exploration/MapToolWithDynamicMenu/Config.daml index 5b117990..c0a7a3b5 100644 --- a/Map-Exploration/MapToolWithDynamicMenu/Config.daml +++ b/Map-Exploration/MapToolWithDynamicMenu/Config.daml @@ -1,4 +1,4 @@ - + - + Click on overlapping point features on this map to pop-up a feature selection menu. diff --git a/Map-Exploration/MapToolWithDynamicMenu/MapToolWithDynamicMenu (C#).md b/Map-Exploration/MapToolWithDynamicMenu/MapToolWithDynamicMenu (C#).md index 8ad7e7aa..f8bcb9e1 100644 --- a/Map-Exploration/MapToolWithDynamicMenu/MapToolWithDynamicMenu (C#).md +++ b/Map-Exploration/MapToolWithDynamicMenu/MapToolWithDynamicMenu (C#).md @@ -14,7 +14,7 @@ Language: C# Subject: Framework Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Map-Exploration/MapToolWithDynamicMenu/ReadMe.md b/Map-Exploration/MapToolWithDynamicMenu/ReadMe.md index 8ad7e7aa..f8bcb9e1 100644 --- a/Map-Exploration/MapToolWithDynamicMenu/ReadMe.md +++ b/Map-Exploration/MapToolWithDynamicMenu/ReadMe.md @@ -14,7 +14,7 @@ Language: C# Subject: Framework Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Map-Exploration/MapToolWithOverlayControl/Config.daml b/Map-Exploration/MapToolWithOverlayControl/Config.daml index a6385862..545e35f6 100644 --- a/Map-Exploration/MapToolWithOverlayControl/Config.daml +++ b/Map-Exploration/MapToolWithOverlayControl/Config.daml @@ -1,4 +1,4 @@ - + - Map Tool With Overlay Adds custom map tool for ArcGIS Pro. Images\AddinDesktop32.png - ArcGIS Pro SDK Team, arcgisprosdk@esri.com + ArcGIS Pro SDK Team, arcgisprosdk@esri.com esri, http://www.esri.com 6/29/2015 11:45:54 AM, 2015 Map Exploration - @@ -32,7 +30,6 @@ - @@ -41,10 +38,7 @@ - + Tool shows Coordinates of clicked location. diff --git a/Map-Exploration/MapToolWithOverlayControl/MapToolWithOverlayControl (C#).md b/Map-Exploration/MapToolWithOverlayControl/MapToolWithOverlayControl (C#).md index 8c01bdfb..8e041f38 100644 --- a/Map-Exploration/MapToolWithOverlayControl/MapToolWithOverlayControl (C#).md +++ b/Map-Exploration/MapToolWithOverlayControl/MapToolWithOverlayControl (C#).md @@ -13,7 +13,7 @@ Language: C# Subject: Map Exploration Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Map-Exploration/MapToolWithOverlayControl/ReadMe.md b/Map-Exploration/MapToolWithOverlayControl/ReadMe.md index 8c01bdfb..8e041f38 100644 --- a/Map-Exploration/MapToolWithOverlayControl/ReadMe.md +++ b/Map-Exploration/MapToolWithOverlayControl/ReadMe.md @@ -13,7 +13,7 @@ Language: C# Subject: Map Exploration Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Map-Exploration/MapToolZoom/Config.daml b/Map-Exploration/MapToolZoom/Config.daml index 4c4beb1c..24f7878e 100644 --- a/Map-Exploration/MapToolZoom/Config.daml +++ b/Map-Exploration/MapToolZoom/Config.daml @@ -1,4 +1,4 @@ - + - diff --git a/Map-Exploration/Overlay3D/Overlay3D (C#).md b/Map-Exploration/Overlay3D/Overlay3D (C#).md index 11f258c3..51d49611 100644 --- a/Map-Exploration/Overlay3D/Overlay3D (C#).md +++ b/Map-Exploration/Overlay3D/Overlay3D (C#).md @@ -13,7 +13,7 @@ Language: C# Subject: Map Exploration Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Map-Exploration/Overlay3D/ReadMe.md b/Map-Exploration/Overlay3D/ReadMe.md index 11f258c3..51d49611 100644 --- a/Map-Exploration/Overlay3D/ReadMe.md +++ b/Map-Exploration/Overlay3D/ReadMe.md @@ -13,7 +13,7 @@ Language: C# Subject: Map Exploration Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Map-Exploration/OverlayExamples/Config.daml b/Map-Exploration/OverlayExamples/Config.daml index eeef44d8..8feb41d6 100644 --- a/Map-Exploration/OverlayExamples/Config.daml +++ b/Map-Exploration/OverlayExamples/Config.daml @@ -1,4 +1,4 @@ - + - GraphicOverlay Examples This sample contains three different examples of working with Pro's graphic overlay Images\AddinDesktop32.png - ArcGIS Pro SDK Team, arcgisprosdk@esri.com + ArcGIS Pro SDK Team, arcgisprosdk@esri.com esri, http://www.esri.com 4/20/2016 5:52:03 PM, 2016 Map Exploration @@ -41,7 +40,7 @@ - + diff --git a/Map-Exploration/OverlayExamples/OverlayExamples (C#).md b/Map-Exploration/OverlayExamples/OverlayExamples (C#).md index f7ecffe9..c0883f28 100644 --- a/Map-Exploration/OverlayExamples/OverlayExamples (C#).md +++ b/Map-Exploration/OverlayExamples/OverlayExamples (C#).md @@ -13,7 +13,7 @@ Language: C# Subject: Map Exploration Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Map-Exploration/OverlayExamples/ReadMe.md b/Map-Exploration/OverlayExamples/ReadMe.md index f7ecffe9..c0883f28 100644 --- a/Map-Exploration/OverlayExamples/ReadMe.md +++ b/Map-Exploration/OverlayExamples/ReadMe.md @@ -13,7 +13,7 @@ Language: C# Subject: Map Exploration Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Map-Exploration/OverlayGroundSurface/BadPolygon.json b/Map-Exploration/OverlayGroundSurface/BadPolygon.json new file mode 100644 index 00000000..2ec48168 --- /dev/null +++ b/Map-Exploration/OverlayGroundSurface/BadPolygon.json @@ -0,0 +1 @@ +{"geometries":[{"hasZ":true,"rings":[[[-159.55595799048749,21.999519824851124,1590.7945306224442],[-159.56080616299997,21.999190158000033,1664.2924000000057],[-159.56686601399997,21.997242162000077,1590.7945306224442],[-159.57092914499998,21.998186181000051,856.90489999999409],[-159.57470022127973,22.019706406512579,799.14068723155958],[-159.55595799048749,22.019706406512579,1180.2814954194532],[-159.55595799048749,21.999519824851124,1590.7945306224442]]]},{"hasZ":true,"rings":[[[-159.57842223499998,22.040946649000034,799.14068723155958],[-159.56635353436621,22.042170651025081,587.99710601492393],[-159.56275453698299,22.042170651025081,596.94403823174946],[-159.55595799048749,22.041747454127833,677.50366853285209],[-159.55595799048749,22.019706406512579,743.24157449832683],[-159.57470022127973,22.019706406512579,799.14068723155958],[-159.57842223499998,22.040946649000034,799.14068723155958]]]},{"hasZ":true,"rings":[[[-159.56635353436621,22.042170651025081,587.99710601492393],[-159.56498446899997,22.042309501000034,570.51260000000184],[-159.56275453698299,22.042170651025081,596.94403823174946],[-159.56635353436621,22.042170651025081,587.99710601492393]]]},{"hasZ":true,"rings":[[[-159.53349374597499,21.999642444086049,510.5968360233486],[-159.53478824199996,21.999633932000052,510.32779999999912],[-159.55078634899996,21.999871487000064,1512.3929000000062],[-159.55595799048749,21.999519824851124,1590.7945306224442],[-159.55595799048749,22.019706406512579,1243.1014352753134],[-159.53349374597499,22.019706406512579,856.17794123488204],[-159.53349374597499,21.999642444086049,510.59683602334871]]]},{"hasZ":true,"rings":[[[-159.55595799048749,22.041747454127833,677.50366853285209],[-159.55191197399998,22.041495523000037,725.46120000000519],[-159.548711659036,22.042170651025081,677.92127156691072],[-159.53349374597499,22.042170651025081,677.84394775786905],[-159.53349374597499,22.019706406512579,677.72980458028712],[-159.55595799048749,22.019706406512579,677.61566140270531],[-159.55595799048749,22.041747454127833,677.50366853285209]]]},{"hasZ":true,"rings":[[[-159.548711659036,22.042170651025081,677.92127156691072],[-159.53880165599998,22.044261233000043,530.71050000000105],[-159.53349374597499,22.043465670590621,641.42667277243936],[-159.53349374597499,22.042170651025081,644.28874582416154],[-159.548711659036,22.042170651025081,677.92127156691072]]]},{"hasZ":true,"rings":[[[-159.5110295014625,22.000236164782805,648.14441117885576],[-159.51831810599998,21.999742233000063,513.75079999999434],[-159.53349374597499,21.999642444086049,510.5968360233486],[-159.53349374597499,22.019706406512579,555.11003657975891],[-159.5110295014625,22.019706406512579,604.9484184544458],[-159.5110295014625,22.000236164782805,648.14441117885576]]]},{"hasZ":true,"rings":[[[-159.53349374597499,22.019706406512579,510.32779999999912],[-159.53349374597499,22.042170651025081,510.32779999999912],[-159.5110295014625,22.042170651025081,510.32779999999912],[-159.5110295014625,22.019706406512579,510.32779999999912],[-159.53349374597499,22.019706406512579,510.32779999999912]]]},{"hasZ":true,"rings":[[[-159.53349374597499,22.043465670590621,641.42667277243936],[-159.52821763299997,22.042674874000056,751.47960000000603],[-159.51844938599996,22.044064484000046,1100.4130000000005],[-159.5110295014625,22.043140301282751,956.16443911775991],[-159.5110295014625,22.042170651025081,943.82319549937449],[-159.53349374597499,22.042170651025081,657.90906095568778],[-159.53349374597499,22.043465670590621,641.42667277243936]]]},{"hasZ":true,"rings":[[[-159.49482146189862,22.019706406512579,1520.3361252232808],[-159.49381720599996,22.015577347000033,1539.0911000000051],[-159.48945492999997,22.003908951000028,538.86049999999523],[-159.49037219099998,22.000948478000055,581.32490000000689],[-159.50336538699997,22.000755544000071,789.46199999999953],[-159.5110295014625,22.000236164782805,648.14441117885576],[-159.5110295014625,22.019706406512579,1124.1141858263884],[-159.49482146189862,22.019706406512579,1520.3361252232808]]]},{"hasZ":true,"rings":[[[-159.49096898034242,22.042170651025081,730.61643593538133],[-159.49430452299998,22.034105050000051,1636.5525999999954],[-159.49387090199997,22.026250786000048,1657.8617999999988],[-159.49517741099996,22.021169913000051,1513.688599999994],[-159.49482146189862,22.019706406512579,1520.3361252232808],[-159.5110295014625,22.019706406512579,1302.403269376616],[-159.5110295014625,22.042170651025081,1000.3496532219473],[-159.49096898034242,22.042170651025081,730.61643593538133]]]},{"hasZ":true,"rings":[[[-159.5110295014625,22.043140301282751,956.16443911775991],[-159.51059839599998,22.043086605000042,947.78340000000026],[-159.50069549199998,22.044980886000076,1047.2516999999934],[-159.49310138999996,22.044838445000039,697.32760000000417],[-159.49045497699998,22.043413551000071,591.01270000000659],[-159.49096898034242,22.042170651025081,730.61643593538133],[-159.5110295014625,22.042170651025081,945.76496706999728],[-159.5110295014625,22.043140301282751,956.16443911775991]]]}],"spatialReference":{"wkid":4326,"latestWkid":4326}} \ No newline at end of file diff --git a/Map-Exploration/OverlayGroundSurface/BadPolygonIsolated.json b/Map-Exploration/OverlayGroundSurface/BadPolygonIsolated.json new file mode 100644 index 00000000..81e15e63 --- /dev/null +++ b/Map-Exploration/OverlayGroundSurface/BadPolygonIsolated.json @@ -0,0 +1,22 @@ +{ + "geometries": [ + { + "hasZ": true, + "rings": [ + [ + [ -159.53349374597499, 22.043465670590621, 641.42667277243936 ], + [ -159.52821763299997, 22.042674874000056, 751.47960000000603 ], + [ -159.51844938599996, 22.044064484000046, 1100.4130000000005 ], + [ -159.5110295014625, 22.043140301282751, 956.16443911775991 ], + [ -159.5110295014625, 22.042170651025081, 943.82319549937449 ], + [ -159.53349374597499, 22.042170651025081, 657.90906095568778 ], + [ -159.53349374597499, 22.043465670590621, 641.42667277243936 ] + ] + ] + } + ], + "spatialReference": { + "wkid": 4326, + "latestWkid": 4326 + } +} \ No newline at end of file diff --git a/Map-Exploration/OverlayGroundSurface/ClearGraphics.cs b/Map-Exploration/OverlayGroundSurface/ClearGraphics.cs index 5b56c78d..87d8a9e1 100644 --- a/Map-Exploration/OverlayGroundSurface/ClearGraphics.cs +++ b/Map-Exploration/OverlayGroundSurface/ClearGraphics.cs @@ -1,4 +1,22 @@ -using System; +/* + + Copyright 2020 Esri + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + + See the License for the specific language governing permissions and + limitations under the License. + +*/ +using System; using System.Collections.Generic; using System.Linq; using System.Text; diff --git a/Map-Exploration/OverlayGroundSurface/ComboElevation.cs b/Map-Exploration/OverlayGroundSurface/ComboElevation.cs index e9f2885b..ba010631 100644 --- a/Map-Exploration/OverlayGroundSurface/ComboElevation.cs +++ b/Map-Exploration/OverlayGroundSurface/ComboElevation.cs @@ -1,4 +1,22 @@ -using System; +/* + + Copyright 2020 Esri + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + + See the License for the specific language governing permissions and + limitations under the License. + +*/ +using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.ComponentModel; diff --git a/Map-Exploration/OverlayGroundSurface/ComboResolution.cs b/Map-Exploration/OverlayGroundSurface/ComboResolution.cs index 83284475..4be95c1b 100644 --- a/Map-Exploration/OverlayGroundSurface/ComboResolution.cs +++ b/Map-Exploration/OverlayGroundSurface/ComboResolution.cs @@ -1,4 +1,22 @@ -using System; +/* + + Copyright 2020 Esri + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + + See the License for the specific language governing permissions and + limitations under the License. + +*/ +using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.ComponentModel; diff --git a/Map-Exploration/OverlayGroundSurface/Config.daml b/Map-Exploration/OverlayGroundSurface/Config.daml index 546f82b3..617f7c11 100644 --- a/Map-Exploration/OverlayGroundSurface/Config.daml +++ b/Map-Exploration/OverlayGroundSurface/Config.daml @@ -1,12 +1,25 @@ - - + + + - OverlayGroundSurface + OverlayGroundSurface OverlayGroundSurface description Images\AddinDesktop32.png ArcGIS Pro SDK Team, arcgisprosdk@esri.com @@ -17,12 +30,27 @@ Content, Framework, Editing, Geodatabase, Geometry, Geoprocessing, Layouts, Map Authoring, Map Exploration --> - + + + + + + + + + + + + + + + + @@ -43,94 +71,50 @@ + + - - - - - diff --git a/Map-Exploration/OverlayGroundSurface/CreatePolygonTool.cs b/Map-Exploration/OverlayGroundSurface/CreatePolygonTool.cs index afb1d8f2..e9e0936b 100644 --- a/Map-Exploration/OverlayGroundSurface/CreatePolygonTool.cs +++ b/Map-Exploration/OverlayGroundSurface/CreatePolygonTool.cs @@ -1,4 +1,22 @@ -using System; +/* + + Copyright 2020 Esri + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + + See the License for the specific language governing permissions and + limitations under the License. + +*/ +using System; using System.Collections.Generic; using System.Linq; using System.Text; diff --git a/Map-Exploration/OverlayGroundSurface/ExportGeometry.cs b/Map-Exploration/OverlayGroundSurface/ExportGeometry.cs new file mode 100644 index 00000000..a780410c --- /dev/null +++ b/Map-Exploration/OverlayGroundSurface/ExportGeometry.cs @@ -0,0 +1,78 @@ +/* + + Copyright 2020 Esri + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + + See the License for the specific language governing permissions and + limitations under the License. + +*/ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using ArcGIS.Core.CIM; +using ArcGIS.Core.Data; +using ArcGIS.Core.Geometry; +using ArcGIS.Desktop.Catalog; +using ArcGIS.Desktop.Core; +using ArcGIS.Desktop.Editing; +using ArcGIS.Desktop.Extensions; +using ArcGIS.Desktop.Framework; +using ArcGIS.Desktop.Framework.Contracts; +using ArcGIS.Desktop.Framework.Dialogs; +using ArcGIS.Desktop.Framework.Threading.Tasks; +using ArcGIS.Desktop.Mapping; + +namespace OverlayGroundSurface +{ + internal class ExportGeometries : Button + { + protected override void OnClick() + { + try + { + if (Module1.Geometries == null || Module1.Geometries.Count <= 0) + { + MessageBox.Show($@"You have to first render a geometry before you can export the Geometry"); + return; + } + var bpf = new BrowseProjectFilter("esri_browseDialogFilters_json_file") + { + Name = "Specify JSON file to export Geometries to" + }; + var saveItemDialog = new SaveItemDialog { BrowseFilter = bpf }; + var result = saveItemDialog.ShowDialog(); + if (result.Value == false) return; + var jsonPath = $@"{saveItemDialog.FilePath}.json"; + var folder = System.IO.Path.GetDirectoryName(jsonPath); + if (!System.IO.Directory.Exists(folder)) System.IO.Directory.CreateDirectory(folder); + var exists = System.IO.File.Exists(jsonPath); + if (exists) + { + var isYes = MessageBox.Show($@"The export will write over the existing file {jsonPath}", "Override File", System.Windows.MessageBoxButton.YesNo); + if (isYes != System.Windows.MessageBoxResult.Yes) return; + System.IO.File.Delete(jsonPath); + } + GeometryBag bag = GeometryBagBuilder.CreateGeometryBag(Module1.Geometries, + Module1.Geometries[0].SpatialReference); + System.IO.File.WriteAllText(jsonPath, bag.ToJson()); + MessageBox.Show($@"Export saved to {jsonPath}"); + } + catch (Exception ex) + { + MessageBox.Show($@"Export Exception: {ex}"); + } + } + } +} diff --git a/Map-Exploration/OverlayGroundSurface/Images/3DPolyExport16.png b/Map-Exploration/OverlayGroundSurface/Images/3DPolyExport16.png new file mode 100644 index 00000000..14bd4fc0 Binary files /dev/null and b/Map-Exploration/OverlayGroundSurface/Images/3DPolyExport16.png differ diff --git a/Map-Exploration/OverlayGroundSurface/Images/3DPolyExport32.png b/Map-Exploration/OverlayGroundSurface/Images/3DPolyExport32.png new file mode 100644 index 00000000..120c4681 Binary files /dev/null and b/Map-Exploration/OverlayGroundSurface/Images/3DPolyExport32.png differ diff --git a/Map-Exploration/OverlayGroundSurface/Images/3DPolyImport16.png b/Map-Exploration/OverlayGroundSurface/Images/3DPolyImport16.png new file mode 100644 index 00000000..d0f22170 Binary files /dev/null and b/Map-Exploration/OverlayGroundSurface/Images/3DPolyImport16.png differ diff --git a/Map-Exploration/OverlayGroundSurface/Images/3DPolyImport32.png b/Map-Exploration/OverlayGroundSurface/Images/3DPolyImport32.png new file mode 100644 index 00000000..db0e43ca Binary files /dev/null and b/Map-Exploration/OverlayGroundSurface/Images/3DPolyImport32.png differ diff --git a/Map-Exploration/OverlayGroundSurface/ImportGeometry.cs b/Map-Exploration/OverlayGroundSurface/ImportGeometry.cs new file mode 100644 index 00000000..d207a970 --- /dev/null +++ b/Map-Exploration/OverlayGroundSurface/ImportGeometry.cs @@ -0,0 +1,66 @@ +/* + + Copyright 2020 Esri + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + + See the License for the specific language governing permissions and + limitations under the License. + +*/ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using ArcGIS.Core.CIM; +using ArcGIS.Core.Data; +using ArcGIS.Core.Geometry; +using ArcGIS.Desktop.Catalog; +using ArcGIS.Desktop.Core; +using ArcGIS.Desktop.Editing; +using ArcGIS.Desktop.Extensions; +using ArcGIS.Desktop.Framework; +using ArcGIS.Desktop.Framework.Contracts; +using ArcGIS.Desktop.Framework.Dialogs; +using ArcGIS.Desktop.Framework.Threading.Tasks; +using ArcGIS.Desktop.Mapping; + +namespace OverlayGroundSurface +{ + internal class ImportGeometries : Button + { + protected override void OnClick() + { + try + { + var bpf = new BrowseProjectFilter("esri_browseDialogFilters_json_file") + { + Name = "Select JSON file containing exported Geometries" + }; + var openItemDialog = new OpenItemDialog { BrowseFilter = bpf }; + var result = openItemDialog.ShowDialog(); + if (result.Value == false || openItemDialog.Items.Count() == 0) return; + var item = openItemDialog.Items.ToArray()[0]; + var filePath = item.Path; + var json = System.IO.File.ReadAllText(filePath); + var geometryBag = GeometryBagBuilder.FromJson(json); + Module1.Geometries = geometryBag.Geometries.ToList(); + Module1.HasImportData = true; + MessageBox.Show($@"Geometries loaded: {Module1.Geometries.Count()}"); + } + catch (Exception ex) + { + MessageBox.Show($@"Import exception: {ex}"); + } + } + } +} diff --git a/Map-Exploration/OverlayGroundSurface/Module1.cs b/Map-Exploration/OverlayGroundSurface/Module1.cs index 25e91c8e..933fec4d 100644 --- a/Map-Exploration/OverlayGroundSurface/Module1.cs +++ b/Map-Exploration/OverlayGroundSurface/Module1.cs @@ -1,4 +1,22 @@ -using System; +/* + + Copyright 2020 Esri + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + + See the License for the specific language governing permissions and + limitations under the License. + +*/ +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -24,6 +42,7 @@ namespace OverlayGroundSurface /// /// /// 1. Download the Community Sample data (see under the 'Resources' section for downloading sample data). The sample data contains a folder called 'C:\Data\Configurations\Projects' with sample data required for this solution. Make sure that the Sample data (specifically CommunitySampleData-3D-04-06-2020.zip) is unzipped into c:\data and c:\data\PolyTest is available. + /// 1. This solution is using the **Newtonsoft.Json NuGet**. If needed, you can install the NuGet from the "NuGet Package Manager Console" by using this script: "Install-Package Newtonsoft.Json". /// 1. In Visual Studio click the Build menu. Then select Build Solution. /// 1. Click Start button to debug ArcGIS Pro. /// 1. Open the Pro project file: PolyTest.aprx in the C:\Data\PolyTest\ folder. Open the 'Graphic Test' tab in ArcGIS Pro. @@ -56,6 +75,99 @@ public static Module1 Current internal static MapView CurrentMapView { get; set; } + #region UI properties and states + + private static List _geometries = new List(); + private static bool _hasImportData = false; + + internal static bool HasImportData + { + get { return _hasImportData; } + set { _hasImportData = value; } + } + + internal static bool HasGeometries + { + get { return HasImportData && _geometries.Count > 0; } + } + + internal static List Geometries + { + get + { + return _geometries; + } + set + { + if (value == null) _geometries = null; + else + { + _geometries.Clear(); + if (value != null) + { + foreach (var geom in value) + { + _geometries.Add(geom.Clone()); + } + } + } + SetState("has_geometry_state", _geometries != null && _geometries.Count > 0); + } + } + + private static Polygon _polygon = null; + + internal static Polygon Polygon + { + get + { + return _polygon; + } + set + { + if (value == null) _polygon = null; + else _polygon = value.Clone() as Polygon; + SetState("has_polygon_state", _polygon != null); + foreach (var mv in _graphics.Keys) + { + ClearGraphics(mv); + } + var mvs = new List(); + foreach (var mv in _graphic.Keys) + { + if (_graphic[mv] != null) mvs.Add(mv); + } + foreach (var mv in mvs) + { + _graphic[mv]?.Dispose(); + _graphic[mv] = null; + } + HasImportData = false; + } + } + + internal static void SetState(string stateName, bool active) + { + if (FrameworkApplication.State.Contains(stateName) == active) return; + // toggle the state + if (FrameworkApplication.State.Contains(stateName)) + { + //deactivates the state + FrameworkApplication.State.Deactivate(stateName); + } + else + { + //activates the state + FrameworkApplication.State.Activate(stateName); + } + } + + internal static double Resolution { get; set; } = 1.00; + + internal static double Elevation { get; set; } = 1.00; + + #endregion UI properties and states + #region Overlay Helpers private static Dictionary _graphic = new Dictionary(); @@ -139,61 +251,11 @@ internal static double GetFishnetIntervalDistance(Envelope env) #endregion Utility Helpers - #region UI and Polygon Helpers - - private static Polygon _polygon = null; - - internal static Polygon Polygon - { - get - { - return _polygon; - } - set - { - if (value == null) _polygon = null; - else _polygon = value.Clone() as Polygon; - SetState("has_polygon_state", _polygon != null); - foreach (var mv in _graphics.Keys) - { - ClearGraphics(mv); - } - var mvs = new List(); - foreach (var mv in _graphic.Keys) - { - if (_graphic[mv] != null) mvs.Add(mv); - } - foreach (var mv in mvs) - { - _graphic[mv]?.Dispose(); - _graphic[mv] = null; - } - } - } - - internal static void SetState(string stateName, bool active) - { - if (FrameworkApplication.State.Contains(stateName) == active) return; - // toggle the state - if (FrameworkApplication.State.Contains(stateName)) - { - //deactivates the state - FrameworkApplication.State.Deactivate(stateName); - } - else - { - //activates the state - FrameworkApplication.State.Activate(stateName); - } - } - - internal static double Resolution { get; set; } = 1.00; + #region Polygon Helpers - internal static double Elevation { get; set; } = 1.00; - - internal static List MakeFishnetPolygons(Polygon inputPoly) + internal static List MakeFishnetPolygons(Polygon inputPoly) { - List polygons = new List(); + List polygons = new List(); Envelope envPoly = inputPoly.Extent; var interval = GetFishnetIntervalDistance(envPoly); for (var dX = envPoly.XMin; dX < envPoly.XMax + interval; dX += interval) @@ -203,7 +265,7 @@ internal static List MakeFishnetPolygons(Polygon inputPoly) var cutEnv = EnvelopeBuilder.CreateEnvelope(dX, dY, dX + interval, dY + interval, envPoly.SpatialReference); if (GeometryEngine.Instance.Intersects(cutEnv, inputPoly)) { - var addPolygonPart = GeometryEngine.Instance.Clip(inputPoly, cutEnv) as Polygon; + var addPolygonPart = GeometryEngine.Instance.Clip(inputPoly, cutEnv); polygons.Add(addPolygonPart); } } @@ -211,7 +273,7 @@ internal static List MakeFishnetPolygons(Polygon inputPoly) return polygons; } - internal static Polygon MakeFishnetPolygon(Polygon inputPoly) + internal static Geometry MakeFishnetPolygon(Polygon inputPoly) { Envelope envPoly = inputPoly.Extent; var interval = GetFishnetIntervalDistance(envPoly); @@ -235,14 +297,14 @@ internal static Polygon MakeFishnetPolygon(Polygon inputPoly) } } } - return pb.ToGeometry() as Polygon; + return pb.ToGeometry(); } - #endregion UI and Polygon Helpers + #endregion Polygon Helpers #region MultiPatch Helpers - internal static async Task MakeFishnetMultiPatchAsync(Polygon inputPoly) + internal static async Task MakeFishnetMultiPatchAsync(Polygon inputPoly) { Envelope envPoly = inputPoly.Extent; var interval = GetFishnetIntervalDistance(envPoly); @@ -285,7 +347,7 @@ internal static async Task MakeFishnetMultiPatchAsync(Polygon inputP } // assign the patches to the multipatchBuilder mpb.Patches = patches; // call ToGeometry to get the multipatch - return mpb.ToGeometry() as Multipatch; + return mpb.ToGeometry(); } internal static async Task MakeFishnetRingMultiPatchAsync(Polygon inputPoly) diff --git a/Map-Exploration/OverlayGroundSurface/OverlayGroundSurface (C#).md b/Map-Exploration/OverlayGroundSurface/OverlayGroundSurface (C#).md index 3e398594..42252787 100644 --- a/Map-Exploration/OverlayGroundSurface/OverlayGroundSurface (C#).md +++ b/Map-Exploration/OverlayGroundSurface/OverlayGroundSurface (C#).md @@ -13,7 +13,7 @@ Language: C# Subject: Map Exploration Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2019 .NET Target Framework: 4.8 @@ -37,6 +37,7 @@ Visual Studio: 2019 ## How to use the sample 1. Download the Community Sample data (see under the 'Resources' section for downloading sample data). The sample data contains a folder called 'C:\Data\Configurations\Projects' with sample data required for this solution. Make sure that the Sample data (specifically CommunitySampleData-3D-04-06-2020.zip) is unzipped into c:\data and c:\data\PolyTest is available. +1. This solution is using the **Newtonsoft.Json NuGet**. If needed, you can install the NuGet from the "NuGet Package Manager Console" by using this script: "Install-Package Newtonsoft.Json". 1. In Visual Studio click the Build menu. Then select Build Solution. 1. Click Start button to debug ArcGIS Pro. 1. Open the Pro project file: PolyTest.aprx in the C:\Data\PolyTest\ folder. Open the 'Graphic Test' tab in ArcGIS Pro. diff --git a/Map-Exploration/OverlayGroundSurface/OverlayGroundSurface.csproj b/Map-Exploration/OverlayGroundSurface/OverlayGroundSurface.csproj index 00e3ad2f..c6269a08 100644 --- a/Map-Exploration/OverlayGroundSurface/OverlayGroundSurface.csproj +++ b/Map-Exploration/OverlayGroundSurface/OverlayGroundSurface.csproj @@ -127,10 +127,12 @@ - - - - + + + + + + @@ -157,7 +159,12 @@ - + + + + + + diff --git a/Map-Exploration/OverlayGroundSurface/Properties/AssemblyInfo.cs b/Map-Exploration/OverlayGroundSurface/Properties/AssemblyInfo.cs index e96f1720..203b0aec 100644 --- a/Map-Exploration/OverlayGroundSurface/Properties/AssemblyInfo.cs +++ b/Map-Exploration/OverlayGroundSurface/Properties/AssemblyInfo.cs @@ -1,4 +1,22 @@ -using System.Reflection; +/* + + Copyright 2020 Esri + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + + See the License for the specific language governing permissions and + limitations under the License. + +*/ +using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; diff --git a/Map-Exploration/OverlayGroundSurface/ReadMe.md b/Map-Exploration/OverlayGroundSurface/ReadMe.md index 3e398594..42252787 100644 --- a/Map-Exploration/OverlayGroundSurface/ReadMe.md +++ b/Map-Exploration/OverlayGroundSurface/ReadMe.md @@ -13,7 +13,7 @@ Language: C# Subject: Map Exploration Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2019 .NET Target Framework: 4.8 @@ -37,6 +37,7 @@ Visual Studio: 2019 ## How to use the sample 1. Download the Community Sample data (see under the 'Resources' section for downloading sample data). The sample data contains a folder called 'C:\Data\Configurations\Projects' with sample data required for this solution. Make sure that the Sample data (specifically CommunitySampleData-3D-04-06-2020.zip) is unzipped into c:\data and c:\data\PolyTest is available. +1. This solution is using the **Newtonsoft.Json NuGet**. If needed, you can install the NuGet from the "NuGet Package Manager Console" by using this script: "Install-Package Newtonsoft.Json". 1. In Visual Studio click the Build menu. Then select Build Solution. 1. Click Start button to debug ArcGIS Pro. 1. Open the Pro project file: PolyTest.aprx in the C:\Data\PolyTest\ folder. Open the 'Graphic Test' tab in ArcGIS Pro. diff --git a/Map-Exploration/OverlayGroundSurface/RenderAsManyPolygons.cs b/Map-Exploration/OverlayGroundSurface/RenderAsManyPolygons.cs new file mode 100644 index 00000000..9e8668e1 --- /dev/null +++ b/Map-Exploration/OverlayGroundSurface/RenderAsManyPolygons.cs @@ -0,0 +1,96 @@ +/* + + Copyright 2020 Esri + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + + See the License for the specific language governing permissions and + limitations under the License. + +*/ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using ArcGIS.Core.CIM; +using ArcGIS.Core.Data; +using ArcGIS.Core.Geometry; +using ArcGIS.Desktop.Catalog; +using ArcGIS.Desktop.Core; +using ArcGIS.Desktop.Editing; +using ArcGIS.Desktop.Extensions; +using ArcGIS.Desktop.Framework; +using ArcGIS.Desktop.Framework.Contracts; +using ArcGIS.Desktop.Framework.Dialogs; +using ArcGIS.Desktop.Framework.Threading.Tasks; +using ArcGIS.Desktop.Mapping; + +namespace OverlayGroundSurface +{ + internal class RenderAsManyPolygons : Button + { + protected override async void OnClick() + { + try + { + // do this for all active map panes + var mapPanes = ProApp.Panes.OfType(); + foreach (IMapPane mapPane in mapPanes) + { + if (!(mapPane as Pane).Initialized || mapPane.MapView == null) + { + System.Diagnostics.Debug.WriteLine($@"Not map but table? {mapPane.Caption}"); + continue; + } + Module1.CurrentMapView = mapPane.MapView; + System.Diagnostics.Debug.WriteLine($@"Drawing graphics on: {Module1.CurrentMapView.Map.Name}"); + var polygon = Module1.Polygon; + var fishnetPolygons = await QueuedTask.Run(async () => + { + List polygons = null; + if (Module1.HasGeometries && Module1.Geometries.Count > 0) + { + polygons = Module1.Geometries; + } + else polygons = Module1.MakeFishnetPolygons(polygon); + bool bFirst = true; + foreach (var fishnetPolygon in polygons) + { + if (Module1.Is3D) + { + // 3D + var result = await Module1.CurrentMapView?.Map?.GetZsFromSurfaceAsync(fishnetPolygon); + if (result.Status == SurfaceZsResultStatus.Ok) + { + var movedZup = GeometryEngine.Instance.Move(result.Geometry, 0, 0, Module1.Elevation) as Polygon; + Module1.MultiAddOrUpdateOverlay(bFirst, movedZup, Module1.GetPolygonSymbolRef()); + } + } + else + { + // 2D + Module1.MultiAddOrUpdateOverlay(bFirst, fishnetPolygon, Module1.GetPolygonSymbolRef()); + } + bFirst = false; + } + return polygons; + }); + if (!Module1.HasImportData) Module1.Geometries = fishnetPolygons; + } + } + catch (Exception ex) + { + System.Diagnostics.Debug.WriteLine($@"Exception: {ex.ToString()}"); + } + } + } +} diff --git a/Map-Exploration/OverlayGroundSurface/RenderAsMultiPartPolygon.cs b/Map-Exploration/OverlayGroundSurface/RenderAsMultiPartPolygon.cs new file mode 100644 index 00000000..812c4ffc --- /dev/null +++ b/Map-Exploration/OverlayGroundSurface/RenderAsMultiPartPolygon.cs @@ -0,0 +1,92 @@ +/* + + Copyright 2020 Esri + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + + See the License for the specific language governing permissions and + limitations under the License. + +*/ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using ArcGIS.Core.CIM; +using ArcGIS.Core.Data; +using ArcGIS.Core.Geometry; +using ArcGIS.Desktop.Catalog; +using ArcGIS.Desktop.Core; +using ArcGIS.Desktop.Editing; +using ArcGIS.Desktop.Extensions; +using ArcGIS.Desktop.Framework; +using ArcGIS.Desktop.Framework.Contracts; +using ArcGIS.Desktop.Framework.Dialogs; +using ArcGIS.Desktop.Framework.Threading.Tasks; +using ArcGIS.Desktop.Mapping; + +namespace OverlayGroundSurface +{ + internal class RenderAsMultiPartPolygon : Button + { + protected override async void OnClick() + { + try + { + // do this for all active map panes + var mapPanes = ProApp.Panes.OfType(); + foreach (IMapPane mapPane in mapPanes) + { + if (!(mapPane as Pane).Initialized || mapPane.MapView == null) + { + System.Diagnostics.Debug.WriteLine($@"Not map but table? {mapPane.Caption}"); + continue; + } + Module1.CurrentMapView = mapPane.MapView; + System.Diagnostics.Debug.WriteLine($@"Drawing graphics on: {Module1.CurrentMapView.Map.Name}"); + var polygon = Module1.Polygon; + var fishnetPolygon = await QueuedTask.Run(async () => + { + Geometry multiPartPoly = null; + if (Module1.HasGeometries && Module1.Geometries.Count == 0 && Module1.Geometries[0].GeometryType == GeometryType.Polygon) + { + multiPartPoly = Module1.Geometries[0]; + } + else multiPartPoly = Module1.MakeFishnetPolygon(polygon); + if (Module1.Is3D) + { + // 3D + var result = await Module1.CurrentMapView.Map.GetZsFromSurfaceAsync(multiPartPoly); + if (result.Status == SurfaceZsResultStatus.Ok) + { + var movedZup = GeometryEngine.Instance.Move(result.Geometry, 0, 0, Module1.Elevation) as Polygon; + Module1.AddOrUpdateOverlay(movedZup, Module1.GetPolygonSymbolRef()); + } + } + else + { + // 2D + Module1.AddOrUpdateOverlay(multiPartPoly, Module1.GetPolygonSymbolRef()); + } + return multiPartPoly; + }); + var fishnetPolygons = new List() { fishnetPolygon }; + if (!Module1.HasImportData) Module1.Geometries = fishnetPolygons; + } + } + catch (Exception ex) + { + System.Diagnostics.Debug.WriteLine($@"Exception: {ex}"); + } + } + } +} diff --git a/Map-Exploration/OverlayGroundSurface/RenderAsMultiPatch.cs b/Map-Exploration/OverlayGroundSurface/RenderAsMultiPatch.cs new file mode 100644 index 00000000..ce2d0d61 --- /dev/null +++ b/Map-Exploration/OverlayGroundSurface/RenderAsMultiPatch.cs @@ -0,0 +1,92 @@ +/* + + Copyright 2020 Esri + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + + See the License for the specific language governing permissions and + limitations under the License. + +*/ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using ArcGIS.Core.CIM; +using ArcGIS.Core.Data; +using ArcGIS.Core.Geometry; +using ArcGIS.Desktop.Catalog; +using ArcGIS.Desktop.Core; +using ArcGIS.Desktop.Editing; +using ArcGIS.Desktop.Extensions; +using ArcGIS.Desktop.Framework; +using ArcGIS.Desktop.Framework.Contracts; +using ArcGIS.Desktop.Framework.Dialogs; +using ArcGIS.Desktop.Framework.Threading.Tasks; +using ArcGIS.Desktop.Mapping; + +namespace OverlayGroundSurface +{ + internal class RenderAsMultiPatch : Button + { + protected override async void OnClick() + { + try + { + // do this for all active map panes + var mapPanes = ProApp.Panes.OfType(); + foreach (IMapPane mapPane in mapPanes) + { + if (!(mapPane as Pane).Initialized || mapPane.MapView == null) + { + System.Diagnostics.Debug.WriteLine($@"Not map but table? {mapPane.Caption}"); + continue; + } + Module1.CurrentMapView = mapPane.MapView; + System.Diagnostics.Debug.WriteLine($@"Drawing graphics on: {Module1.CurrentMapView.Map.Name}"); + var polygon = Module1.Polygon; + var multiPatchPolygon = await QueuedTask.Run(async () => + { + Geometry multiPatchPoly = null; + if (Module1.HasGeometries && Module1.Geometries.Count == 0 && Module1.Geometries[0].GeometryType == GeometryType.Multipatch) + { + multiPatchPoly = Module1.Geometries[0]; + } + else multiPatchPoly = await Module1.MakeFishnetMultiPatchAsync(polygon); + //if (Module1.Is3D) + //{ + // // 3D + // var result = await Module1.CurrentMapView.Map.GetZsFromSurfaceAsync(multiPatchPoly); + // if (result.Status == SurfaceZsResultStatus.Ok) + // { + // var movedZup = GeometryEngine.Instance.Move(result.Geometry, 0, 0, Module1.Elevation) as Polygon; + // Module1.AddOrUpdateOverlay(movedZup, Module1.GetDefaultMeshSymbol()); + // } + //} + //else + //{ + // 2D + Module1.AddOrUpdateOverlay(multiPatchPoly, Module1.GetDefaultMeshSymbol()); + //} + return multiPatchPoly; + }); + var multiPatchPolygons = new List() { multiPatchPolygon }; + if (!Module1.HasImportData) Module1.Geometries = multiPatchPolygons; + } + } + catch (Exception ex) + { + System.Diagnostics.Debug.WriteLine($@"Exception: {ex}"); + } + } + } +} diff --git a/Map-Exploration/OverlayGroundSurface/RenderAsMultiPatchRing.cs b/Map-Exploration/OverlayGroundSurface/RenderAsMultiPatchRing.cs new file mode 100644 index 00000000..7ba089f4 --- /dev/null +++ b/Map-Exploration/OverlayGroundSurface/RenderAsMultiPatchRing.cs @@ -0,0 +1,93 @@ +/* + + Copyright 2020 Esri + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + + See the License for the specific language governing permissions and + limitations under the License. + +*/ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using ArcGIS.Core.CIM; +using ArcGIS.Core.Data; +using ArcGIS.Core.Geometry; +using ArcGIS.Desktop.Catalog; +using ArcGIS.Desktop.Core; +using ArcGIS.Desktop.Editing; +using ArcGIS.Desktop.Extensions; +using ArcGIS.Desktop.Framework; +using ArcGIS.Desktop.Framework.Contracts; +using ArcGIS.Desktop.Framework.Dialogs; +using ArcGIS.Desktop.Framework.Threading.Tasks; +using ArcGIS.Desktop.Mapping; + +namespace OverlayGroundSurface +{ + internal class RenderAsMultiPatchRing : Button + { + protected override async void OnClick() + { + try + { + // do this for all active map panes + var mapPanes = ProApp.Panes.OfType(); + foreach (IMapPane mapPane in mapPanes) + { + if (!(mapPane as Pane).Initialized || mapPane.MapView == null) + { + System.Diagnostics.Debug.WriteLine($@"Not map but table? {mapPane.Caption}"); + continue; + } + Module1.CurrentMapView = mapPane.MapView; + System.Diagnostics.Debug.WriteLine($@"Drawing graphics on: {Module1.CurrentMapView.Map.Name}"); + var polygon = Module1.Polygon; + var multiPatchPolygon = await QueuedTask.Run(async () => + { + Geometry multiPatchPoly = null; + if (Module1.HasGeometries && Module1.Geometries.Count == 0 && Module1.Geometries[0].GeometryType == GeometryType.Multipatch) + { + multiPatchPoly = Module1.Geometries[0]; + } + else multiPatchPoly = await Module1.MakeFishnetRingMultiPatchAsync(polygon); + //if (Module1.Is3D) + //{ + // // 3D + // var result = await Module1.CurrentMapView.Map.GetZsFromSurfaceAsync(multiPatchPoly); + // if (result.Status == SurfaceZsResultStatus.Ok) + // { + // var movedZup = GeometryEngine.Instance.Move(result.Geometry, 0, 0, Module1.Elevation) as Polygon; + // Module1.AddOrUpdateOverlay(movedZup, Module1.GetDefaultMeshSymbol()); + // } + //} + //else + //{ + // 2D + Module1.ClearGraphic(Module1.CurrentMapView); + Module1.AddOrUpdateOverlay(multiPatchPoly, Module1.GetDefaultMeshSymbol()); + //} + return multiPatchPoly; + }); + var multiPatchPolygons = new List() { multiPatchPolygon }; + if (!Module1.HasImportData) Module1.Geometries = multiPatchPolygons; + } + } + catch (Exception ex) + { + System.Diagnostics.Debug.WriteLine($@"Exception: {ex}"); + } + } + } +} diff --git a/Map-Exploration/OverlayGroundSurface/ShowPoints.cs b/Map-Exploration/OverlayGroundSurface/ShowPoints.cs index 2be43f00..6b72dc0d 100644 --- a/Map-Exploration/OverlayGroundSurface/ShowPoints.cs +++ b/Map-Exploration/OverlayGroundSurface/ShowPoints.cs @@ -1,4 +1,22 @@ -using System; +/* + + Copyright 2020 Esri + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + + See the License for the specific language governing permissions and + limitations under the License. + +*/ +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -38,11 +56,16 @@ protected override async void OnClick() var polygon = Module1.Polygon; var fishnetPolygons = await QueuedTask.Run(async () => { - var polygons = Module1.MakeFishnetPolygons(polygon); + List polygons = null; + if (Module1.HasGeometries && Module1.Geometries.Count > 0) + { + polygons = Module1.Geometries; + } + else polygons = Module1.MakeFishnetPolygons(polygon); bool bFirst = true; foreach (var fishnetPolygon in polygons) { - var poly = fishnetPolygon; + var poly = fishnetPolygon as Polygon; if (Module1.Is3D) { var result = await Module1.CurrentMapView?.Map?.GetZsFromSurfaceAsync(poly); diff --git a/Map-Exploration/OverviewMapControl/Config.daml b/Map-Exploration/OverviewMapControl/Config.daml index 23a94708..c8a82bde 100644 --- a/Map-Exploration/OverviewMapControl/Config.daml +++ b/Map-Exploration/OverviewMapControl/Config.daml @@ -1,4 +1,4 @@ - + - + diff --git a/Map-Exploration/OverviewMapControl/OverviewMapControl (C#).md b/Map-Exploration/OverviewMapControl/OverviewMapControl (C#).md index c56c5d70..7d856c98 100644 --- a/Map-Exploration/OverviewMapControl/OverviewMapControl (C#).md +++ b/Map-Exploration/OverviewMapControl/OverviewMapControl (C#).md @@ -15,7 +15,7 @@ Language: C# Subject: Framework Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Map-Exploration/OverviewMapControl/ReadMe.md b/Map-Exploration/OverviewMapControl/ReadMe.md index c56c5d70..7d856c98 100644 --- a/Map-Exploration/OverviewMapControl/ReadMe.md +++ b/Map-Exploration/OverviewMapControl/ReadMe.md @@ -15,7 +15,7 @@ Language: C# Subject: Framework Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Map-Exploration/OverviewTableControl/Config.daml b/Map-Exploration/OverviewTableControl/Config.daml index a6317197..faf9c11b 100644 --- a/Map-Exploration/OverviewTableControl/Config.daml +++ b/Map-Exploration/OverviewTableControl/Config.daml @@ -1,4 +1,4 @@ - + - + Show conversion of screen coordinates to map point diff --git a/Map-Exploration/ScreenCoordsToMapPoint/ReadMe.md b/Map-Exploration/ScreenCoordsToMapPoint/ReadMe.md index 0dc2e814..6fa9d09d 100644 --- a/Map-Exploration/ScreenCoordsToMapPoint/ReadMe.md +++ b/Map-Exploration/ScreenCoordsToMapPoint/ReadMe.md @@ -13,7 +13,7 @@ Language: C# Subject: Map Exploration Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Map-Exploration/ScreenCoordsToMapPoint/ScreenCoordsToMapPoint (C#).md b/Map-Exploration/ScreenCoordsToMapPoint/ScreenCoordsToMapPoint (C#).md index 0dc2e814..6fa9d09d 100644 --- a/Map-Exploration/ScreenCoordsToMapPoint/ScreenCoordsToMapPoint (C#).md +++ b/Map-Exploration/ScreenCoordsToMapPoint/ScreenCoordsToMapPoint (C#).md @@ -13,7 +13,7 @@ Language: C# Subject: Map Exploration Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Map-Exploration/ScribbleControl_ArcGISPro/Config.daml b/Map-Exploration/ScribbleControl_ArcGISPro/Config.daml index f7434f98..6b46a72a 100644 --- a/Map-Exploration/ScribbleControl_ArcGISPro/Config.daml +++ b/Map-Exploration/ScribbleControl_ArcGISPro/Config.daml @@ -1,4 +1,4 @@ - + - WorkingWithQueryDefinitionFilters diff --git a/Map-Exploration/WorkingWithQueryDefinitionFilters/ReadMe.md b/Map-Exploration/WorkingWithQueryDefinitionFilters/ReadMe.md index 5f99921a..730aaec4 100644 --- a/Map-Exploration/WorkingWithQueryDefinitionFilters/ReadMe.md +++ b/Map-Exploration/WorkingWithQueryDefinitionFilters/ReadMe.md @@ -13,7 +13,7 @@ Language: C# Subject: Map Exploration Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2019 .NET Target Framework: 4.8 diff --git a/Map-Exploration/WorkingWithQueryDefinitionFilters/WorkingWithQueryDefinitionFilters (C#).md b/Map-Exploration/WorkingWithQueryDefinitionFilters/WorkingWithQueryDefinitionFilters (C#).md index 5f99921a..730aaec4 100644 --- a/Map-Exploration/WorkingWithQueryDefinitionFilters/WorkingWithQueryDefinitionFilters (C#).md +++ b/Map-Exploration/WorkingWithQueryDefinitionFilters/WorkingWithQueryDefinitionFilters (C#).md @@ -13,7 +13,7 @@ Language: C# Subject: Map Exploration Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2019 .NET Target Framework: 4.8 diff --git a/ParcelFabric/ParcelFabricMultistoryTool/Config.daml b/ParcelFabric/ParcelFabricMultistoryTool/Config.daml index 1f87bfdf..fb675395 100644 --- a/ParcelFabric/ParcelFabricMultistoryTool/Config.daml +++ b/ParcelFabric/ParcelFabricMultistoryTool/Config.daml @@ -1,4 +1,4 @@ - + - - - + diff --git a/Plugin/ProSqlExpressReader/ProSqlExpressProjectItem.cs b/Plugin/ProSqlExpressReader/ProSqlExpressProjectItem.cs index af284433..ac61d8bd 100644 --- a/Plugin/ProSqlExpressReader/ProSqlExpressProjectItem.cs +++ b/Plugin/ProSqlExpressReader/ProSqlExpressProjectItem.cs @@ -30,11 +30,14 @@ limitations under the License. using ESRI.ArcGIS.ItemIndex; using ProSqlExpressDb; using System.Runtime.InteropServices; +using ArcGIS.Desktop.Mapping; +using ArcGIS.Core.CIM; +using ArcGIS.Desktop.Framework.DragDrop; namespace ProSqlExpressReader { - internal class ProDataProjectItem : CustomProjectItemBase + internal class ProDataProjectItem : CustomProjectItemBase, IMappableItem { [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] [DllImport("kernel32.dll")] @@ -188,12 +191,27 @@ private ProDataSubItem GetParentFolder(string topNodeName, ProDataSubItem subIte return topNode; } + bool IMappableItem.CanAddToMap(MapType? mapType) + { + return true; + } + + void IMappableItem.OnAddToMap(Map map) + { + throw new NotImplementedException(); + } + + void IMappableItem.OnAddToMap(Map map, ILayerContainerEdit groupLayer, int index) + { + throw new NotImplementedException(); + } + private static readonly ASCIIEncoding ASCIIencoding = new ASCIIEncoding(); } - internal class ProDataSubItem : CustomItemBase + internal class ProDataSubItem : CustomItemBase, IMappableItem { public enum EnumSubItemType { @@ -297,5 +315,25 @@ private ImageSource GetIconImage(bool bSmall) if (imgSrc == null) throw new ArgumentException($@"Unable to find small image for ProSqlTable"); return imgSrc; } + + bool IMappableItem.CanAddToMap(MapType? mapType) + { + System.Diagnostics.Debug.WriteLine("CanAddToMap"); + return true; + } + + void IMappableItem.OnAddToMap(Map map) + { + System.Diagnostics.Debug.WriteLine("OnAddToMap"); + IList lst = new List(); + lst.Add(this); + _ = AddToCurrentMap.AddProDataSubItemsAsync(lst, map); + } + + void IMappableItem.OnAddToMap(Map map, ILayerContainerEdit groupLayer, int index) + { + System.Diagnostics.Debug.WriteLine("OnAddToMap idx"); + throw new NotImplementedException(); + } } } diff --git a/Plugin/ProSqlExpressReader/ProSqlExpressReader (C#).md b/Plugin/ProSqlExpressReader/ProSqlExpressReader (C#).md index 894f2da4..17b15cf9 100644 --- a/Plugin/ProSqlExpressReader/ProSqlExpressReader (C#).md +++ b/Plugin/ProSqlExpressReader/ProSqlExpressReader (C#).md @@ -14,7 +14,7 @@ Language: C# Subject: Plugin Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2019 .NET Target Framework: 4.8 diff --git a/Plugin/ProSqlExpressReader/ProSqlExpressReader.csproj b/Plugin/ProSqlExpressReader/ProSqlExpressReader.csproj index 5ce95fff..a19ab0e7 100644 --- a/Plugin/ProSqlExpressReader/ProSqlExpressReader.csproj +++ b/Plugin/ProSqlExpressReader/ProSqlExpressReader.csproj @@ -130,6 +130,7 @@ + diff --git a/Plugin/ProSqlExpressReader/ReadMe.md b/Plugin/ProSqlExpressReader/ReadMe.md index 894f2da4..17b15cf9 100644 --- a/Plugin/ProSqlExpressReader/ReadMe.md +++ b/Plugin/ProSqlExpressReader/ReadMe.md @@ -14,7 +14,7 @@ Language: C# Subject: Plugin Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2019 .NET Target Framework: 4.8 diff --git a/Plugin/ProSqlExpressReader/RibbonUI.cs b/Plugin/ProSqlExpressReader/RibbonUI.cs index 29a7cc52..ae37b8da 100644 --- a/Plugin/ProSqlExpressReader/RibbonUI.cs +++ b/Plugin/ProSqlExpressReader/RibbonUI.cs @@ -71,10 +71,9 @@ protected override void OnClick() } } - internal class AddToCurrentMap : Button { - protected async override void OnClick() + protected override void OnClick() { if (MapView.Active?.Map == null) { @@ -83,8 +82,12 @@ protected async override void OnClick() } var catalog = Project.GetCatalogPane(); var items = catalog.SelectedItems; - var ProDataSubItems = items.OfType(); - foreach (var item in ProDataSubItems) + _ = AddProDataSubItemsAsync(items.OfType(), MapView.Active.Map); + } + + public static async Task AddProDataSubItemsAsync (IEnumerable proDataSubItems, Map mapToAddTo) + { + foreach (ProDataSubItem item in proDataSubItems) { try { @@ -103,10 +106,10 @@ await QueuedTask.Run(() => break; } var sqlPath = parts[0]; - var sqlConStr = parts[1]; + var sqlConStr = parts[1]; var dataset = parts[2]; var conSql = new PluginDatasourceConnectionPath("ProSqlExpressPluginDatasource", - new Uri(item.Path.Replace(";", "||"), UriKind.Absolute)); + new Uri(item.Path.Replace(";", "||"), UriKind.Absolute)); using (var pluginSql = new PluginDatastore(conSql)) { foreach (var tn in pluginSql.GetTableNames()) @@ -118,12 +121,12 @@ await QueuedTask.Run(() => if (table is FeatureClass) { //Add as a layer to the active map or scene - LayerFactory.Instance.CreateFeatureLayer((FeatureClass)table, MapView.Active.Map); + LayerFactory.Instance.CreateFeatureLayer((FeatureClass)table, mapToAddTo); } else { //add as a standalone table - StandaloneTableFactory.Instance.CreateStandaloneTable(table, MapView.Active.Map); + StandaloneTableFactory.Instance.CreateStandaloneTable(table, mapToAddTo); } } } @@ -138,39 +141,39 @@ await QueuedTask.Run(() => MessageBox.Show($@"Item path can't be parsed: {item.Path}"); break; } - sqlPath = parts[0]; - sqlConStr = parts[1]; - var tableName = string.Empty; - if (parts.Length == 3) tableName = parts[2]; + sqlPath = parts[0]; + sqlConStr = parts[1]; + var tableName = string.Empty; + if (parts.Length == 3) tableName = parts[2]; - conSql = new PluginDatasourceConnectionPath("ProSqlExpressPluginDatasource", - new Uri(item.Path.Replace(";", "||"), UriKind.Absolute)); + conSql = new PluginDatasourceConnectionPath("ProSqlExpressPluginDatasource", + new Uri(item.Path.Replace(";", "||"), UriKind.Absolute)); using (var pluginSql = new PluginDatastore(conSql)) { - var tableNames = new List(); - if (string.IsNullOrEmpty(tableName)) - { - tableNames = new List(pluginSql.GetTableNames()); - } - else tableNames.Add(tableName); - foreach (var tn in tableNames) - { - System.Diagnostics.Debug.Write($"Open table: {tn}\r\n"); - //open the table - using (var table = pluginSql.OpenTable(tn)) - { - if (table is FeatureClass) - { - //Add as a layer to the active map or scene - LayerFactory.Instance.CreateFeatureLayer((FeatureClass)table, MapView.Active.Map); - } - else - { - //add as a standalone table - StandaloneTableFactory.Instance.CreateStandaloneTable(table, MapView.Active.Map); - } - } - } + var tableNames = new List(); + if (string.IsNullOrEmpty(tableName)) + { + tableNames = new List(pluginSql.GetTableNames()); + } + else tableNames.Add(tableName); + foreach (var tn in tableNames) + { + System.Diagnostics.Debug.Write($"Open table: {tn}\r\n"); + //open the table + using (var table = pluginSql.OpenTable(tn)) + { + if (table is FeatureClass) + { + //Add as a layer to the active map or scene + LayerFactory.Instance.CreateFeatureLayer((FeatureClass)table, mapToAddTo); + } + else + { + //add as a standalone table + StandaloneTableFactory.Instance.CreateStandaloneTable(table, mapToAddTo); + } + } + } } break; } diff --git a/Plugin/ProSqlExpressReader/TestThePlugin.cs b/Plugin/ProSqlExpressReader/TestThePlugin.cs new file mode 100644 index 00000000..7cd3d77c --- /dev/null +++ b/Plugin/ProSqlExpressReader/TestThePlugin.cs @@ -0,0 +1,75 @@ +/* + + Copyright 2020 Esri + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + + See the License for the specific language governing permissions and + limitations under the License. + +*/ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using ArcGIS.Core.CIM; +using ArcGIS.Core.Data; +using ArcGIS.Core.Data.PluginDatastore; +using ArcGIS.Core.Geometry; +using ArcGIS.Desktop.Catalog; +using ArcGIS.Desktop.Core; +using ArcGIS.Desktop.Editing; +using ArcGIS.Desktop.Extensions; +using ArcGIS.Desktop.Framework; +using ArcGIS.Desktop.Framework.Contracts; +using ArcGIS.Desktop.Framework.Dialogs; +using ArcGIS.Desktop.Framework.Threading.Tasks; +using ArcGIS.Desktop.Mapping; + +namespace ProSqlExpressReader +{ + internal class TestThePlugin : Button + { + protected override void OnClick() + { + if (MapView.Active?.Map == null) + { + MessageBox.Show("There is no active map"); + return; + } + try + { + //The browse filter is used in an OpenItemDialog. + BrowseProjectFilter bf = new BrowseProjectFilter + { + //Name the filter + Name = "SQL Express Connection File" + }; + //Display the filter in an Open Item dialog + OpenItemDialog aNewFilter = new OpenItemDialog + { + Title = "Open SQL Express Feature classes", + InitialLocation = @"C:\Data\PluginData", + MultiSelect = false, + BrowseFilter = bf + }; + bool? ok = aNewFilter.ShowDialog(); + if (!(ok.HasValue && ok.Value)) return; + _ = AddToCurrentMap.AddProDataSubItemsAsync(aNewFilter.Items.OfType(), MapView.Active.Map); + } + catch (Exception ex) + { + MessageBox.Show($@"Exception: {ex.ToString()}"); + } + } + } +} diff --git a/Plugin/SimplePointPluginTest/Config.daml b/Plugin/SimplePointPluginTest/Config.daml index e766b594..a85864ca 100644 --- a/Plugin/SimplePointPluginTest/Config.daml +++ b/Plugin/SimplePointPluginTest/Config.daml @@ -1,4 +1,4 @@ - + - SimplePointPluginTest diff --git a/Plugin/SimplePointPluginTest/ReadMe.md b/Plugin/SimplePointPluginTest/ReadMe.md index fc799797..b6c4964e 100644 --- a/Plugin/SimplePointPluginTest/ReadMe.md +++ b/Plugin/SimplePointPluginTest/ReadMe.md @@ -13,7 +13,7 @@ Language: C# Subject: Geodatabase Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2019 .NET Target Framework: 4.8 diff --git a/Plugin/SimplePointPluginTest/SimplePointPlugin/SimplePointPlugin.csproj b/Plugin/SimplePointPluginTest/SimplePointPlugin/SimplePointPlugin.csproj index 46e41c6e..4636d238 100644 --- a/Plugin/SimplePointPluginTest/SimplePointPlugin/SimplePointPlugin.csproj +++ b/Plugin/SimplePointPluginTest/SimplePointPlugin/SimplePointPlugin.csproj @@ -52,21 +52,21 @@ - ..\..\..\packages\System.Buffers.4.5.0\lib\netstandard2.0\System.Buffers.dll + ..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll - - ..\..\..\packages\System.Collections.Immutable.1.6.0-preview6.19303.8\lib\netstandard2.0\System.Collections.Immutable.dll + + ..\packages\System.Collections.Immutable.1.7.1\lib\net461\System.Collections.Immutable.dll - ..\..\..\packages\System.Memory.4.5.3\lib\netstandard2.0\System.Memory.dll + ..\packages\System.Memory.4.5.4\lib\net461\System.Memory.dll ..\..\..\packages\System.Numerics.Vectors.4.6.0-preview5.19224.8\lib\net46\System.Numerics.Vectors.dll - - ..\..\..\packages\System.Runtime.CompilerServices.Unsafe.4.6.0-preview6.19303.8\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll + + ..\packages\System.Runtime.CompilerServices.Unsafe.4.7.1\lib\net461\System.Runtime.CompilerServices.Unsafe.dll diff --git a/Plugin/SimplePointPluginTest/SimplePointPlugin/app.config b/Plugin/SimplePointPluginTest/SimplePointPlugin/app.config index 9dc7475c..e726589e 100644 --- a/Plugin/SimplePointPluginTest/SimplePointPlugin/app.config +++ b/Plugin/SimplePointPluginTest/SimplePointPlugin/app.config @@ -4,7 +4,7 @@ - + @@ -12,7 +12,7 @@ - + diff --git a/Plugin/SimplePointPluginTest/SimplePointPlugin/packages.config b/Plugin/SimplePointPluginTest/SimplePointPlugin/packages.config index 7eaeb444..4e81ec82 100644 --- a/Plugin/SimplePointPluginTest/SimplePointPlugin/packages.config +++ b/Plugin/SimplePointPluginTest/SimplePointPlugin/packages.config @@ -1,9 +1,9 @@  - - - + + + - + \ No newline at end of file diff --git a/Plugin/SimplePointPluginTest/SimplePointPluginTest (C#).md b/Plugin/SimplePointPluginTest/SimplePointPluginTest (C#).md index fc799797..b6c4964e 100644 --- a/Plugin/SimplePointPluginTest/SimplePointPluginTest (C#).md +++ b/Plugin/SimplePointPluginTest/SimplePointPluginTest (C#).md @@ -13,7 +13,7 @@ Language: C# Subject: Geodatabase Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2019 .NET Target Framework: 4.8 diff --git a/README.md b/README.md index 4a2cc9de..a43367eb 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,7 @@ Read the [ProGuide: Installation and Upgrade](https://github.com/Esri/arcgis-pro ## ArcGIS Pro Add-In Community Sample List -Below is the list of 188 ArcGIS Pro samples that are included in this repository. +Below is the list of 193 ArcGIS Pro samples that are included in this repository. #### Content @@ -99,16 +99,19 @@ Below is the list of 188 ArcGIS Pro samples that are included in this repository * [CreatePointsAlongLine3D (c#)](../../tree/master/Editing/CreatePointsAlongLine3D) * [CrowdPlannerTool (c#)](../../tree/master/Editing/CrowdPlannerTool) * [DatasetCompatibility (c#)](../../tree/master/Editing/DatasetCompatibility) +* [DemoUseSelection (c#)](../../tree/master/Editing/DemoUseSelection) * [DivideLines (c#)](../../tree/master/Editing/DivideLines) * [EditEvents (c#)](../../tree/master/Editing/EditEvents) * [EditingTemplates (c#)](../../tree/master/Editing/EditingTemplates) * [EditOperationRowEvent (c#)](../../tree/master/Editing/EditOperationRowEvent) * [ExtendTool (c#)](../../tree/master/Editing/ExtendTool) +* [GeometryControl (c#)](../../tree/master/Editing/GeometryControl) * [GridScaleCADLayer (c#)](../../tree/master/Editing/GridScaleCADLayer) * [GroundToGrid (c#)](../../tree/master/Editing/GroundToGrid) * [GroundToGridEvents (c#)](../../tree/master/Editing/GroundToGridEvents) * [InspectorTool (c#)](../../tree/master/Editing/InspectorTool) * [Inspector_AddAttributeAsync (c#)](../../tree/master/Editing/Inspector_AddAttributeAsync) +* [LayerSnapModes (c#)](../../tree/master/Editing/LayerSnapModes) * [MainConnectorManhole (c#)](../../tree/master/Editing/MainConnectorManhole) * [ModifyNewlyAddedFeatures (c#)](../../tree/master/Editing/ModifyNewlyAddedFeatures) * [MultipatchBuilder (c#)](../../tree/master/Editing/MultipatchBuilder) @@ -206,9 +209,11 @@ Below is the list of 188 ArcGIS Pro samples that are included in this repository * [ConstructMarkerFromFont (c#)](../../tree/master/Map-Authoring/ConstructMarkerFromFont) * [CustomSymbolPicker (c#)](../../tree/master/Map-Authoring/CustomSymbolPicker) * [DictionarySymbolPreview (c#)](../../tree/master/Map-Authoring/DictionarySymbolPreview) +* [DisplayFilters (c#)](../../tree/master/Map-Authoring/DisplayFilters) * [ExportWeb3DObjectResource (c#)](../../tree/master/Map-Authoring/ExportWeb3DObjectResource) * [GeocodingTools (c#)](../../tree/master/Map-Authoring/GeocodingTools) * [GetSymbolSwatch (c#)](../../tree/master/Map-Authoring/GetSymbolSwatch) +* [GraphicsLayers (c#)](../../tree/master/Map-Authoring/GraphicsLayers) * [LabelLineFeatures (c#)](../../tree/master/Map-Authoring/LabelLineFeatures) * [LayersPane (c#)](../../tree/master/Map-Authoring/LayersPane) * [MappingAddIns (c#)](../../tree/master/Map-Authoring/MappingAddIns) diff --git a/Raster/ChangeColorizerForRasterLayer/ChangeColorizerForRasterLayer (C#).md b/Raster/ChangeColorizerForRasterLayer/ChangeColorizerForRasterLayer (C#).md index b8ffafe5..2d8e0e11 100644 --- a/Raster/ChangeColorizerForRasterLayer/ChangeColorizerForRasterLayer (C#).md +++ b/Raster/ChangeColorizerForRasterLayer/ChangeColorizerForRasterLayer (C#).md @@ -18,7 +18,7 @@ Language: C# Subject: Raster Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Raster/ChangeColorizerForRasterLayer/Config.daml b/Raster/ChangeColorizerForRasterLayer/Config.daml index 50307a5c..5e984c93 100644 --- a/Raster/ChangeColorizerForRasterLayer/Config.daml +++ b/Raster/ChangeColorizerForRasterLayer/Config.daml @@ -1,4 +1,4 @@ - + - - - Show the list of colorizers that can be applied to the selected layer. Select a colorizer to apply it to the layer. If the combo box is empty, it is maybe because you do not select a single layer, or the selected layer is not a basic raster layer type. Do not have an active map view. - + + Show the list of colorizers that can be applied to the selected layer. Select a colorizer to apply it to the layer. If the combo box is empty, it is maybe because you do not select a single layer, or the selected layer is not a basic raster layer type. Do not have an active map view. diff --git a/Raster/ChangeColorizerForRasterLayer/ReadMe.md b/Raster/ChangeColorizerForRasterLayer/ReadMe.md index b8ffafe5..2d8e0e11 100644 --- a/Raster/ChangeColorizerForRasterLayer/ReadMe.md +++ b/Raster/ChangeColorizerForRasterLayer/ReadMe.md @@ -18,7 +18,7 @@ Language: C# Subject: Raster Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Raster/Colorizer/Colorizer (C#).md b/Raster/Colorizer/Colorizer (C#).md index 03c7f1bd..e32f3a4a 100644 --- a/Raster/Colorizer/Colorizer (C#).md +++ b/Raster/Colorizer/Colorizer (C#).md @@ -13,7 +13,7 @@ Language: C# Subject: Raster Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2019 .NET Target Framework: 4.8 diff --git a/Raster/Colorizer/Config.daml b/Raster/Colorizer/Config.daml index 185934db..d37f68fb 100644 --- a/Raster/Colorizer/Config.daml +++ b/Raster/Colorizer/Config.daml @@ -1,4 +1,4 @@ - + - - + Shows all attribute columns for the selected Raster - No active map view, or no suitable raster in the TOC selected - + No active map view, or no suitable raster in the TOC selected diff --git a/Raster/Colorizer/ReadMe.md b/Raster/Colorizer/ReadMe.md index 03c7f1bd..e32f3a4a 100644 --- a/Raster/Colorizer/ReadMe.md +++ b/Raster/Colorizer/ReadMe.md @@ -13,7 +13,7 @@ Language: C# Subject: Raster Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2019 .NET Target Framework: 4.8 diff --git a/Raster/CustomRasterIdentify/Config.daml b/Raster/CustomRasterIdentify/Config.daml index 505571d6..1c3ed60d 100644 --- a/Raster/CustomRasterIdentify/Config.daml +++ b/Raster/CustomRasterIdentify/Config.daml @@ -1,4 +1,4 @@ - + - RasterSample RasterSample description Images\AddinDesktop32.png - ArcGIS Pro SDK Team, arcgisprosdk@esri.com + ArcGIS Pro SDK Team, arcgisprosdk@esri.com esri, http://www.esri.com 4/24/2017 10:46:14 AM, 2017 Raster @@ -49,4 +48,4 @@ - + \ No newline at end of file diff --git a/Raster/RasterInspector/RasterInspector (C#).md b/Raster/RasterInspector/RasterInspector (C#).md index 40bf05e0..d4df8de1 100644 --- a/Raster/RasterInspector/RasterInspector (C#).md +++ b/Raster/RasterInspector/RasterInspector (C#).md @@ -14,7 +14,7 @@ Language: C# Subject: Raster Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Raster/RasterInspector/RasterInspector.csproj b/Raster/RasterInspector/RasterInspector.csproj index 003f6327..59d770c8 100644 --- a/Raster/RasterInspector/RasterInspector.csproj +++ b/Raster/RasterInspector/RasterInspector.csproj @@ -41,8 +41,8 @@ C:\Program Files\ArcGIS\Pro\bin\Extensions\DataSourcesRaster\ArcGIS.Desktop.DataSourcesRaster.dll - - ..\..\packages\Gu.Wpf.DataGrid2D.0.2.1.6\lib\net45\Gu.Wpf.DataGrid2D.dll + + ..\..\packages\Gu.Wpf.DataGrid2D.0.2.3\lib\net45\Gu.Wpf.DataGrid2D.dll diff --git a/Raster/RasterInspector/ReadMe.md b/Raster/RasterInspector/ReadMe.md index 40bf05e0..d4df8de1 100644 --- a/Raster/RasterInspector/ReadMe.md +++ b/Raster/RasterInspector/ReadMe.md @@ -14,7 +14,7 @@ Language: C# Subject: Raster Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Raster/RasterInspector/packages.config b/Raster/RasterInspector/packages.config index 638c38f4..90f0ebe5 100644 --- a/Raster/RasterInspector/packages.config +++ b/Raster/RasterInspector/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file diff --git a/Raster/ScientificDataStatisticalAnalysis/Config.daml b/Raster/ScientificDataStatisticalAnalysis/Config.daml index e8f37fb3..c1dd756f 100644 --- a/Raster/ScientificDataStatisticalAnalysis/Config.daml +++ b/Raster/ScientificDataStatisticalAnalysis/Config.daml @@ -1,4 +1,4 @@ - + - - + - ScientificDataStatisticalAnalysis + ScientificDataStatisticalAnalysis An Add-in sample shows how to leverage the raster functions to simplify the statistial analysis of scientific data. Images\AddInDesktop32.png ArcGIS Pro SDK Team, arcgisprosdk@esri.com @@ -30,41 +25,29 @@ limitations under the License. - - + - + - - + Build your query or write your SQL expression through the Definition Query in the Layer Properties. - Examples: StdTime between date '2014-04-22 12:00:00 am' and date '2014-04-25 12:00:00 pm' - + Examples: StdTime between date '2014-04-22 12:00:00 am' and date '2014-04-25 12:00:00 pm' - - - - Select operation for statistical analysis. Do not have an active map view. - + + Select operation for statistical analysis. Do not have an active map view. - - - + \ No newline at end of file diff --git a/Raster/ScientificDataStatisticalAnalysis/ReadMe.md b/Raster/ScientificDataStatisticalAnalysis/ReadMe.md index 207272f9..d02dbbdb 100644 --- a/Raster/ScientificDataStatisticalAnalysis/ReadMe.md +++ b/Raster/ScientificDataStatisticalAnalysis/ReadMe.md @@ -18,7 +18,7 @@ Language: C# Subject: Raster Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Raster/ScientificDataStatisticalAnalysis/ScientificDataStatisticalAnalysis (C#).md b/Raster/ScientificDataStatisticalAnalysis/ScientificDataStatisticalAnalysis (C#).md index 207272f9..d02dbbdb 100644 --- a/Raster/ScientificDataStatisticalAnalysis/ScientificDataStatisticalAnalysis (C#).md +++ b/Raster/ScientificDataStatisticalAnalysis/ScientificDataStatisticalAnalysis (C#).md @@ -18,7 +18,7 @@ Language: C# Subject: Raster Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Samples.sln b/Samples.sln index e02e9aec..42bbaa7e 100644 --- a/Samples.sln +++ b/Samples.sln @@ -400,10 +400,20 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OverlayGroundSurface", "Map EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProWindowMVVM", "Framework\ProWindowMVVM\ProWindowMVVM.csproj", "{B649ED1A-E2F3-4EDB-9745-9334A2E1A8C0}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CreatePointsAlongLine3D", "Editing\CreatePointsAlongLine3D\CreatePointsAlongLine3D.csproj", "{CCE4B717-9AB5-4563-8054-9EC08E86E253}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LayerSnapModes", "Editing\LayerSnapModes\LayerSnapModes.csproj", "{6F4571D5-2DE7-4717-8C4C-51130C0B473B}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RubiksCube", "Geometry\RubiksCube\RubiksCube.csproj", "{BC601ABB-8C3B-4743-BF1A-54E50F9EFD79}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CreatePointsAlongLine3D", "Editing\CreatePointsAlongLine3D\CreatePointsAlongLine3D.csproj", "{CCE4B717-9AB5-4563-8054-9EC08E86E253}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GeometryControl", "Editing\GeometryControl\GeometryControl.csproj", "{448525A2-1F86-4436-B550-C1EACDC502DD}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DemoUseSelection", "Editing\DemoUseSelection\DemoUseSelection.csproj", "{8F8DF5E0-B1B7-404E-B4A0-6567EC27CDEF}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DisplayFilters", "Map-Authoring\DisplayFilters\DisplayFilters.csproj", "{219BA09D-CA22-4BA9-B8BF-AE490499A656}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GraphicsLayers", "Map-Authoring\GraphicsLayers\GraphicsLayers.csproj", "{3711865A-D5D9-4607-8A1B-659019D6C148}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -1972,14 +1982,14 @@ Global {B649ED1A-E2F3-4EDB-9745-9334A2E1A8C0}.Release|Any CPU.Build.0 = Release|Any CPU {B649ED1A-E2F3-4EDB-9745-9334A2E1A8C0}.Release|x64.ActiveCfg = Release|Any CPU {B649ED1A-E2F3-4EDB-9745-9334A2E1A8C0}.Release|x64.Build.0 = Release|Any CPU - {CCE4B717-9AB5-4563-8054-9EC08E86E253}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {CCE4B717-9AB5-4563-8054-9EC08E86E253}.Debug|Any CPU.Build.0 = Debug|Any CPU - {CCE4B717-9AB5-4563-8054-9EC08E86E253}.Debug|x64.ActiveCfg = Debug|Any CPU - {CCE4B717-9AB5-4563-8054-9EC08E86E253}.Debug|x64.Build.0 = Debug|Any CPU - {CCE4B717-9AB5-4563-8054-9EC08E86E253}.Release|Any CPU.ActiveCfg = Release|Any CPU - {CCE4B717-9AB5-4563-8054-9EC08E86E253}.Release|Any CPU.Build.0 = Release|Any CPU - {CCE4B717-9AB5-4563-8054-9EC08E86E253}.Release|x64.ActiveCfg = Release|Any CPU - {CCE4B717-9AB5-4563-8054-9EC08E86E253}.Release|x64.Build.0 = Release|Any CPU + {6F4571D5-2DE7-4717-8C4C-51130C0B473B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6F4571D5-2DE7-4717-8C4C-51130C0B473B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6F4571D5-2DE7-4717-8C4C-51130C0B473B}.Debug|x64.ActiveCfg = Debug|Any CPU + {6F4571D5-2DE7-4717-8C4C-51130C0B473B}.Debug|x64.Build.0 = Debug|Any CPU + {6F4571D5-2DE7-4717-8C4C-51130C0B473B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6F4571D5-2DE7-4717-8C4C-51130C0B473B}.Release|Any CPU.Build.0 = Release|Any CPU + {6F4571D5-2DE7-4717-8C4C-51130C0B473B}.Release|x64.ActiveCfg = Release|Any CPU + {6F4571D5-2DE7-4717-8C4C-51130C0B473B}.Release|x64.Build.0 = Release|Any CPU {BC601ABB-8C3B-4743-BF1A-54E50F9EFD79}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {BC601ABB-8C3B-4743-BF1A-54E50F9EFD79}.Debug|Any CPU.Build.0 = Debug|Any CPU {BC601ABB-8C3B-4743-BF1A-54E50F9EFD79}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -1988,6 +1998,46 @@ Global {BC601ABB-8C3B-4743-BF1A-54E50F9EFD79}.Release|Any CPU.Build.0 = Release|Any CPU {BC601ABB-8C3B-4743-BF1A-54E50F9EFD79}.Release|x64.ActiveCfg = Release|Any CPU {BC601ABB-8C3B-4743-BF1A-54E50F9EFD79}.Release|x64.Build.0 = Release|Any CPU + {CCE4B717-9AB5-4563-8054-9EC08E86E253}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CCE4B717-9AB5-4563-8054-9EC08E86E253}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CCE4B717-9AB5-4563-8054-9EC08E86E253}.Debug|x64.ActiveCfg = Debug|Any CPU + {CCE4B717-9AB5-4563-8054-9EC08E86E253}.Debug|x64.Build.0 = Debug|Any CPU + {CCE4B717-9AB5-4563-8054-9EC08E86E253}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CCE4B717-9AB5-4563-8054-9EC08E86E253}.Release|Any CPU.Build.0 = Release|Any CPU + {CCE4B717-9AB5-4563-8054-9EC08E86E253}.Release|x64.ActiveCfg = Release|Any CPU + {CCE4B717-9AB5-4563-8054-9EC08E86E253}.Release|x64.Build.0 = Release|Any CPU + {448525A2-1F86-4436-B550-C1EACDC502DD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {448525A2-1F86-4436-B550-C1EACDC502DD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {448525A2-1F86-4436-B550-C1EACDC502DD}.Debug|x64.ActiveCfg = Debug|Any CPU + {448525A2-1F86-4436-B550-C1EACDC502DD}.Debug|x64.Build.0 = Debug|Any CPU + {448525A2-1F86-4436-B550-C1EACDC502DD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {448525A2-1F86-4436-B550-C1EACDC502DD}.Release|Any CPU.Build.0 = Release|Any CPU + {448525A2-1F86-4436-B550-C1EACDC502DD}.Release|x64.ActiveCfg = Release|Any CPU + {448525A2-1F86-4436-B550-C1EACDC502DD}.Release|x64.Build.0 = Release|Any CPU + {8F8DF5E0-B1B7-404E-B4A0-6567EC27CDEF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8F8DF5E0-B1B7-404E-B4A0-6567EC27CDEF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8F8DF5E0-B1B7-404E-B4A0-6567EC27CDEF}.Debug|x64.ActiveCfg = Debug|Any CPU + {8F8DF5E0-B1B7-404E-B4A0-6567EC27CDEF}.Debug|x64.Build.0 = Debug|Any CPU + {8F8DF5E0-B1B7-404E-B4A0-6567EC27CDEF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8F8DF5E0-B1B7-404E-B4A0-6567EC27CDEF}.Release|Any CPU.Build.0 = Release|Any CPU + {8F8DF5E0-B1B7-404E-B4A0-6567EC27CDEF}.Release|x64.ActiveCfg = Release|Any CPU + {8F8DF5E0-B1B7-404E-B4A0-6567EC27CDEF}.Release|x64.Build.0 = Release|Any CPU + {219BA09D-CA22-4BA9-B8BF-AE490499A656}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {219BA09D-CA22-4BA9-B8BF-AE490499A656}.Debug|Any CPU.Build.0 = Debug|Any CPU + {219BA09D-CA22-4BA9-B8BF-AE490499A656}.Debug|x64.ActiveCfg = Debug|Any CPU + {219BA09D-CA22-4BA9-B8BF-AE490499A656}.Debug|x64.Build.0 = Debug|Any CPU + {219BA09D-CA22-4BA9-B8BF-AE490499A656}.Release|Any CPU.ActiveCfg = Release|Any CPU + {219BA09D-CA22-4BA9-B8BF-AE490499A656}.Release|Any CPU.Build.0 = Release|Any CPU + {219BA09D-CA22-4BA9-B8BF-AE490499A656}.Release|x64.ActiveCfg = Release|Any CPU + {219BA09D-CA22-4BA9-B8BF-AE490499A656}.Release|x64.Build.0 = Release|Any CPU + {3711865A-D5D9-4607-8A1B-659019D6C148}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3711865A-D5D9-4607-8A1B-659019D6C148}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3711865A-D5D9-4607-8A1B-659019D6C148}.Debug|x64.ActiveCfg = Debug|Any CPU + {3711865A-D5D9-4607-8A1B-659019D6C148}.Debug|x64.Build.0 = Debug|Any CPU + {3711865A-D5D9-4607-8A1B-659019D6C148}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3711865A-D5D9-4607-8A1B-659019D6C148}.Release|Any CPU.Build.0 = Release|Any CPU + {3711865A-D5D9-4607-8A1B-659019D6C148}.Release|x64.ActiveCfg = Release|Any CPU + {3711865A-D5D9-4607-8A1B-659019D6C148}.Release|x64.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/SceneLayers/SceneCalcTools/Config.daml b/SceneLayers/SceneCalcTools/Config.daml index 50937409..56f413d0 100644 --- a/SceneLayers/SceneCalcTools/Config.daml +++ b/SceneLayers/SceneCalcTools/Config.daml @@ -1,4 +1,4 @@ - + - + - + Measure the 'above' volume over a sketched base area - + Sketch a 'base' polygon to measure volume 'above' for - + diff --git a/SceneLayers/SceneCalcTools/ReadMe.md b/SceneLayers/SceneCalcTools/ReadMe.md index 711a0925..b920cd42 100644 --- a/SceneLayers/SceneCalcTools/ReadMe.md +++ b/SceneLayers/SceneCalcTools/ReadMe.md @@ -13,7 +13,7 @@ Language: C# Subject: SceneLayers Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/SceneLayers/SceneCalcTools/SceneCalcTools (C#).md b/SceneLayers/SceneCalcTools/SceneCalcTools (C#).md index 711a0925..b920cd42 100644 --- a/SceneLayers/SceneCalcTools/SceneCalcTools (C#).md +++ b/SceneLayers/SceneCalcTools/SceneCalcTools (C#).md @@ -13,7 +13,7 @@ Language: C# Subject: SceneLayers Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Sharing/CreateFeatureService/Config.daml b/Sharing/CreateFeatureService/Config.daml index cde6f39c..433bcd7e 100644 --- a/Sharing/CreateFeatureService/Config.daml +++ b/Sharing/CreateFeatureService/Config.daml @@ -1,4 +1,4 @@ - + - - + + \ No newline at end of file diff --git a/Sharing/LivingAtlasOfTheWorld/LivingAtlasOfTheWorld (C#).md b/Sharing/LivingAtlasOfTheWorld/LivingAtlasOfTheWorld (C#).md index 5f283e9b..19f5f8e5 100644 --- a/Sharing/LivingAtlasOfTheWorld/LivingAtlasOfTheWorld (C#).md +++ b/Sharing/LivingAtlasOfTheWorld/LivingAtlasOfTheWorld (C#).md @@ -13,7 +13,7 @@ Language: C# Subject: Sharing, Content Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Sharing/LivingAtlasOfTheWorld/ReadMe.md b/Sharing/LivingAtlasOfTheWorld/ReadMe.md index 5f283e9b..19f5f8e5 100644 --- a/Sharing/LivingAtlasOfTheWorld/ReadMe.md +++ b/Sharing/LivingAtlasOfTheWorld/ReadMe.md @@ -13,7 +13,7 @@ Language: C# Subject: Sharing, Content Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Sharing/SOEWithPropertiesTest/Config.daml b/Sharing/SOEWithPropertiesTest/Config.daml index b18b0341..a68f372d 100644 --- a/Sharing/SOEWithPropertiesTest/Config.daml +++ b/Sharing/SOEWithPropertiesTest/Config.daml @@ -1,4 +1,4 @@ - + - + diff --git a/UtilityNetwork/LoadReportSample/LoadReportSample (C#).md b/UtilityNetwork/LoadReportSample/LoadReportSample (C#).md index ccbd7ec7..2351e44f 100644 --- a/UtilityNetwork/LoadReportSample/LoadReportSample (C#).md +++ b/UtilityNetwork/LoadReportSample/LoadReportSample (C#).md @@ -17,7 +17,7 @@ Language: C# Subject: UtilityNetwork Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/UtilityNetwork/LoadReportSample/README.md b/UtilityNetwork/LoadReportSample/README.md index ccbd7ec7..2351e44f 100644 --- a/UtilityNetwork/LoadReportSample/README.md +++ b/UtilityNetwork/LoadReportSample/README.md @@ -17,7 +17,7 @@ Language: C# Subject: UtilityNetwork Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Workflow/JobManagement/Config.daml b/Workflow/JobManagement/Config.daml index 04585782..f8cf5fc6 100644 --- a/Workflow/JobManagement/Config.daml +++ b/Workflow/JobManagement/Config.daml @@ -1,4 +1,4 @@ - + - - + WorkflowManagerConfigSample WorkflowManagerConfigSample description Images\AddinDesktop32.png - ArcGIS Pro SDK Team, arcgisprosdk@esri.com - esri, http://www.esri.com + ArcGIS Pro SDK Team, arcgisprosdk@esri.com + esri, http://www.esri.com 8/2/2017 1:41:37 PM, 2017 Workflow - - + - @@ -41,15 +34,10 @@ --> - - - - - + - @@ -59,6 +47,5 @@ - - + \ No newline at end of file diff --git a/Workflow/WorkflowManagerConfigSample/ReadMe.md b/Workflow/WorkflowManagerConfigSample/ReadMe.md index 314c5c03..5b7c7273 100644 --- a/Workflow/WorkflowManagerConfigSample/ReadMe.md +++ b/Workflow/WorkflowManagerConfigSample/ReadMe.md @@ -13,7 +13,7 @@ Language: C# Subject: Workflow Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8 diff --git a/Workflow/WorkflowManagerConfigSample/WorkflowManagerConfigSample (C#).md b/Workflow/WorkflowManagerConfigSample/WorkflowManagerConfigSample (C#).md index 314c5c03..5b7c7273 100644 --- a/Workflow/WorkflowManagerConfigSample/WorkflowManagerConfigSample (C#).md +++ b/Workflow/WorkflowManagerConfigSample/WorkflowManagerConfigSample (C#).md @@ -13,7 +13,7 @@ Language: C# Subject: Workflow Contributor: ArcGIS Pro SDK Team Organization: Esri, http://www.esri.com -Date: 7/10/2020 +Date: 7/01/2020 ArcGIS Pro: 2.6 Visual Studio: 2017, 2019 .NET Target Framework: 4.8