|
POST
|
Uma, I think I am narrowing it down, I went into the ArcGISPro.exe.config and changed to <supportedRuntime version="v4.0.30319" sku=".NETFramework,Version=v4.6.1"/> Now all the add-ins I built work great but the out of the box ones do not. I assume there is a setting in VS where I can set the framework version or write the correct one into the code somewhere? If you have any experience or knowledge in this area I would appreciate the help, I am at a loss when I have to start getting into the XML system files. ArcObjects Help for .NET developers https://gis.stackexchange.com/questions/13606/why-cant-the-breakpoint-be-hit-when-debugging-an-arcgis-10-add-in#16206
... View more
02-19-2019
02:13 PM
|
0
|
0
|
1315
|
|
POST
|
I renamed the root folders and reinstalled the software and it has helped a lot. Still a bit slow but manageable. using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ArcGIS.Core.Geometry;
using ArcGIS.Desktop.Mapping;
namespace MapToolSelect
{
internal class MapToolSelect : MapTool
{
public MapToolSelect()
{
IsSketchTool = true;
SketchType = SketchGeometryType.Rectangle;
SketchOutputMode = SketchOutputMode.Screen;
}
protected override Task OnToolActivateAsync(bool active)
{
return base.OnToolActivateAsync(active);
}
protected override Task<bool> OnSketchCompleteAsync(Geometry geometry)
{
return ArcGIS.Desktop.Framework.Threading.Tasks.QueuedTask.Run(() =>
{
// Using the active map view to select
// the features that intersect the sketch geometry
ActiveMapView.SelectFeatures(geometry);
return true;
});
}
}
}
... View more
02-19-2019
12:24 PM
|
0
|
0
|
1315
|
|
POST
|
Correct. Normal out of the box works fine. My custom code and the ESRI samples code downloaded from GitHub fails. Worked fine in 2.2.
... View more
02-19-2019
11:40 AM
|
0
|
3
|
1315
|
|
POST
|
No exception thrown. It sits and spins for 5-10 minutes, all others tools are grayed out, the refresh spins, and nothing gets selected. All features are in a sde database.
... View more
02-19-2019
11:18 AM
|
0
|
5
|
1315
|
|
POST
|
The process to select by using Sketch tools is not working in 2.3. I double checked to make sure it was not just my code by downloading a fresh set of the samples from here GitHub - Esri/arcgis-pro-sdk-community-samples: ArcGIS Pro SDK for Microsoft .NET Framework Community Samples and ran of the Feature Selection and the Map Tool Select without changing a thing and they both fail. Is there a known fix to this?
... View more
02-19-2019
10:22 AM
|
0
|
7
|
1797
|
|
POST
|
This worked, calling just the name of the feature class and not the whole path. I was wanting the default database. Thank you for sticking with me Rich!
... View more
01-22-2019
10:50 AM
|
1
|
0
|
3991
|
|
POST
|
This does not seem to successfully get a list of the feature class either, it returns the definitions but not the actual name. I cannot find any examples of doing this in the snippets or help either. Probably going to switch to python to do this task, but I would like to avoid that because python takes a lot longer to run.
... View more
01-22-2019
09:07 AM
|
0
|
3
|
3991
|
|
POST
|
Thanks Rich! I did mean feature class, I corrected the question. When I tried your suggestion I get the error "Non-invocable member ;FeatureClassDefinition' cannot be used like a method. Below is what I ended up trying, it runs without error, but it still does not see the feature class when it does exist. string projGDBPath = Project.Current.DefaultGeodatabasePath;
string FC = TXB.Text; // From a text box in the xaml
string fcFINAL = System.IO.Path.Combine(projGDBPath, FC);
await ArcGIS.Desktop.Framework.Threading.Tasks.QueuedTask.Run(() => {
using (Geodatabase geodatabase = new Geodatabase(new FileGeodatabaseConnectionPath(new Uri(projGDBPath))))
{
try
{
FeatureClassDefinition featureClassDefinition = geodatabase.GetDefinition<FeatureClassDefinition>(fcFINAL);
featureClassDefinition.Dispose();
ArcGIS.Desktop.Framework.Dialogs.MessageBox.Show("It exists");
}
catch
{
ArcGIS.Desktop.Framework.Dialogs.MessageBox.Show("It Does Not Exist");
}
}
});
... View more
01-22-2019
07:44 AM
|
0
|
5
|
3991
|
|
POST
|
Is there a way to see if a feature class exists in a file geodatabase OR loop through and get a list of all the feature class in a file geodatabase using the Pro SDK?
... View more
01-18-2019
12:43 PM
|
0
|
7
|
4421
|
|
POST
|
There really is no "migration" of add-ins from Desktop to Pro. It really is a completely different SDK, so no comparing apples to apples. This was the first question I asked when I took the Pro SDK class, hoping it would be a simple change of a couple things in my add-ins. Python is very similar in both, but the Pro SDK and ArcObjects are very different. Just dive in and start from scratch, it is not too difficult to pick up the Pro SDK. I had about a dozen add-ins to redo from Desktop to Pro and was able to find a way to replicate all them. Good Luck!
... View more
01-17-2019
07:12 AM
|
0
|
0
|
5115
|
|
POST
|
Thanks Dan. I think I will try to create a add-in to run the script tool, then add the layer using the add-in (if possible) after the scripts runs as a workaround. Edit: Using an add-in ended up being a satisfactory work around for me.
... View more
01-15-2019
01:44 PM
|
0
|
0
|
3951
|
|
POST
|
So are you saying that this is not possible in Pro with python? I tried to test it keeping it simple of using the CURRENT, creating a feature class in the default database and then try adding it. It always fails with the message being that the new feature class does not exists. If I do the exact same lines one by one in Pro python window it will work fine. But doing this in a script or a python toolbox script tool it fails. So this is just not possible in Pro? This is a straight forward work flow, and it is not an option?
... View more
01-15-2019
01:12 PM
|
0
|
2
|
3951
|
|
POST
|
Is there a way to refresh a database in a python script in Pro? I have a script where I create a new feature class in the default database and want to add that data to the map at the end of the script. It seems it does not recognize this new feature class until after the script is complete. I am wanting to use addDataFromPath.
... View more
01-15-2019
11:11 AM
|
0
|
4
|
4549
|
| Title | Kudos | Posted |
|---|---|---|
| 2 | 4 weeks ago | |
| 1 | a month ago | |
| 1 | 04-12-2021 09:58 AM | |
| 2 | 03-18-2025 10:32 AM | |
| 1 | 07-28-2020 11:56 AM |
| Online Status |
Offline
|
| Date Last Visited |
3 weeks ago
|