diff --git a/Backup-2.x.zip b/Backup-2.x.zip new file mode 100644 index 0000000..733705c Binary files /dev/null and b/Backup-2.x.zip differ diff --git a/Button/ButtonConfig.cs b/Button/ButtonConfig.cs index 15fe141..1bef364 100644 --- a/Button/ButtonConfig.cs +++ b/Button/ButtonConfig.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; +using System.Windows.Controls; using ArcGIS.Core.CIM; using ArcGIS.Core.Data; using ArcGIS.Core.Geometry; @@ -18,6 +19,7 @@ using ArcGIS.Desktop.Framework.Threading.Tasks; using ArcGIS.Desktop.Mapping; using OliviaAddInPro.Helper; using OliviaAddInPro.Model; +using Button = ArcGIS.Desktop.Framework.Contracts.Button; namespace OliviaAddInPro { diff --git a/Config.daml b/Config.daml index 69da287..b6a11ff 100644 --- a/Config.daml +++ b/Config.daml @@ -1,5 +1,6 @@ - - + + + OliviaAddInPro AddIn de Optimización de la Limpieza Viaria para ArcGIs Pro Images\AddinDesktop32.png @@ -16,17 +17,17 @@ - + + diff --git a/Helper/HelperGdb.cs b/Helper/HelperGdb.cs index 24bceda..23f93cb 100644 --- a/Helper/HelperGdb.cs +++ b/Helper/HelperGdb.cs @@ -13,7 +13,6 @@ using ArcGIS.Core.Data; using ArcGIS.Desktop.Mapping; using ArcGIS.Core.Internal.CIM; using ArcGIS.Desktop.Internal.Layouts.Utilities; - using ArcGIS.Desktop.Core.Geoprocessing; using ArcGIS.Desktop.Framework.Threading.Tasks; using ArcGIS.Desktop.Editing; @@ -25,6 +24,7 @@ using OliviaAddInPro.Model.contract; using ArcGIS.Core.Data.DDL; using ArcGIS.Core.CIM; using System.Threading; +using ArcGIS.Core.Data.Exceptions; namespace OliviaAddInPro.Helper { @@ -625,7 +625,7 @@ namespace OliviaAddInPro.Helper if (filt == null) filt = new ArcGIS.Core.Data.QueryFilter(); sel = fc.Select(filt, SelectionType.ObjectID, SelectionOption.Normal); - int nsel = sel.GetCount(); + long nsel = sel.GetCount(); IReadOnlyList ids_ = sel.GetObjectIDs(); ids = ids_.ToList(); return ids; @@ -656,7 +656,7 @@ namespace OliviaAddInPro.Helper if (filt == null) filt = new ArcGIS.Core.Data.QueryFilter(); sel = fc.Select(filt, SelectionType.ObjectID, SelectionOption.Normal); - int nsel = sel.GetCount(); + var nsel = sel.GetCount(); IReadOnlyList ids_ = sel.GetObjectIDs(); ids = ids_.ToList(); return ids; @@ -966,7 +966,7 @@ namespace OliviaAddInPro.Helper * Devuelve una geometría que es la suma de la inicial y la que se añade Add */ public static ArcGIS.Core.Geometry.Geometry IntersectGeom(ArcGIS.Core.Geometry.Geometry geomIni, ArcGIS.Core.Geometry.Geometry geomInters, - GeometryDimension resultDimension = GeometryDimension.esriGeometryNoDimension) + GeometryDimensionType resultDimension = GeometryDimensionType.EsriGeometryUnknownDimension)//esriGeometryNoDimension) { if (geomIni == null) return geomInters; @@ -975,7 +975,7 @@ namespace OliviaAddInPro.Helper ArcGIS.Core.Geometry.Geometry geomSal = null; try { - if (resultDimension == GeometryDimension.esriGeometryNoDimension) + if (resultDimension == GeometryDimensionType.EsriGeometryUnknownDimension)//GeometryDimension.esriGeometryNoDimension) geomSal = GeometryEngine.Instance.Intersection(geomIni, geomInters); else geomSal = GeometryEngine.Instance.Intersection(geomIni, geomInters, resultDimension); @@ -1166,11 +1166,11 @@ namespace OliviaAddInPro.Helper /** * Devuelve el número de entidades de una FeatureClass que cumplen la consulta, o todos si la consulta es empty */ - public static int GetNumElems(string pathGdb, string ftclssName, string consulta = "") + public static long GetNumElems(string pathGdb, string ftclssName, string consulta = "") { Geodatabase gdb = GetGdb(pathGdb).Result; FeatureClass fc = null; - int n = -1; + long n = -1; if (gdb != null) { fc = GetFtClass(ftclssName, gdb).Result; @@ -1223,11 +1223,11 @@ namespace OliviaAddInPro.Helper /** * Devuelve el número de entidades de una FeatureClass que cumplen la consulta, o todos si la consulta es empty */ - public static Task GetNumElems(FeatureClass fc, string consulta = "") + public static Task GetNumElems(FeatureClass fc, string consulta = "") { - int n = -1; + long n = -1; ReiniciaOutStr(); - return ArcGIS.Desktop.Framework.Threading.Tasks.QueuedTask.Run((Func)(() => + return ArcGIS.Desktop.Framework.Threading.Tasks.QueuedTask.Run((Func)(() => { try { @@ -1257,9 +1257,9 @@ namespace OliviaAddInPro.Helper /** * Devuelve el número de entidades de una FeatureClass que cumplen la consulta, o todos si la consulta es empty */ - public static int GetNumElemsSync(FeatureClass fc, string consulta = "") + public static long GetNumElemsSync(FeatureClass fc, string consulta = "") { - int n = -1; + long n = -1; ReiniciaOutStr(); try { @@ -1288,17 +1288,17 @@ namespace OliviaAddInPro.Helper /** * Devuelve el número de entidades de una FeatureClass que cumplen la consulta, o todos si la consulta es empty */ - public static int GetNumElems(string pathFtClss, string consulta = "") + public static long GetNumElems(string pathFtClss, string consulta = "") { FeatureClass fc = GetFtClass(pathFtClss); - int n = GetNumElems(fc, consulta).Result; + var n = GetNumElems(fc, consulta).Result; Free(fc); return n; } - public static int GetNumElemsSync(string pathFtClss, string consulta = "") + public static long GetNumElemsSync(string pathFtClss, string consulta = "") { FeatureClass fc = GetFtClassSync(pathFtClss); - int n = GetNumElemsSync(fc, consulta); + var n = GetNumElemsSync(fc, consulta); Free(fc); return n; } @@ -1902,7 +1902,7 @@ namespace OliviaAddInPro.Helper geom = f.GetShape(); line = (ArcGIS.Core.Geometry.Polyline)geom; longi_tot = line.Length; - geom = IntersectGeom(geom_zon, line, GeometryDimension.esriGeometry1Dimension); + geom = IntersectGeom(geom_zon, line, GeometryDimensionType.EsriGeometry1Dimension);//GeometryDimension.esriGeometry1Dimension); line = (ArcGIS.Core.Geometry.Polyline)geom; longi_zon = line.Length;//se consigue la longitud de ámbito (linea) que interseca con el nivel) if ((longi_zon / longi_tot) < porc) @@ -2462,7 +2462,8 @@ namespace OliviaAddInPro.Helper //{ try { - String[] fields = new string[] { field }; //field to be used to retrieve unique values + List fields = new List(); + fields.Add(field); UniqueValueRendererDefinition uniqueValueRendererDef; CIMSymbolReference symbolTemplate=new CIMSymbolReference(); if (tipo == GeometryType.Point)//puntual diff --git a/Migration-2022-12-19_22-09-22.html b/Migration-2022-12-19_22-09-22.html new file mode 100644 index 0000000..5f8cfad --- /dev/null +++ b/Migration-2022-12-19_22-09-22.html @@ -0,0 +1,16 @@ + + + + +

Migration Status Report

+

Migrate project: D:\desa\v2019\OliviaAddInPro\OliviaAddInPro.csproj

+

OliviaAddInPro.csproj

+ +
    language: CS
+

Warning: this project [D:\desa\v2019\OliviaAddInPro\] contains References to 'ArcGIS.Core', but the HintPath tag is wrong or missing. Use the 'Pro Fix References utility' before migrating this project.

+
    project type: NonArcGIS
+
    project has WPF: PresentationFramework
+

Note: project might contain NuGets in packages.config, please check all NuGets for the most up-to-date .NET variant and if needed, replace with a NuGet that supports .NET 6.

+

Note: please check all NuGets for the most up-to-date .NET variant and if needed, replace with a NuGet that supports .NET 6.

+ + \ No newline at end of file diff --git a/Migration-2022-12-19_22-09-22.txt b/Migration-2022-12-19_22-09-22.txt new file mode 100644 index 0000000..a23827d --- /dev/null +++ b/Migration-2022-12-19_22-09-22.txt @@ -0,0 +1,12 @@ +Migration Status Report + Migrate project: D:\desa\v2019\OliviaAddInPro\OliviaAddInPro.csproj + OliviaAddInPro.csproj + project folder: + D:\desa\v2019\OliviaAddInPro\ + D:\desa\v2019\OliviaAddInPro\ + language: CS + Warning: this project [D:\desa\v2019\OliviaAddInPro\] contains References to 'ArcGIS.Core', but the HintPath tag is wrong or missing. Use the 'Pro Fix References utility' before migrating this project. + project type: NonArcGIS + project has WPF: PresentationFramework + Note: project might contain NuGets in packages.config, please check all NuGets for the most up-to-date .NET variant and if needed, replace with a NuGet that supports .NET 6. + Note: please check all NuGets for the most up-to-date .NET variant and if needed, replace with a NuGet that supports .NET 6. diff --git a/OliviaAddInPro.csproj b/OliviaAddInPro.csproj index 91ffcd5..58ded03 100644 --- a/OliviaAddInPro.csproj +++ b/OliviaAddInPro.csproj @@ -1,406 +1,152 @@  - + - Debug - AnyCPU - 8.0.30703 - 2.0 - {10742570-CF59-42F2-BEA2-2A38002A06EE} - Library - Properties - OliviaAddInPro - OliviaAddInPro - v4.8 - 512 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - - $([MSBuild]::GetRegistryValueFromView('HKEY_LOCAL_MACHINE\SOFTWARE\ESRI\ArcGISPro', 'InstallDir', null, RegistryView.Registry64)) - $(registry:HKEY_CURRENT_USER\SOFTWARE\ESRI\ArcGISPro@InstallDir) - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 0 - Program - $(ArcGISFolder)\bin\ArcGISPro.exe - x64 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - Program - $(ArcGISFolder)\bin\ArcGISPro.exe - AnyCPU + net6.0-windows + win10-x64 + false + true + false + CA1416 + true + True - - packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll - - - - - - - - - - - - - - - $(ArcGISFolder)\bin\ArcGIS.Desktop.Framework.dll - False - - - $(ArcGISFolder)\bin\ArcGIS.Core.dll - False - - - $(ArcGISFolder)\bin\Extensions\Core\ArcGIS.Desktop.Core.dll - False - - - $(ArcGISFolder)\bin\Extensions\Mapping\ArcGIS.Desktop.Mapping.dll - False - - - $(ArcGISFolder)\bin\Extensions\Catalog\ArcGIS.Desktop.Catalog.dll - False - - - $(ArcGISFolder)\bin\Extensions\Editing\ArcGIS.Desktop.Editing.dll - False - - - $(ArcGISFolder)\bin\Extensions\DesktopExtensions\ArcGIS.Desktop.Extensions.dll - False - - - $(ArcGISFolder)\bin\Extensions\GeoProcessing\ArcGIS.Desktop.GeoProcessing.dll - False - - - $(ArcGISFolder)\bin\Extensions\Layout\ArcGIS.Desktop.Layouts.dll - False - - - $(ArcGISFolder)\bin\ArcGIS.Desktop.Shared.Wpf.dll - False - - - $(ArcGISFolder)\bin\ArcGIS.Desktop.Ribbon.Wpf.dll - False - - - $(ArcGISFolder)\bin\ArcGIS.Desktop.DataGrid.Contrib.Wpf.dll - False - - - $(ArcGISFolder)\bin\ArcGIS.Desktop.Resources.dll - False - - - $(ArcGISFolder)\bin\ArcGIS.Desktop.Resources.dll - False - - - $(ArcGISFolder)\bin\ESRI.ArcGIS.ItemIndex.dll - False - - - False - ..\bin\Release\Xceed.Wpf.Toolkit.dll - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - MarchandoUnaDe.xaml - - - PropertyGridFilePickerFolder.xaml - - - PropertyGridFilePickerDataset.xaml - - - PropertyGridFilePickerLine.xaml - - - PropertyGridFilePickerGDB.xaml - - - PaneRecogidaSub1.xaml - - - PaneRecogida.xaml - - - - DockPaneConfig.xaml - - - PaneConfigView.xaml - - - PaneEjecutar.xaml - - - PaneLimpiezaSub4.xaml - - - PaneLimpiezaSub3.xaml - - - PaneLimpiezaSub2.xaml - - - PaneLimpiezaSub1.xaml - - - - PaneLimpieza.xaml - - - DockpaneLimpieza.xaml - - - - DockpaneRecogida.xaml - - - - - - - True - True - Resource1.resx - - - ProWndSelectFields.xaml - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - - - Designer - MSBuild:Compile - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - Designer - MSBuild:Compile - - - MSBuild:Compile - Designer - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - - - - - - - - - ResXFileCodeGenerator - Resource1.Designer.cs - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - BuildDefault - true - - - BuildDefault - true - - - - - - - - + + + + + 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\Layout\ArcGIS.Desktop.Layouts.dll + + + 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\ArcGIS.Desktop.Shared.Wpf.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 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + True + Resource1.resx + + + \ No newline at end of file diff --git a/OliviaAddInPro.csproj.bak b/OliviaAddInPro.csproj.bak index cf1cf44..91ffcd5 100644 --- a/OliviaAddInPro.csproj.bak +++ b/OliviaAddInPro.csproj.bak @@ -25,7 +25,7 @@ bin\Debug\ DEBUG;TRACE prompt - 4 + 0 Program $(ArcGISFolder)\bin\ArcGISPro.exe x64 @@ -117,8 +117,9 @@ $(ArcGISFolder)\bin\ESRI.ArcGIS.ItemIndex.dll False - - ..\wpftoolkit-master\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit\bin\Release\Xceed.Wpf.Toolkit.dll + + False + ..\bin\Release\Xceed.Wpf.Toolkit.dll @@ -139,6 +140,7 @@ + @@ -150,15 +152,14 @@ -<<<<<<< HEAD + -======= - ->>>>>>> Elena/reco + + @@ -169,6 +170,21 @@ + + MarchandoUnaDe.xaml + + + PropertyGridFilePickerFolder.xaml + + + PropertyGridFilePickerDataset.xaml + + + PropertyGridFilePickerLine.xaml + + + PropertyGridFilePickerGDB.xaml + PaneRecogidaSub1.xaml @@ -236,6 +252,26 @@ + + Designer + MSBuild:Compile + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + Designer + MSBuild:Compile + MSBuild:Compile Designer @@ -301,9 +337,6 @@ Resource1.Designer.cs - - - @@ -328,17 +361,18 @@ -<<<<<<< HEAD - -======= - ->>>>>>> Elena/reco + + + + + +