POST
|
So I refactored a little sticking it in a method and creating a new List<CIMDefinitionFilter>();, here is the code private void SetLayerDefinition(FeatureLayer fLayer, string defExpression) { var layerDef = fLayer.GetDefinition() as CIMFeatureLayer; var featureTable = layerDef.FeatureTable; //var filters = featureTable.DefinitionFilterChoices?.ToList(); //if (filters == null) // filters = new List<CIMDefinitionFilter>(); var filters = new List<CIMDefinitionFilter>(); var filter = new CIMDefinitionFilter { Name = "my filter", DefinitionExpression = defExpression }; filters.Add(filter); featureTable.DefinitionFilterChoices = filters.ToArray(); featureTable.DefinitionExpression = filter.DefinitionExpression; featureTable.DefinitionExpressionName = filter.Name; // write back to the CIM layer definition fLayer.SetDefinition(layerDef); }
... View more
01-28-2019
02:23 PM
|
1
|
0
|
2298
|
POST
|
So the code worked great, I will need to modify as you can see it keeps adding to the query in my situation I will start from a new List(); Easy enough. I will look forward to the fix. For clarity, it looks to me that the last SetDefinition(layerDef) plays a role in what the active definition is.
... View more
01-28-2019
02:09 PM
|
0
|
0
|
2298
|
POST
|
So I thought I could be clearer on my question since there has been no response. I am working with the new SDK 2.3. I have looked at the new sample QueryBuilderControl. The screenshots show the old definition control which is confusing. It did provide some insight into the CIMDefinitionFilter. DefinitionFilter {ArcGIS.Core.CIM.CIMDefinitionFilter} ArcGIS.Core.CIM.CIMDefinitionFilter DefinitionFilterChoices {ArcGIS.Core.CIM.CIMDefinitionFilter[0]} ArcGIS.Core.CIM.CIMDefinitionFilter[] I am not able to figure out how to put this information in my feature layer.
... View more
01-26-2019
10:21 AM
|
0
|
0
|
2298
|
POST
|
trying to set a definition query I typically do something like: lyr.SetDefinitionQuery("ProjNum = 'S100075'"); Now however we seem to have a collection. When I set the query like above it seems to work although the definition query is empty. Is there another method in the SDK to create a "New definition query" to handle this? I would imagine each definition query would have a name property, definition property, an is active property. I look forward to your response as my code a lot of these calls. Regards, Mike
... View more
01-25-2019
12:36 PM
|
1
|
5
|
2817
|
POST
|
As usual, after sleeping on it, I found my dumb mistake. The above code works I just wasn't overwriting properly into the style where I was saving.
... View more
07-29-2018
07:45 AM
|
0
|
0
|
523
|
POST
|
I would like an example of how to create a point with say a circle and then offset a square. I see how you can do it with a LineSymbology(Symbology Sample Project) but I get an error trying to do something similar with the CIMPointSymbol. Below is code that doesn't work but may help clarify what I would like to do. Any help steering me in the right direction is appreciated. internal static Task<CIMPointSymbol> CreatePointTwoMarkersAsync() { return QueuedTask.Run<CIMPointSymbol>(() => { var twoPointMarkers = new CIMPointSymbol(); var circleMarker = SymbolFactory.Instance.ConstructMarker(ColorFactory.Instance.GreyRGB, 5, SimpleMarkerStyle.Circle) as CIMVectorMarker; var squareMarker = SymbolFactory.Instance.ConstructMarker(ColorFactory.Instance.WhiteRGB, 5, SimpleMarkerStyle.Square) as CIMVectorMarker; CIMSymbolLayer[] mySymbolLyrs = { new CIMVectorMarker() //circle marker { MarkerGraphics = circleMarker.MarkerGraphics, Frame = circleMarker.Frame, Size = circleMarker.Size, OffsetX= 0 }, new CIMVectorMarker() //square marker { MarkerGraphics = squareMarker.MarkerGraphics, Frame = squareMarker.Frame, Size = squareMarker.Size, OffsetX= 5 } }; twoPointMarkers.SymbolLayers = mySymbolLyrs; return twoPointMarkers; }); }
... View more
07-28-2018
03:49 PM
|
0
|
1
|
772
|
POST
|
in arcmap it clears to original dataset. I think this is related to arcgis Pro
... View more
09-03-2017
11:43 AM
|
0
|
0
|
443
|
POST
|
It allows a new definition query that is a subset of the first definition query but does not allow to be cleared or a new definition query that is not inclusive of the first definition query. Below is picture of where i am setting the definition query. Thanks
... View more
09-03-2017
09:24 AM
|
0
|
1
|
443
|
POST
|
I thought I would elaborate as I haven't heard anything although I have been a little busy in the Houston flood. If I set the Definition Query to the expression OBJECTID < 200 I get back the correct result set. I then try to change the definition Query to OBJECTID = 168 and that result set returns. Then I try OBJECTID >= 0 and also i tried with no definition Query and no results return I expected all results. It seems I can only requery the returned result set. My Mosaic Layer source is a Mosaic Dataset in a local file geodatabase. This is not expected behavior. I am using ArcGIS Pro 2.01. Is anyone else having this issue? Thanks
... View more
09-03-2017
06:28 AM
|
0
|
3
|
443
|
POST
|
In order to reset I have to remove the mosaic layer and add it again, then the same problem I only have a chance to set def qry once. This seems to be a bug in arcgis pro. this doesn't happen with arcgis 10.5 works as expected. Please let me know if there is a work around. Thanks Mike
... View more
08-31-2017
08:41 PM
|
0
|
5
|
648
|
POST
|
I have a couple of workflows, not field related. More LOB where i am geocoding to parcel centroids.
... View more
08-10-2017
01:49 PM
|
0
|
0
|
423
|
POST
|
My understanding is the rest api requires a service so not available offline/arcgis server. What I would like to be able to do is to read in my custom locator and then simply use it without the latency or expense of a service.
... View more
08-10-2017
08:49 AM
|
0
|
2
|
423
|
Title | Kudos | Posted |
---|---|---|
1 | 06-18-2022 05:29 PM | |
1 | 01-28-2019 02:23 PM | |
1 | 01-25-2019 12:36 PM |
Online Status |
Offline
|
Date Last Visited |
01-01-2024
10:42 PM
|