|
POST
|
Hi We just posted a sample that illustrates how to deploy a standalone CoreHost application that resolves the ArcGIS Pro location in order to load the dependent assemblies such as ArcGIS.Core.dll and ArcGIS.CoreHost.dll from the ArcGIS Pro install location. Except for the dynamic assembly loading logic this sample is identical to the "CoreHostSample". Here is the link to the sample: CoreHostResolveAssembly Thanks Uma
... View more
08-13-2018
12:30 PM
|
0
|
2
|
1349
|
|
POST
|
Hi Joshua Here is a snippet on the ArcGIS Pro SDK wiki that adds a feature class to the active map: Create and add a layer to the active map Thanks Uma
... View more
08-08-2018
08:47 AM
|
0
|
2
|
2661
|
|
POST
|
Hi The only way to deactivate a tool is by activating another tool. When the tool is active, you can subscribe to the MapSelectionChangedEvent. When the selection changes, check for your tool validity criteria and activate another tool like the default Pro Explore tool. This will deactivate your tool. Unsubscribe to the MapSelectionChangedEvent in the OnToolDeactivateAsync override of the tool. Here is a code snippet: protected override Task OnToolActivateAsync(bool active)
{
MapSelectionChangedEvent.Subscribe(OnMapSelectionChanged);
// do other things here
return base.OnToolActivateAsync(active);
}
protected override Task OnToolDeactivateAsync(bool hasMapViewChanged)
{
MapSelectionChangedEvent.Unsubscribe(OnMapSelectionChanged);
return base.OnToolDeactivateAsync(hasMapViewChanged);
}
private void OnMapSelectionChanged(MapSelectionChangedEventArgs args)
{
var selection = args.Selection;
// set explore tool active if selection is cleared
// this will force a deactivate of this tool
if (selection.Count() == 0) //your selection criteria
FrameworkApplication.SetCurrentToolAsync("esri_mapping_exploreTool"); //deactivates this maptool.
}
Thanks! Uma
... View more
07-24-2018
11:09 AM
|
1
|
6
|
1895
|
|
POST
|
Hi Brian, Try this: var value = vlsStatsResult.First().StatisticsResults.First().Max; Thanks Uma
... View more
07-23-2018
10:35 AM
|
2
|
1
|
3141
|
|
POST
|
Hi Fraser Try saving your project after closing the dockpane, that way when you reopen the project the dockpane will not show up. Dockpanes cannot be deleted, since they are available in the code within Pro. The buttons, context menu items that display the dockpanes can be removed. Note: In the above screenshot, you can delete the Symbology button on the Pro ribbon. But you will still be able to access the Symbology dockpane when you click the symbol in the TOC for a layer. Thanks! Uma
... View more
07-23-2018
09:57 AM
|
0
|
2
|
1356
|
|
POST
|
Hi You should be able to modify a text element in a map layout in ArcGIS Pro to use any system font you have installed on your machine. Are you asking how to do this programmatically using the Pro SDK? Thanks Uma
... View more
07-19-2018
08:42 AM
|
0
|
4
|
13236
|
|
POST
|
Hi Luke The images did not come thorough, but I think I get what you are trying to do with the UniqueValueRenderer. Here is a code snippet that will symbolize fields with specific symbols based on values, instead of using a color ramp. You have to modify the CIMUniqueValueRenderer to get what you are trying to do. internal static Task UniqueValueRenderer(FeatureLayer featureLayer)
{
return QueuedTask.Run(() =>
{
//The goal is to construct the CIMUniqueValueRenderer which will be applied to the feature layer.
// To do this, the following are the objects we need to set the renderer up with the fields and symbols.
// As a reference, this is the USCities dataset. Snippet will create a unique value renderer that applies
// specific symbols to all the cities in California and Alabama. The rest of the cities will use a default symbol.
// First create a "CIMUniqueValueClass" for the cities in Alabama.
List<CIMUniqueValue> listUniqueValuesAlabama = new List<CIMUniqueValue> { new CIMUniqueValue { FieldValues = new string[] { "Alabama" } } };
CIMUniqueValueClass alabamaUniqueValueClass = new CIMUniqueValueClass
{
Editable = true,
Label = "Alabama",
Patch = PatchShape.Default,
Symbol = SymbolFactory.Instance.ConstructPointSymbol(ColorFactory.Instance.RedRGB).MakeSymbolReference(),
Visible = true,
Values = listUniqueValuesAlabama.ToArray()
};
// Create a "CIMUniqueValueClass" for the cities in California.
List<CIMUniqueValue> listUniqueValuescalifornia = new List<CIMUniqueValue> { new CIMUniqueValue { FieldValues = new string[] { "California" } } };
CIMUniqueValueClass californiaUniqueValueClass = new CIMUniqueValueClass
{
Editable = true,
Label = "California",
Patch = PatchShape.Default,
Symbol = SymbolFactory.Instance.ConstructPointSymbol(ColorFactory.Instance.BlueRGB).MakeSymbolReference(),
Visible = true,
Values = listUniqueValuescalifornia.ToArray()
};
//Create a list of the above two CIMUniqueValueClasses
List<CIMUniqueValueClass> listUniqueValueClasses = new List<CIMUniqueValueClass>
{
alabamaUniqueValueClass, californiaUniqueValueClass
};
//Create a list of CIMUniqueValueGroup
CIMUniqueValueGroup uvg = new CIMUniqueValueGroup
{
Classes = listUniqueValueClasses.ToArray(),
};
List<CIMUniqueValueGroup> listUniqueValueGroups = new List<CIMUniqueValueGroup> { uvg };
//Create the CIMUniqueValueRenderer
CIMUniqueValueRenderer uvr = new CIMUniqueValueRenderer
{
UseDefaultSymbol = true,
DefaultLabel = "all other values",
DefaultSymbol = SymbolFactory.Instance.ConstructPointSymbol(ColorFactory.Instance.GreyRGB).MakeSymbolReference(),
Groups = listUniqueValueGroups.ToArray(),
Fields = new string[] { "STATE_NAME" }
};
//Set the feature layer's renderer.
featureLayer.SetRenderer(uvr);
});
} Thanks Uma
... View more
07-17-2018
04:09 PM
|
3
|
2
|
1989
|
|
POST
|
Hi The DAML is used to customize the appearance of the UI, especially the ribbon. Even though you can syntactically use the "deleteDockPane" element in the DAML, the dockpanes are available in code and can be accessed using buttons, etc. You can't completely prevent the ability to display the Symbology dockpane, for example. You can only try and remove all the buttons in the UI that access it. Thanks Uma
... View more
07-16-2018
12:49 PM
|
0
|
4
|
1356
|
|
POST
|
If you need to get the wiki pages in the arcgis-pro-sdk repo for the previous versions - They are available as "branches" in the wiki section of the repo.
... View more
07-11-2018
06:40 AM
|
0
|
1
|
742
|
|
POST
|
Hi Ted, Here is a link on the wiki that gives you the list of the icons available with Pro. https://github.com/Esri/arcgis-pro-sdk/wiki/DAML-ID-Reference-Icons Thanks! Uma
... View more
07-05-2018
11:36 AM
|
3
|
0
|
1649
|
|
POST
|
Here is a sample that shows you how you can use ArcGIS Pro commands in your own add-ins: HookProCommands In your case, here are the snippets to execute Pro's Export button. The id to use for the print button is: "esri_sharing_PrintMap" IPlugInWrapper wrapper = FrameworkApplication.GetPlugInWrapper("esri_sharing_ExportMap");
var command = wrapper as ICommand; // tool and command(Button) supports this
if ((command != null) && command.CanExecute(null))
command.Execute(null); Thanks Uma
... View more
07-02-2018
08:48 AM
|
0
|
1
|
1131
|
|
POST
|
Hi Brian I duplicated your workflow - created an add-in using 2.1 that added a new page to the Options dialog. I then upgraded Pro and this page still showed up in Pro 2.2. I don't think anything has changed - if you see this again, try using those steps to what was causing the add-in to not work. Glad it is working now! Uma
... View more
06-29-2018
02:45 PM
|
0
|
0
|
1006
|
|
POST
|
Hi Brian Try running Pro from the command line using the EnableDiagnostics flag. A log file will get created in your user’s Documents folder under an ArcGIS\Diagnostics sub-folder. This log file could provide some hints as to to why the add-in is not loading. There is also another command line that will allow you to view the DAML items loaded by Pro. You can check the DAML log generated to see if your Property page is being loaded by Pro at startup. View the DAML elements loaded at startup Thanks Uma
... View more
06-29-2018
11:26 AM
|
0
|
2
|
1006
|
|
POST
|
Hi Evan, You can set the "Cursor" property of your custom tool to change the standard cursor. internal class CustomMapTool : MapTool
{
public CustomMapTool()
{
IsSketchTool = true;
SketchType = SketchGeometryType.Rectangle;
SketchOutputMode = SketchOutputMode.Map;
//A custom cursor file as an embedded resource
var cursorEmbeddedResource = new Cursor(new MemoryStream(MapExploration.Resource1.red_cursor));
//A built in system cursor
var systemCursor = System.Windows.Input.Cursors.ArrowCD;
//Set the "CustomMapTool's" Cursor property to either one of the cursors defined above
Cursor = cursorEmbeddedResource;
//or
Cursor = systemCursor;
}
....
... View more
06-21-2018
01:28 PM
|
3
|
1
|
6318
|
|
POST
|
Hi Berend, Here is a snippet for this: Get a button's tooltip heading Thanks Uma
... View more
06-20-2018
11:10 AM
|
2
|
1
|
1584
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 09-18-2025 03:09 PM | |
| 1 | 11-04-2025 08:25 AM | |
| 1 | 09-23-2025 09:31 AM | |
| 1 | 11-20-2024 10:50 AM | |
| 1 | 04-28-2025 03:06 PM |
| Online Status |
Offline
|
| Date Last Visited |
2 weeks ago
|