POST
|
Thanks, Charles! I am just about to get my new add-in into the 'testing by others' phase.
... View more
Wednesday
|
0
|
0
|
36
|
POST
|
I am wondering if my question was overlooked. @CharlesMacleod @UmaHarano @Wolf I have looked at post like this one https://stackoverflow.com/questions/534261/how-do-you-keep-user-config-settings-across-different-assembly-versions-in-net , but I don't find anything related to the directive "Be sure to set it's Roaming property to True also."
... View more
Wednesday
|
0
|
0
|
49
|
POST
|
@CharlesMacleod After watching your advanced customization video here, I tried out using application settings for the first time. I was concerned by the fact that the user.config file was stored in a path the last part of which was "3.2.0.0." I looked at "Persist Application settings across multiple Pro versions" in the pro guide here. In the second bullet point it says to "Be sure to set it's Roaming property to True also." I couldn't find where to do that and after some research am wondering if this is still necessary.
... View more
03-05-2024
09:07 AM
|
0
|
3
|
150
|
POST
|
Same problem, but with accessing a Query Feature Class with SQL Server. I wrote the code using v3.2 against a feature class in a file geodatabase for quicker testing and that worked fine. When I tried to move to production I got this same error with Table.GetDefintion(). ArcGIS.Core.Data.Exceptions.GeodatabaseGeneralException: The operation is not supported by this implementation. ---> System.Runtime.InteropServices.COMException (0x80040203): A syntax error occurred trying to evaluate a query string (0x80040203) at ArcGIS.Core.Internal.IDatasetIOP.Dataset_GetDefinition(IntPtr datasetHandle) at ArcGIS.Core.Data.Dataset.GetDefinitionHandle() --- End of inner exception stack trace --- at ArcGIS.Core.Data.Dataset.GetDefinitionHandle() at ArcGIS.Core.Data.FeatureClass.CreateDefinition() at ArcGIS.Core.Data.Table.GetDefinition()
... View more
01-11-2024
08:38 PM
|
0
|
0
|
593
|
POST
|
@Wolf It appears that you cannot even select features in a KML layer, much less create a layer from a selection. Perhaps there is an intention to add these functionalities in the future.
... View more
01-04-2024
06:22 AM
|
0
|
0
|
494
|
POST
|
Thanks, Wolf. This does appear to work. Since I may have to maintain the code for my application in the future, I would like to fully understand what is going on here. It seems to me that the underlying idea is that if a feature layer was created using "Make Layer From Selected Features" it's table will have a DefinitionSetURI. Otherwise it won't. Let me know if I am off the mark. There isn't much about the DefintionSetURI property in the API documentation (or elsewhere): https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/topic16838.html This is an example: CIMPATH=ObjectIdentifierSet/c940ab464ae672ac39402d5a13034ab1.dat Looks like there is a data file somewhere. I couldn't find it on my C drive. Maybe it is in volatile memory? I am also wondering why you specifically check CIMKMLLayer and return null. It seems to me that it would return null at line 31 of your code if you didn't include that. else if (baseLayer is CIMKMLLayer kmlLayer)
return (null);
... View more
01-03-2024
07:13 AM
|
0
|
0
|
504
|
POST
|
Sorry to take so long to respond, @Wolf . I think I kind of get the general idea here of what you are doing, but the call to GetDefintionSetURI does not work for me. That method does not appear to be in the API documentation: https://pro.arcgis.com/search/?collection=help&product=arcgis-pro-net&version=pro3.2&language=en&q=GetDefinitionSetURI Is it a method that you created as part of your solution?
... View more
01-02-2024
07:29 AM
|
0
|
0
|
521
|
POST
|
Is there anything in the API that can be used to determine (return a bool) if the "layer comprises a subset of features" as scene on the Selection Tab of the layer's properties here:
... View more
12-15-2023
09:58 PM
|
0
|
7
|
693
|
IDEA
|
Get Unique Values from a Field (Maybe Statistics Too?) Getting unique values from a field in code can be done using the snippet provided by @RichRuh : https://community.esri.com/t5/arcgis-pro-sdk-questions/getting-statistics-on-a-field/td-p/846351 But there are limitations. It took a while to find them, and it is very possible I didn’t find them all. For our use case, the goal is to allow the user to use any layer of type FeatureLayer in the map’s contents as part of their work process. Streamlining the process through code involves asking them to select from 3 combo boxes: map layer name, then field name, and finally field value. The code snippet from the post above throws exceptions when used with XY Event Layers, and as far as I can see, most feature layers that have a joined table (click link above for more information). I think it might not be too hard to get something into the API that provides unique values since it is already done in the Pro GUI, for example, in the “Select By Attributes” tool. But I thought I would mention Statistics as well since it is very much related and worth considering at the same time. If anyone wants to see that in the API too, it would make sense to leave a comment with details about use cases for that.
... View more
12-13-2023
09:17 PM
|
2
|
3
|
618
|
POST
|
I have looked this over more carefully now and have worked around this as much as I think I need to. I am just using it to get a unique list of values, so in case anyone else is trying to do that or anyone has any further insights that they would be able to share, this is what I have concluded so far: It is not surprising that I was unable to use Rich Ruh’s code snippet with XY Event Layers since in the Pro GUI you cannot run the “Summarize Statistics'' tool on fields in these layers. You get an error message about there being no OID field. You can run the “Summarize Statistics” tool on a field in a layer with a joined table. However, for using the code snippet, FeatureClass.GetDefinition() and Table.GetDefinition() are expected to throw an exception if called when there is a table join. This can be found in the API documentation here: https://pro.arcgis.com/en/pro-app/latest/3.2/api-reference/topic7713.html https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/topic7014.html So it seems that this is a known limitation and there is a reasonable sounding explanation provided for it, but since “Summarize Statistics” can be done through the Pro GUI when there is a joined table, it is surprising that we cannot do this using the SDK too. To be clear, in my code, I start with a BasicFeatureLayer, get a Table from it with GetTable() and then use Table.GetDefinition(). The thing that initially confused me was that Table.GetDefinition() didn’t throw an exception when the data source of the BasicFeatureLayer was a FGDB feature class and it was joined with a table within that same FGDB. For now, I want to allow users the opportunity to use my addin in the above mentioned FGDB joined table case (or any case that Table.GetDefinition() happens to work), so I decided to do something like this at the beginning when getting the TableDefinition: Table table = myBasicFeatureLayer.GetTable();
TableDefinition tableDefinition;
try
{
tableDefinition = table.GetDefinition();
}
catch (Exception e)
{
if (table.IsJoinedTable())
{
ArcGIS.Desktop.Framework.Dialogs.MessageBox.Show("Won't work with join…");
}
else
{
MessageBox.Show("Please contact GIS staff…" + e.ToString());
}
return;
}
... View more
12-06-2023
01:48 PM
|
0
|
0
|
125
|
POST
|
Looking at the documentation here: https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/topic12753.html I see: "The MapMemberEventHint enumerable and the MapMember enumerable have a one to one mapping." I have been testing my code in this Event. If I change both minimum and maximum scale on a feature layer, the event fires once and MapMembers (IList<MapMember>) contains three references all to the same MapMember (the feature layer). EventHints (IList<MapMemberEventHint> ) contains EventHints of Any, MinScale, and MaxScale. When I select two feature layers at the same time and change the min and max scales, the event fires twice with the same result as above each time. What are examples (or are there any?) of a user changing some properties, the event firing, and in that single event there are references to more than one MapMember in MapMembers (IList<MapMember>)? In other words, are the MapMembers in the MapMembers list always all the same? If not, when does it happen? Looking at the documentation here: https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/topic12615.html I see: This description sounds to me like: “Any is the value you will get when a property is changed that is not specifically represented in the rest of this enumeration. When more than one property is changed that is not specifically represented in this enumeration, you will still only get one EventHint of Any.” If that is not correct or complete, please let me know. When I change the name of a feature layer through the Properties dialog, there are EditHints of Any and Name. When I change the name through the Contents Pane, there is only an EditHint of Name. Why are these cases different?
... View more
10-31-2023
09:12 PM
|
0
|
1
|
296
|
IDEA
|
Does this idea cover what you are wanting, @BrettFrahm ?: https://community.esri.com/t5/arcgis-experience-builder-ideas/an-action-on-the-list-widget-to-open-the-popup-on/idi-p/1098259
... View more
09-25-2023
06:40 AM
|
0
|
0
|
326
|
POST
|
Thanks @RichRuh . It has been a while since I looked at this (was interrupted by other priorities). I will probably contact tech support as you suggest.
... View more
09-21-2023
11:23 AM
|
0
|
0
|
163
|
POST
|
@RichRuh @KoryKramer @ColinZwicker Repeating this question and tagging you guys in case you didn't see it before. Did Esri ever provide a more obvious way to do this in the API, Rich? I am running into some issues with this not working so well, for example, with type CIMXYEventDataConnection and when CIMSqlQueryDataConnection becomes CIMRelQueryTableDataConnection via joining to a local table (it does work with a join when the data are all in the file geodatabase).
... View more
09-21-2023
09:41 AM
|
0
|
3
|
543
|
Title | Kudos | Posted |
---|---|---|
1 | 06-01-2022 07:12 AM | |
1 | 07-22-2021 08:22 PM | |
2 | 12-13-2023 09:17 PM | |
1 | 06-30-2021 06:44 AM | |
1 | 04-12-2023 03:36 PM |
Online Status |
Offline
|
Date Last Visited |
yesterday
|