|
POST
|
In my UI I have multiple buttons to call the OpenItemDialog and I would like to reuse the method to call the dialoge by using the CommandParameter to differentiate the initiating button. How can I do this using the RelayCommand?
... View more
04-13-2021
04:02 AM
|
0
|
2
|
8864
|
|
POST
|
Defining the structure of the pane like this: I get this: and with a loaded table it turns into this: Where the scrollbar is not used for the table but the entire content of the pane. As you can see, there is a good portion of things happening before the TableControl, and there is also a button below the TableControl. I have simply no idea to what component I can bind the height of the TableControl. Wrapping the TableControl into a border component, binding to the borders ActualHeight also didn't solve the issue, neither binding directly to the RowDefinition using MaxHeight="{Binding ElementName=ControlGrid, Path=RowDefinitions[2].Height.Value}" Changing MaxHeight of the TableControl from: to: I am getting: But that's of course hard coded and fails as soon as the pane becomes smaller (or bigger, since it doesn't use the space available).
... View more
02-23-2021
01:12 AM
|
0
|
1
|
2838
|
|
POST
|
When i put a TableControl into a grid row, then it doesn't matter if I set the row height to 'Auto' or '*'. The TableControl, only obeys its own MaxHeight property. The result is that everything within the ArcGIS Pro Pane gets a vertical scrollbar. That includes the toolbar component at the top, all the components between the toolbar and the TableControl, etc. In addition the TableControl stretches unlimited, not obeying to any limitations and pushing the following rows of the grid almost out of reach, depending on the feature count of the table visualized. If I set the MaxHeight property of the TableControl component then I am running into problems with its RowContextMenu. In case the TableControl stretches, producing the scrollbar, then a right click on a row makes the RowContextMenu jump a couple of lines down, selecting a different feature than the user was aiming for. How can I limit the TableControl to the space available, without setting an absolute height?
... View more
02-22-2021
01:02 AM
|
0
|
4
|
2908
|
|
POST
|
Cheers Kirk, that works just fine for me as well. About the extent... I was told in 2019 by ESRI that they did purposely decide against it in QueryLayer objects. Creating the QueryLayer takes not long, gathering all the data laying in the back of it does. Since QueryLayers do reflect the state of the data at the database, they do request the database for the most recent data every time you make it visible in your map. Hence, I assume what is speaking against the extent in QueryLayer object is performance.
... View more
02-14-2021
10:35 AM
|
1
|
0
|
3500
|
|
POST
|
Kirk, I am creating a FeatureClass through Database.OpenTabel(QueryDescription) as FeatureClass and thereafter I create a FeatureLayer in the active map through LayerFactory.Instance.CreateFeatureLayer(FeatureClass, MapView.Active.Map) In CreateFeatureLayer I cannot see a possibility to use LayerCreationParams and there is one more issue for me. Since I create QueryLayers and Esri decided not to set an extent for QueryLayer I am using CIM to crawl into the FeatureLayer and set the extent. Right now I can't see the way to create the Layer based on the FeatureClass. Here a bit more code to showcase. 'dbSchema' is set before and is a string: QueryDescription queryDescription =
oracleDatabase.GetQueryDescription(querySql, queryLayerName);
queryDescription.SetObjectIDFields("OBJECTID");
queryDescription.SetShapeType(geomType);
SpatialReference spatialReference = MapView.Active.Map.SpatialReference;
queryDescription.SetSpatialReference(spatialReference);
try
{
FeatureClass featureClass = oracleDatabase.OpenTable(queryDescription) as FeatureClass;
if (featureClass != null && featureClass.GetCount() != 0)
{
FeatureLayer featureLayer =
LayerFactory.Instance.CreateFeatureLayer(featureClass, MapView.Active.Map);
CIMFeatureLayer cimFeatureLayer = featureLayer.GetDefinition() as CIMFeatureLayer;
// alter QueryLayerName to reflect correct database scheme
cimFeatureLayer.Name = $"{dbSchema}.{queryLayerName}";
CIMSqlQueryDataConnection cimConnection = cimFeatureLayer?.FeatureTable.DataConnection as CIMSqlQueryDataConnection;
Municipality municipality = SelectedMunicipality;
double xMin = Convert.ToDouble(municipality.Xmin);
double yMin = Convert.ToDouble(municipality.Ymin);
double xMax = Convert.ToDouble(municipality.Xmax);
double yMax = Convert.ToDouble(municipality.Ymax);
MapPoint minPoint = MapPointBuilder.CreateMapPoint(xMin, yMin, spatialReference);
MapPoint maxPoint = MapPointBuilder.CreateMapPoint(xMax, yMax, spatialReference);
Envelope municipalityEnvelope =
EnvelopeBuilder.CreateEnvelope(minPoint, maxPoint, spatialReference);
if (cimConnection != null) cimConnection.Extent = municipalityEnvelope;
featureLayer.SetDefinition(cimFeatureLayer);
}
}
... View more
02-11-2021
03:33 AM
|
0
|
2
|
3553
|
|
POST
|
I do call GetQueryDescription, and it is correct that it takes the queryLayerName as second argument. However, the QueryDescription object returned contains the property QueryLayerName, reflecting the second argument given, and a property UniqueQueryLayerName. --> Reference Guide The resulting layer does use UniqueQueryLayerName in the TOC, adding the database role used to create the database connection to the front of the QueryLayerName. => [Role].[QueryLayerName] If the QueryLayerName would be used I could set the desired name without a problem when calling GetDescription...
... View more
02-08-2021
08:22 AM
|
0
|
4
|
3570
|
|
POST
|
So, the way I was describing before is the way to go. Thanks Frederic
... View more
02-08-2021
08:07 AM
|
1
|
0
|
3080
|
|
POST
|
I think I found a way, but I am not certain it's the correct one. get the selected object id(s) from the TableControl check the existence of the requested fields, and get their index values iterate over the selected object id(s), while feeding an Inspector LoadAsync(MapMember, ObjectID) Inspector[FieldIndex] to get the field value Is that as it should be, or do I overcomplicate things?
... View more
02-07-2021
02:10 PM
|
0
|
0
|
3112
|
|
POST
|
I want to retrieve all, or just some value(s) from a selected row, or multiple, in a TableControl. Meaning, on click of a button the TableControl is checked for selected rows and based on the result a couple of values, or the values from all fields should be returned. How can I do that?
... View more
02-07-2021
12:33 PM
|
0
|
3
|
3178
|
|
POST
|
Based on some user settings I am creating QueryFeatureLayers from a database. When the QueryDescription is generated, I can see the UniqueQueryLayerName property seems to be a combination of the database role, and the QueryLayerName property. The QueryDefinition class does not offer a method to set any of its public properties, and I didn't find a CIM class for the QueryDescription. Unfortunately, when using the SetDefinition method of a FeatureLayer the UniqueQueryLayerName property is used in the TOC of my MapView. If I am correct then I cannot alter the name shown in the QueryDescription, but have to do this after the FeatureLayer received the definition, leading to an undesired behaviour of showing the UniqueQueryLayerName, just to be updated with the "correct" name, that I know already from the start. What I am missing is a property in the QueryDescription where I can set the display name of the layer to be, before I am handing the QueryDescription over to the layer.
... View more
02-07-2021
05:33 AM
|
0
|
8
|
3640
|
|
POST
|
I developed an Addin in AGP 2.5 where I am using connection files to open database connections at runtime. So far that worked perfect. The connection files are stored on a network drive, referenced in the Addin with absolute paths. DatabaseConnectionFile connectionFileValidering = new DatabaseConnectionFile(new Uri(AppSettings.Default.sde_validation)); Now that I am doing some maintenance on the Addin I am running into the following error when trying to open the enterprise database: Database test_db = new Database(connectionFileValidation); 'Database test_db = new Database(connectionFileValidation)' threw an exception of type 'ArcGIS.Core.Data.GeodatabaseException' Data: {System.Collections.ListDictionaryInternal} HResult: -2146233088 HelpLink: null InnerException: {"Error HRESULT E_FAIL has been returned from a call to a COM component."} Message: "A geodatabase exception has occurred." Source: "ArcGIS.Core" StackTrace: " at ArcGIS.Core.Data.Database..ctor(DatabaseConnectionFile databaseConnectionFile)" TargetSite: {Void .ctor(ArcGIS.Core.Data.DatabaseConnectionFile)} With respect to the error message I found some stuff that is not related to ArcGIS, but did not help either. Anybody here can point me the direction of a solution?
... View more
11-13-2020
02:42 AM
|
0
|
1
|
2932
|
|
POST
|
Thanks a lot Wolfgang Kaiser! Your lines did it. Adjusting the value assignment to WorkspaceConnectionString = $"DATABASE={newGDB}" was already enough, but I will stick to line 9 and 10 of your example as well. Best regards Thomas
... View more
09-22-2020
01:01 AM
|
0
|
0
|
4352
|
|
POST
|
Hi Uma, any status change on the issue described above? Bests Tom
... View more
09-21-2020
06:33 AM
|
0
|
1
|
6120
|
|
POST
|
Hi Rich, do you think it's possible your colleagues who work on the Map API could have a look at it? Bests Tom
... View more
09-21-2020
06:31 AM
|
0
|
0
|
4352
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 01-09-2026 01:54 AM | |
| 1 | 10-24-2022 01:23 AM | |
| 1 | 09-15-2021 01:21 AM | |
| 2 | 08-30-2022 04:31 AM | |
| 2 | 04-24-2024 04:23 AM |
| Online Status |
Offline
|
| Date Last Visited |
05-08-2026
05:14 AM
|