|
POST
|
My code <dockPane id="MyAddin_DockPanes_LayersDkp" caption="Layers" className="DockPanes.LayersDkpViewModel" dock="group" dockWith="esri_core_contentsDockPane"> I then clean and rebuild the addin. I open new map project and notice that my DockPane is not present in any pane. I click on the button in my addin and my custom DockPane appears on the right while my Pro Contents pane is on the left. I remember struggling with this several years ago and thought I had to clear some cache or a settings file.
... View more
Monday
|
0
|
0
|
75
|
|
POST
|
I have cleaned and rebuilt the app several times and still doesnt work. Actually, in the Options>Addin Manager I also deleted the Addin then rebuilt and still not working.
... View more
Monday
|
0
|
0
|
83
|
|
POST
|
I have a DockPane set with dock="group" dockWith="esri_core_contentsDockPane"> Now i want to test with dock="group" dockWith="esri_core_projectDockPane"> But the new position doesn't work. I seem to remember I had to clear my settings or a cache for the new position to take effect. What would I need to do to test this with various positions to determine what is best for my users?
... View more
Monday
|
0
|
4
|
121
|
|
POST
|
Ok here is what i have an it seems to work without exceptions. I haven't tried sending this to my GP so that's the second part of the challenge. // do the basic clone of the layer
Map map = null;
FeatureLayer cloneFeatLayer = null;
await QueuedTask.Run(() =>
{
// we create the layer and do not display in the active map but instead we will
// create a map in memory and add the layer to this temporary map.
map = MapFactory.Instance.CreateMap("ForCloneLayer", MapType.Map);
// get the URI of the original layer
Uri uri = originalFeatLayer.GetPath();
Debug.Print($"uri=[{uri}]");
// create feature layer creation parameters. for this routine we will only need the basics.
var flyrCreatnParam = new FeatureLayerCreationParams(uri)
{
Name = originalFeatLayer.Name + "_Cloned",
IsVisible = false,
DefinitionQuery = null,
//MinimumScale = 1000000,
//MaximumScale = 5000,
//DefinitionQuery = new DefinitionQuery(whereClause: "Population > 100000", name: "More than 100k"),
//RendererDefinition = new SimpleRendererDefinition()
//{
// SymbolTemplate = SymbolFactory.Instance.ConstructPointSymbol(CIMColor.CreateRGBColor(255, 0, 0), 8, SimpleMarkerStyle.Hexagon).MakeSymbolReference()
//}
};
cloneFeatLayer = LayerFactory.Instance.CreateLayer<FeatureLayer>(flyrCreatnParam, map);
}); Then calling it like so // test the cloning
FeatureLayer originCloneLayer = await lyrOrigin.GetBasicClone();
originCloneLayer = null;
// just for testing
GC.Collect();
GC.WaitForPendingFinalizers();
... View more
2 weeks ago
|
0
|
0
|
214
|
|
POST
|
What about creating a map in memory and adding the layer to that?
... View more
2 weeks ago
|
0
|
2
|
228
|
|
POST
|
I'm not sure this is the routine that will give me what i need. I need to clone a feature layer so that I can manipulate it before sending it to a GP. Essentially I want to use a temp layer that is not to be added to the map. In ArcGIS 10 I did this and it worked great: If pOriginalFeatLayer Is Nothing Then Throw New ArgumentNullException(NameOf(pOriginalFeatLayer)) 'get the feature class (Or feature table) from original layer Dim pFeatClass As IFeatureClass = pOriginalFeatLayer.FeatureClass 'create a New FeatureLayer using the same feature class/table (this creates a layer pointing to the same data) Dim pCloneFeatLayer As IFeatureLayer = New FeatureLayer With {.FeatureClass = pFeatClass} 'copy basic properties pCloneFeatLayer.Name = pOriginalFeatLayer.Name + "_Cloned" 'new name It's just a layer in memory that is for temporay6 work and therefore not needed to be in the map.
... View more
2 weeks ago
|
0
|
4
|
258
|
|
POST
|
In the ArcGIS 10 SDK I copied an object by value using the IObjectCopy interface. I can't find a similar thing in the ArcGIS Desktop SDK. I guess its available in the Enterprise SDK but that's not what i am working with. So, what would be equivalent code in Pro if I had this in ArcGIS 10? 'deep clone the IFeatureSelection because it's possible that the Origin and Proximity sources are the same. Dim objectCopyB As IObjectCopy = New ObjectCopy Dim objB As Object = objectCopyB.Copy(pFeatSelOriginB) Dim pFeatSelOrigCloneB As IFeatureSelection = CType(objB, IFeatureSelection)
... View more
2 weeks ago
|
0
|
7
|
306
|
|
IDEA
|
yes Please add this functionality. Many times I start out with Project_Apr2020 and then later someone decides to ask for an update. the best thin g for me would be to just copy the entire project to Project_Dec2023 with all the associated files renamed as such.
... View more
04-21-2025
01:50 PM
|
0
|
0
|
263
|
|
POST
|
One more follow up. I wanted to change the label to say "3 airports found". That required an escape sequence {}, otherwise the initial curly brace will not compile. <Label x:Name="lblAptCount" Content="{Binding Path=DvAirports.Count}" ContentStringFormat="{}{0} airports found"
ToolTip="Number of airports found near origin airport" HorizontalAlignment="Left" VerticalAlignment="Top" RenderTransformOrigin="1.239,5.789" Margin="0,134,0,0" Width="207"/> {}
... View more
08-26-2022
06:11 AM
|
0
|
0
|
3773
|
|
POST
|
@GKmieliauskas thank you! lord have mercy. I checked several articles and I could have sworn I looked only at Labels. Maybe I need more sleep.
... View more
08-26-2022
05:55 AM
|
0
|
0
|
3774
|
|
POST
|
Some of these things should be so simple but I end up spending days on it. Really frustrating. I looked up examples on how to set a label to hard coded text and a binding. Something like "Airports found = 3". I tried various ways to do this but all I get is just the number. <Label x:Name="lblAptCount" Content="{Binding Path=DvAirports.Count, StringFormat='Airports found = \{0\}'}"
ToolTip="Number of airports found near origin airport" HorizontalAlignment="Left" VerticalAlignment="Top" RenderTransformOrigin="1.239,5.789" Margin="0,134,0,0" Width="207"/> When I use this XAML, the result in the label is just the number like 3. Can anyone point me in the right direction please.
... View more
08-25-2022
03:28 PM
|
0
|
3
|
3833
|
|
POST
|
Actually I found the possible source of all my problems. I suspect that many other devs might also make this simple mistake. //create the parameter list for the GP
List<object> vals = new List<object>();
vals.Add(lyrProximity); //in_layer: the selection will be applied to this layer
vals.Add("WITHIN_A_DISTANCE_GEODESIC"); //overlap_type: we want features within a geodesic distance
vals.Add(lyrOrigin); //select_features: this is the source
vals.Add(radiusInNm.ToString() + " NAUTICALMILES"); //search_distance: search within xNM of the source
vals.Add("NEW_SELECTION"); //selection_type: new selection
vals.Add("NOT_INVERT"); //invert_spatial_relationship: do not invert selection
//var parameters = Geoprocessing.MakeValueArray(vals); //compiles but does not work
var parameters = Geoprocessing.MakeValueArray(vals.ToArray()); //compiles and works
IGPResult gpResult = await Geoprocessing.ExecuteToolAsync("SelectLayerByLocation_management", parameters);
... View more
08-23-2022
04:31 PM
|
0
|
0
|
2372
|
|
POST
|
Actually I found the possible source of all my problems. I suspect that many other devs might also make this simple mistake. The function MakeValueArray takes as its input a variable number of objects as an array. I thought that if i passed it a List of Objects it would work as well. It does compile so merrily I went along. However, it is reading the List of Objects as a single object. What I needed to do was convert that List of Objects to an Array of objects AND then pass that to the GP tool. Example: //create the parameter list for the GP
List<object> vals = new List<object>();
vals.Add(lyrProximity); //in_layer: the selection will be applied to this layer
vals.Add("WITHIN_A_DISTANCE_GEODESIC"); //overlap_type: we want features within a geodesic distance
vals.Add(lyrOrigin); //select_features: this is the source
vals.Add(radiusInNm.ToString() + " NAUTICALMILES"); //search_distance: search within xNM of the source
vals.Add("NEW_SELECTION"); //selection_type: new selection
vals.Add("NOT_INVERT"); //invert_spatial_relationship: do not invert selection
//var parameters = Geoprocessing.MakeValueArray(vals); //compiles but does not work
var parameters = Geoprocessing.MakeValueArray(vals.ToArray()); //compiles and works
IGPResult gpResult = await Geoprocessing.ExecuteToolAsync("SelectLayerByLocation_management", parameters);
... View more
08-23-2022
04:28 PM
|
0
|
0
|
2372
|
|
POST
|
@GKmieliauskas @CharlesMacleod well that seemed to work. thanks!!! The only thing I did different was change my classes from BasicFeatureLayer to FeatureLayer. I wonder if the GP tools just dont work with the BasicFeatureLayer class.
... View more
08-23-2022
04:13 PM
|
0
|
0
|
2375
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 04-25-2020 09:25 PM | |
| 1 | 08-17-2022 11:17 AM | |
| 1 | 07-24-2022 01:36 PM | |
| 1 | 07-14-2022 11:22 AM | |
| 1 | 07-14-2022 10:29 AM |
| Online Status |
Offline
|
| Date Last Visited |
Monday
|