|
POST
|
No I don't mean that. I mean my actual project/add-in. Its huge from version 2.x of Pro. If I have to start a new addin project and copy in all the code and start again - thats a real pain in the backside!
... View more
01-25-2023
07:14 AM
|
0
|
1
|
1873
|
|
POST
|
Where do you begin with this sort of stuff?! I did the migration process, but who knows if its done it 100% right. It would seem it hasn't ported cleanly. I really don't want to start remaking all over project again.
... View more
01-25-2023
06:59 AM
|
0
|
3
|
1877
|
|
POST
|
I have a maptool where I just place a marker on a map. Nothing else, no other business logic. The marker is placed fine, however - when you look at the debug the amount of exceptions thrown from ArcGIS.Dektop.Mapping.dll is concerning. What is going on here, should this be happening? Here is my simple code: internal class FooTool : MapTool
{
private IDisposable _graphic = null;
public FooTool()
{
IsSketchTool = true;
SketchType = SketchGeometryType.Point;
SketchOutputMode = SketchOutputMode.Map;
}
protected override async Task<bool> OnSketchCompleteAsync(ArcGIS.Core.Geometry.Geometry geometry)
{
try
{
MapPoint mapPoint = (MapPoint)geometry;
await QueuedTask.Run(() =>
{
var mapView = MapView.Active;
//Show marker
if (_graphic != null)
{
_graphic.Dispose();
}
_graphic = mapView.AddOverlay(mapPoint, SymbolFactory.Instance.ConstructPointSymbol(ColorFactory.Instance.BlueRGB, 14, SimpleMarkerStyle.Pushpin).MakeSymbolReference());
});
}
catch (ArgumentException ae)
{
ArcGIS.Desktop.Framework.Dialogs.MessageBox.Show(ae.Message, "Tool error");
}
catch (Exception ex)
{
Log.Error(ex);
}
return true;
}
}
... View more
01-25-2023
05:46 AM
|
0
|
7
|
1925
|
|
POST
|
Hi, We, as a company are facing a serious limitation which is having an impact on the add-in software we supply to our customers. We need to be able to search AGOL for items (Layers) that exceed the 10000 limit - we have around 33,000 items we want to return. This is my code which hits the hard limit of 10,000 - it uses pagination. private static async Task<HashSet<AgolLayer>> GetLayersFromAGOL(string search)
{
var portal = ArcGISPortalManager.Current.GetActivePortal();
HashSet<AgolLayer> agolLayers = new HashSet<AgolLayer>(new AgolIdComparer());
if (portal.IsSignedOn())
{
var query = PortalQueryParameters.CreateForItemsOfTypes(new List<PortalItemType>() { PortalItemType.Layer }, "", Properties.Settings.Default.CurrentGroupId, search);
query.Limit = 100;
query.Query = query.Query + "&sortField=modified&sortOrder=desc";
//Loop until done
var portalItems = new List<PortalItem>();
while (query != null)
{
//run the search
PortalQueryResultSet<PortalItem> results = await portal.SearchForContentAsync(query);
portalItems.AddRange(results.Results);
totalResultsCount = results.TotalResultsCount;
query = results.NextQueryParameters;
}
foreach (var pi in portalItems)
{
AgolLayer agolLayer = new AgolLayer(pi);
agolLayers.Add(agolLayer);
}
}
return agolLayers;
} Is there a way around this limitation? Some links (below) back the findings I am referring to: https://developers.arcgis.com/rest/users-groups-and-items/considerations-and-limitations.htm
... View more
01-18-2023
06:27 AM
|
0
|
3
|
1936
|
|
POST
|
It does actually. However the code I left out was a line that created a row in a database (a method that is not async) based on findings earlier on i.e. the alias name. I think this may be the bit of code that is causing the code to not run properly.
... View more
11-14-2022
03:18 AM
|
0
|
0
|
2180
|
|
POST
|
You're right it does work. I have simplified what I have done - so I guess I'll take it from there and build it up in complexity and see what is causing the problem.
... View more
11-14-2022
02:09 AM
|
0
|
2
|
2190
|
|
POST
|
Updated - not really anything special to call code.
... View more
11-14-2022
01:36 AM
|
0
|
4
|
2194
|
|
POST
|
Hi, I'm trying to go through each layer in the TOC and do get the alias name of the layer then do something that name. In order to this - I have a recursive method that loops - however you need to await QueuedTask.Run() the call to get information about an alias in layer - and in a recursive function something weird is happening - as this only gets called once and never breaks into that Queued Task code block again. Something is happening here thats a bit beyond me when it gets to asynchronous programming - can anyone help me find a way to get this recursive function to work properly? //calling code:
var map = MapView.Active.Map;
foreach (var item in map.Layers)
{
await RecurseTocLayers(item);
}
private async Task RecurseTocLayers(Layer layer)
{
if (layer is BasicFeatureLayer)
{
FeatureLayer featureLayer = layer as FeatureLayer;
//THIS ONLY GETS CALLED ONCE - THEN NEVER AGAIN!
await QueuedTask.Run(() =>
{
var table = featureLayer.GetTable();
TableDefinition tableDefinition = table.GetDefinition();
string alias = tableDefinition.GetAliasName();
//do something here with alias name.....e.g.
System.Diagnostics.Debug.WriteLine($"The alias name is: {alias}");
});
}
if (layer is GroupLayer)
{
//do something here with GroupLayer, then....
GroupLayer groupLayer = (GroupLayer)layer;
foreach (var child in groupLayer.Layers)
{
await RecurseTocLayers(child);
}
}
} ASDFDSAF
... View more
11-13-2022
05:14 AM
|
0
|
7
|
2249
|
|
POST
|
This should be simple, however I can't seem to find how you can get the alias name of a featureclass. I am going though the layers in the TOC, I think they are FeatureLayer type when you are looping, but no obvious way to find the alias.
... View more
10-19-2022
12:44 PM
|
0
|
4
|
2428
|
|
POST
|
Yes, I had googled and found the same result/thread (before I posted on this forum). I have followed advice for deleting the DesignTimeBuild folder - but that doesn't get rid of the error. Apart from manually rebuilding the project afresh, I can't think of anything to get rid of this error. This may be a bug with Visual Studio 2022 and nothing to do with ESRI add-in project templates in any case. Would be interesting to know if this has happened to other people once they have migrated their projects to 3.
... View more
10-14-2022
04:31 AM
|
0
|
0
|
2445
|
|
POST
|
After migrating my 2.x project to 3.x - I keep getting these annoying XDG0062 errors in the xaml. They don't stop the project from working but they are annoying to see. Sometimes they go away and then they come back. Anyone know whats going on?
... View more
10-12-2022
08:50 AM
|
0
|
2
|
2486
|
|
POST
|
Yes this is rubbish by ESRI - they need to re-instate this. Its just not helpful at all.
... View more
10-12-2022
08:43 AM
|
0
|
0
|
2522
|
|
POST
|
If only it were that simple - you just end up screwing up the whole project. There is some dependency conflict going on here - and I've spent far too long trying to find out what's going on here.
... View more
10-10-2022
01:47 AM
|
0
|
0
|
719
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 12-17-2025 03:28 AM | |
| 1 | 12-18-2023 10:11 AM | |
| 1 | 08-22-2025 02:27 AM | |
| 2 | 12-19-2023 01:36 AM | |
| 1 | 12-21-2023 04:02 AM |
| Online Status |
Offline
|
| Date Last Visited |
2 weeks ago
|