POST
|
Haven't tried this with 3.0, but for 2.9 you need to pass false to GetCustomAttributes instead of true. // ...
var idAttribute = Assembly.GetExecutingAssembly().GetCustomAttributes(false).OfType<GuidAttribute>().FirstOrDefault();
if (idAttribute == null) return string.Empty;
var id = idAttribute.Value;
if (!Guid.TryParse(id, out var guid)) return string.Empty;
// ...
... View more
07-12-2022
11:04 AM
|
0
|
1
|
1073
|
POST
|
Based on this quote from the 4.17 release notes, does this mean that the entirety of 4.18 will not work in IE11 or that only new features will not work? It reads as if the whole API won't work, but I'd like to make sure. Version 4.17 will be the last release with support for Internet Explorer 11 and Edge Legacy browsers. This means that apps built with 4.18 (and beyond) will not function in IE11/Edge Legacy.
... View more
10-19-2020
08:38 AM
|
1
|
2
|
1201
|
POST
|
ArcGIS Enterprise Any ideas on this? The only thing I've discovered that works is to uninstall Desktop and Server 10.6.1, install 10.6, publish the services, then re-upgrade to 10.6.1. This is obviously nowhere near sustainable, so any help is greatly appreciated!
... View more
10-08-2020
01:11 PM
|
0
|
0
|
763
|
POST
|
Shameless bump :-). I was hoping this would be implemented in 2.6, but I still can't find any way to do it. Tim Whiteaker alluded to this in How to refresh a layer's chart list in the map's table of contents, which is now marked as answered, so any additional guidance would be super helpful. According to the Live Visual Tree in VS2019, charts use a ChartPaneView, which is an internal class. Can this be made public? Alternatively, can we access the TOC item and simulate a double-click? We have an ArcMap workflow where users can create multiple charts on the same feature class, and we have a manager that allows them to open, delete, etc. We are unable to migrate this to Pro because we can't open the charts directly through code. Our current workaround is to include verbiage on the manager UI so the user knows where to find the charts, but this is not ideal.
... View more
10-07-2020
09:09 AM
|
1
|
2
|
1386
|
POST
|
We have several dock panes that use Observable Collections of layers, which we initialize when the ribbon button is clicked (i.e., on the main thread). In the Module class, we subscribe to the LayersAdded event, process the event, then fire our own event that the dock panes listen to and update their collections. In 2.5 this worked fine, but in 2.6 the LayersAdded event is now being fired from the CIM thread instead of the main thread, which has caused our dock panes to crash when updating the collections. Interestingly, the LayersRemoved event is still fired from the main thread. Is this an intentional design? I haven't found anything in the release notes or other documentation. In case anyone else is dealing with this, I found this workaround in the Community Samples: private void onLayersAddRem(LayerEventsArgs obj)
{
// Instead of:
PopulateSnapList(); // This will crash now
//Run on UI Thread to sync layersadded event (which runs on background)
System.Windows.Application.Current.Dispatcher.BeginInvoke((Action)(() => { PopulateSnapList(); }));
}
... View more
09-02-2020
08:33 AM
|
0
|
0
|
421
|
POST
|
I'm trying to work on a web app and can't get services to publish locally. I have AGS and ArcGIS Desktop 10.6.1 installed on my machine, but when I try to publish an SD file via AGS Manager, I get the message: "ERROR 001362: Failed to extract manifest from uploaded service definition. Failed to execute (Publish Service Definition)." At the exact same timestamp in the logs, I also have the error "Failed to extract manifest from uploaded service definition.: ERROR: C7ZipReader.Initialize failed: C:\arcgisserver\directories\arcgissystem\arcgisuploads\admin\{guid}\foo.sd. The SD may be of a version not supported by this server's runtime." The SD was created via ArcMap 10.6.1, and my coworkers have been able to publish the same file on their instances. The ArcGIS Server Account has Full Control permissions to c:\arcgisserver and to the folder containing the file geodatabase. That folder is also registered as a Data Store. The account used in the AGS connection is an admin, and I'm publishing directly to https://localhost:6443/arcgis/.
... View more
08-14-2020
02:50 PM
|
0
|
1
|
843
|
POST
|
That was exactly what I needed! Thanks, Narelle Chedzey!
... View more
03-27-2020
11:22 AM
|
0
|
0
|
985
|
POST
|
I have a custom polyline sketch tool that requires all segments to be line segments. However, I can't find a way to hide the "sketch mode" popup (shown below) to prevent the user from sketching curves. The best option I've found so far is to validate the geometry in OnSketchCompleteAsync and notify the user of any errors. Is there a way to hide this popup or, even better, to disable certain buttons for my tool? Thanks, Stephen
... View more
03-27-2020
08:09 AM
|
0
|
2
|
1071
|
POST
|
Is there a way to open a chart after it's created and added to a layer through the API? I can't find an "Open" method or anything similar on the CIMChart class or a way to open a TOC item by name. The closest thing I can find is to select the layer in the TOC and activate the TOC pane so the user sees that it's created. I'm creating a chart following the process in Public classes to create a chart through the API. In ArcMap we created a chart (IDataGraphT instance) and added it to an IDataGraphWindow2 instance, then called Show.
... View more
10-15-2019
08:43 AM
|
1
|
8
|
1437
|
POST
|
You're welcome; happy to help! I'm sure this will eventually make it into documentation.
... View more
10-14-2019
09:11 PM
|
0
|
0
|
1467
|
POST
|
Hey Karen, see below. The feature layer being passed in is a point layer that is the result of a line-of-sight analysis. The M-value represents the distance from the observer to that point. private async void CreateLineChartExample(FeatureLayer featureLayer)
{
var featureLayerDefinition = await QueuedTask.Run(() => { return featureLayer.GetDefinition(); });
var chart = new CIMChart();
var xAxis = new CIMChartAxis { Title = "X-Axis" };
var yAxis = new CIMChartAxis { Title = "Y-Axis" };
chart.Axes = new CIMChartAxis[] { xAxis, yAxis };
chart.MapSelectionHandling = ChartMapSelectionHandling.None;
chart.Name = "Line Chart";
chart.GeneralProperties = new CIMChartGeneralProperties
{
Footer = "Distance in meters",
Title = "Line Chart Test",
BackgroundSymbolProperties = new CIMChartFillSymbolProperties
{
Color = ColorFactory.Instance.WhiteRGB
},
GridLineSymbolProperties = new CIMChartLineSymbolProperties
{
Color = ColorFactory.Instance.BlackRGB,
Style = ChartLineDashStyle.Dot,
Width = 1
}
};
var lineSeries = new CIMChartLineSeries
{
Fields = new string[] { "M", "Z" },
Name = "Line Chart Series1"
};
chart.Series = new CIMChartSeries[] { lineSeries };
featureLayerDefinition.Charts = new CIMChart[] { chart };
await QueuedTask.Run(() => { featureLayer.SetDefinition(featureLayerDefinition); });
}
... View more
10-14-2019
02:35 PM
|
1
|
4
|
1467
|
POST
|
This "fixed itself" when I upgraded from version 10.4.1 to 10.6.1. I'm not sure exactly what has changed, but it doesn't exist any more.
... View more
04-18-2019
01:09 PM
|
0
|
0
|
350
|
POST
|
I’m creating a semicircle around a point, but when I add the arc to a polyline and call SnapToSpatialReference, the center point moves almost a quarter of a meter. It’s a high-resolution spatial reference (resolution = 0.0001m, tolerance = 0.001m), and all code objects have the spatial reference set throughout the process. Calling Snap on the circular arc doesn't change the points, but calling it on the polyline does. Any advice to what's going on? Side note: I first noticed this when saving the feature. Setting the Shape property on the IFeatureBuffer changed the center point the same way that calling Snap does. See attached for coordinate comparison and sample VB.NET code.
... View more
04-16-2019
12:57 PM
|
0
|
1
|
447
|
POST
|
Thanks for the info, Wolf, and glad to know the Pro dev team knows about it. I'll keep my eyes out for their fix.
... View more
09-14-2018
05:56 AM
|
0
|
0
|
2003
|
Title | Kudos | Posted |
---|---|---|
1 | 10-15-2019 08:43 AM | |
1 | 10-07-2020 09:09 AM | |
1 | 02-02-2018 12:34 PM | |
1 | 10-19-2020 08:38 AM | |
1 | 10-14-2019 02:35 PM |
Online Status |
Offline
|
Date Last Visited |
03-12-2024
07:25 PM
|