|
POST
|
Hi David, Unfortunately, the customize gallery dialog is not currently available as part of the public ArcGIS Pro API. Regards Narelle
... View more
08-20-2019
12:01 PM
|
1
|
1
|
1102
|
|
POST
|
John, You're on the right track with the API methods you found. Take a look at the Undo/Redo sample here https://github.com/Esri/arcgis-pro-sdk-community-samples/tree/master/Framework/UndoRedo Specifically the Remove Operation button on the dockpanel. This illustrates how to remove from the undo stack. Removing an operation from the redo stack will be the same - just substitute the methods to work with the redo stack. Narelle
... View more
06-26-2019
01:32 PM
|
0
|
0
|
1035
|
|
POST
|
Hi Jamal, Unfortunately, after further investigation, we've found that the LocatorManager class currently only supports local locators and locators shared to Portal. It does not support locator services. Thank you for finding this issue. We will add support for locator services to the 2.5 version of the API. Narelle
... View more
06-20-2019
02:14 PM
|
2
|
1
|
2410
|
|
POST
|
Take a look at the LocatorManager class available from the active map view. It allows you to add locators https://pro.arcgis.com/en/pro-app/sdk/api-reference/index.html#topic18887.html Here's an example snippet internal async Task<bool> AddLocator() { ArcGIS.Desktop.Mapping.Geocoding.LocatorProvider lp = await MapView.Active.LocatorManager.AddLocatorAsync("D:\\Data\\Geocode\\ACT.loc"); //ArcGIS.Desktop.Mapping.Geocoding.LocatorProvider lp = await MapView.Active.LocatorManager.AddLocatorAsync(@"https://xxx/server/rest/services/yyy/GeocodeServer"); return true; }
... View more
06-19-2019
11:59 AM
|
1
|
14
|
3074
|
|
POST
|
Max, I am unable to duplicate this problem, in either ArcGIS Pro 2.3 Final or a pre-ArcGIS Pro 2.4 build. Here is my code (very similar to yours) protected override void OnClick() { var layer = MapView.Active.Map.Layers.FirstOrDefault() as FeatureLayer; if (layer == null) return; var labelClass = layer.LabelClasses.FirstOrDefault(l => l.Name == "My label"); if (labelClass == null) return; QueuedTask.Run(() => { var maplexLabelPlacementProperties = labelClass.GetMaplexLabelPlacementProperties() ?? new CIMMaplexLabelPlacementProperties(); maplexLabelPlacementProperties.PointPlacementMethod = MaplexPointPlacementMethod.CenteredOnPoint; maplexLabelPlacementProperties.CanRemoveOverlappingLabel = false; maplexLabelPlacementProperties.CanTruncateLabel = false; maplexLabelPlacementProperties.EnablePointPlacementPriorities = false; labelClass.SetMaplexLabelPlacementProperties(maplexLabelPlacementProperties); }); } My label class successfully changes from Best Position to Centered on Point. Do you perhaps have multiple label classes on this layer and might be showing one of those in the label properties dialog? Narelle
... View more
06-10-2019
06:34 PM
|
0
|
1
|
814
|
|
POST
|
Hi Max, I can duplicate your problem using ArcGIS Pro 2.3 Final. However using the exact same code I am unable to see the same problem in a pre-2.4 build. ArcGIS Pro 2.4 will be released shortly. Please let us know if you continue to see this problem when you upgrade to ArcGIS Pro 2.4 Thanks Narelle
... View more
06-10-2019
06:16 PM
|
0
|
0
|
919
|
|
POST
|
Thejus, The help is a little misleading - When the Get Attributes action is chosen in designer mode, a dialog box is displayed for the designer to specify a table, field, variable combination. When the step is executed the fields configured are displayed to the user in a grid. The values input by the user are assigned to the variables internally by the Tasks module. The only current use for these variables is to be used by the task designer in subsequent steps in a calculate field action. Hopefully this clarifies the role of variables in the Get Attributes and Calculate Field actions. I will make sure the help is updated to explain this more clearly. Thanks Narelle
... View more
02-12-2019
08:59 AM
|
1
|
2
|
2292
|
|
POST
|
Hi Charlie, What you are seeing is definitely a bug. The table control and the attribute pane of the same layer should work independently with regards to a SqlQuery defined on the TableControlContent. Thanks for pointing this out. We have added this as an issue and are working on a fix. Unfortunately there is no workaround at this time, but we'll try to include the fix for this into 2.3.1 Regards Narelle
... View more
02-11-2019
06:20 PM
|
1
|
0
|
2998
|
|
POST
|
Hi Thejus, Variables defined with Task Designer are only available for use with the task they are defined with. They are used internally by the Tasks module. The variables are not available with the Pro SDK. Thanks Narelle
... View more
02-11-2019
01:43 PM
|
1
|
4
|
2292
|
|
POST
|
Hi Mike, A couple of things. Firstly you can continue to set the definition query on a layer by using the layer.SetDefinition call. It is saved and it will filter the layer records. Test this by using the API to set an expression similar to 'OBJECTID > 5' and open the attribute table for that layer and see that not all your records are displayed. There is a bug in the DefinitionQuery tab on the Layer properties dialog which is not correctly displaying the definition query when you use the 'SetDefinition' call. This dialog (which changed at V2.3 to allow multiple definition queries) now uses the DefinitionFilter properties as you suspected. You can access the CIM definition for the layer to set theses properties. Here is the code snippet which will assign a new filter and make it the default - this can replace your call to SetDefinition if you require. // must run on the MCT - use QueuedTask.Run // get the CIM layer definition var layerDef = fLayer.GetDefinition() as CIMFeatureLayer; // get the table for the layer var featureTable = layerDef.FeatureTable; // get the current set of definition filters var filters = featureTable.DefinitionFilterChoices?.ToList(); // they might be null, so create a new list if (filters == null) filters = new List<CIMDefinitionFilter>(); // create a new filter var filter = new CIMDefinitionFilter(); filter.Name = "my filter"; filter.DefinitionExpression = newExpression; // add to the list filters.Add(filter); // assign filters back to the CIMDisplayTable featureTable.DefinitionFilterChoices = filters.ToArray(); // also set DefinitionExpression, DefinitionExpressionName // - these define the active definition filter featureTable.DefinitionExpression = filter.DefinitionExpression; featureTable.DefinitionExpressionName = filter.Name; // write back to the CIM layer definition fLayer.SetDefinition(layerDef); Thanks for pointing out the bug with the SetDefinition call and the layer properties dialog. We will be addressing this. We will also work on updating the images in the sample to reflect the changes made to the dialog. And updating the sample to reflect the changes made at V2.3 to use DefinitionFilters. Regards Narelle
... View more
01-28-2019
11:35 AM
|
2
|
2
|
4371
|
|
POST
|
If you already have the layer you can also do something similar to the following IReadOnlyList<ArcGIS.Core.Data.Field> fields = null; List<string> fieldList = new List<string>(); await QueuedTask.Run(() => { ArcGIS.Core.Data.Table table = theFeatureLayer.GetTable(); if (table != null) { ArcGIS.Core.Data.TableDefinition def = table.GetDefinition(); fields = def.GetFields(); foreach (var fld in fields) { fieldList.Add(fld.Name); Debug.WriteLine(fld.Name); } } }); You still end up looking at the feature layer / table definition, but because you have the layer you don't need the additional Geodatabase object.
... View more
01-14-2019
10:58 AM
|
0
|
0
|
3839
|
|
POST
|
Hi Serguei, If you are retrieving a template that is not active, you need to activate that template before the inspector object is available. Here is some sample code var map = MapView.Active?.Map; if (map == null) return; var myTemplate = map.FindLayers("testPoints").FirstOrDefault()?.GetTemplate("testPoints"); if (myTemplate == null) return; // activate the template myTemplate.ActivateDefaultToolAsync(); // retrieve the inspector var insp = myTemplate.Inspector; // modify fields insp["field1"] = value1; // perform the edit operation Thanks Narelle
... View more
01-07-2019
10:13 AM
|
2
|
1
|
1311
|
|
POST
|
To clarify. This is a bug with changing the subtype when creating a record in standalone tables. Changing the subtype when creating features works correctly. Narelle
... View more
08-27-2018
09:13 AM
|
0
|
0
|
1084
|
|
POST
|
Hi Charlie, Yes it looks like a bug. I can duplicate your problem. I also see the same incorrect behaviour with EditOperation.ChangeSubType. We'll endeavour to get this fixed for the new release (Pro 2.3) Thanks for pointing this out. Narelle
... View more
08-24-2018
10:37 AM
|
0
|
1
|
1084
|
|
POST
|
Hi Robert, There is currently no API in Pro for location referencing functionality, but if your measure values relate to the length of your lines or are calculated according to a start measure and end measure for the lines you should be able to do this. First you would need to interpolate the distance along the line that the measure value relates to. Then you could use the GeometryEngine.Instance.QueryPoint function to obtain the point. ArcGIS Pro 2.2 API Reference Guide - GeometryEngine QueryPoint Hope this helps. Narelle
... View more
08-17-2018
11:30 AM
|
0
|
1
|
881
|
| Title | Kudos | Posted |
|---|---|---|
| 2 | 07-27-2025 06:04 PM | |
| 1 | 03-24-2025 06:53 PM | |
| 1 | 08-08-2024 09:44 PM | |
| 1 | 07-18-2024 04:46 PM | |
| 1 | 06-04-2024 07:18 PM |
| Online Status |
Offline
|
| Date Last Visited |
11-02-2025
02:15 PM
|