|
POST
|
Custom contextual help is supported on dockpanes (scroll to the bottom of this guide to see contextual help): ProGuide DockPanes · Esri/arcgis-pro-sdk Wiki (github.com) I am still trying to find out how to customize the F1 help from the ribbon.
... View more
07-21-2021
08:27 AM
|
0
|
0
|
1733
|
|
POST
|
for 1: you can reset the current tool to the default tool when you're done. In the sample code that would look like this: public void UpdateStatusFromAnyThread (string msg)
{
RunOnUiThread(() =>
{
SelectionResult = msg;
// reset the current tool to the default (explore) tool
FrameworkApplication.SetCurrentToolAsync("esri_mapping_exploreTool");
});
} for 2: You can remove the ribbon reference, but not the maptool definition, so your config.daml can look like this: <groups>
<!-- comment this out if you have no controls on the Addin tab to avoid
an empty group-->
<group id="DockPaneWithTool_Group1" caption="Group 1" appearsOnAddInTab="true">
<!-- NOT NEEDED in the UI
<tool refID="DockPaneWithTool_MySelectionTool" size="large" />
-->
<button refID="DockPaneWithTool_MyDockpane_ShowButton" size="large" />
</group>
</groups> but make sure that you don't remove the <tool ... > tag.
... View more
07-21-2021
07:29 AM
|
1
|
1
|
5185
|
|
POST
|
I attached a sample with a tool that is instantiated from a dockpane and reports the selection results on the dockpane:
... View more
07-20-2021
03:30 PM
|
2
|
0
|
5199
|
|
POST
|
I assume that your dockpane code and your map tool are in the same add-in. In this case the JIT loading/pre-loading that you refer to above (https://github.com/Esri/arcgis-pro-sdk/wiki/ProGuide-Buttons#preload-a-button ) is not relevant. Just implement your map tool (using the Button item template from the SDK) and try to use it from the button on the Pro ribbon (the default button added by the SDK template). If the tool works as expected you can then add a button to your XAML and follow the implementation for reusing Pro buttons in MVVM: ProGuide Reusing Pro Commands · Esri/arcgis-pro-sdk Wiki (github.com) If the tool works from your dockpane you can remove the map tool reference from config.daml in case you don't need the map tool's button to be shown on the Pro ribbon.
... View more
07-20-2021
01:28 PM
|
0
|
1
|
5316
|
|
POST
|
I tried this and found that the Url parameter for CreatePictureGraphicElement is limited as it doesn't support pack Uris as input. I was able to get it to work by setting the 'Build' action for my embedded picture to 'Content' and the 'Copy to Output' to 'Copy if newer'. This will unzip the actual jpg in my add-in folder as soon as the add-in is loaded by Pro and i can access the image via a 'local path'. I attached my sample for your reference.
... View more
07-20-2021
08:35 AM
|
0
|
1
|
3596
|
|
POST
|
You can use the 'FittingStrategy' property of the CIMTableFrame to set the auto sizing behavior: var theTable = LayoutElementFactory.Instance.CreateTableFrame(layout, EnvelopeBuilder.CreateEnvelope(llTab1, urTab1), mfElm, lyr, new string[] { "Label", "Description" });
var def = theTable.GetDefinition() as CIMTableFrame;
def.FittingStrategy = TableFrameFittingStrategy.AdjustColumnsAndSize;
def.FillingStrategy = TableFrameFillingStrategy.ShowAllRows;
theTable.SetDefinition(def);
... View more
07-16-2021
10:57 AM
|
1
|
0
|
1103
|
|
POST
|
try this code change instead: var finalValue = string.Empty;
foreach (string item in gradeRangeInfo)
{
// change to your existing code is here:
finalValue += System.Environment.NewLine + item;
}
... View more
07-15-2021
04:19 PM
|
1
|
1
|
1418
|
|
POST
|
It does look like the Inspector class honors the 'Visible' setting (see Dan's reference above) and hides the attribute column if the 'Visible' checkbox is unchecked. I implemented an attribute control in my 'Show Attributes' dockpane and changed the 'Visible' checkbox state. Below the 'Visible' is off and you can see that the 'Description' column is not displayed: Next i checked the 'visible' checkbox and the attribute column appeared:
... View more
07-08-2021
02:47 PM
|
0
|
1
|
3087
|
|
POST
|
To get the current 'selection' from the map you want to use this method: var selection = MapView.Active.Map.GetSelection(); GetSelection returns a 'dictionary' defined as: Dictionary<MapMember, List<long>> In essence for each MapMember (MapMember is the common base class for StandaloneTables, Layers, FeatureLayers, etc) you get a list of object ids for all selected rows or features for that particular MapMember. Using the returned 'selection' you have to first chose one 'MapMember' or 'FeatureLayer' for which you want to get the attribute, The following snippet finds a MapMember with a selected set by name: var selectedMapMember = selection.Keys.Where(mapMember => mapMember.Name.Equals(layerName, StringComparison.OrdinalIgnoreCase)).FirstOrDefault() as FeatureLayer;
if (selectedMapMember == null) return; Next you can use the selectedMapMember to search for the selected rows. Putting it all together (in a button's OnClick method) your workflow would look like this: protected override void OnClick()
{
// set the layer name to choose
var layerName = "TestPoint";
// select the attribute column
var columnName = "Description";
// initiate the following code to execute on the MCT
QueuedTask.Run(() =>
{
try
{
// get the current selection for the active map
var selection = MapView.Active.Map.GetSelection();
// selection is of type: Dictionary<MapMember, List<long>>
// first we find the FeatureLayer we are interested in:
var selectedMapMember = selection.Keys.Where(mapMember => mapMember.Name.Equals(layerName, StringComparison.OrdinalIgnoreCase)).FirstOrDefault() as FeatureLayer;
if (selectedMapMember == null)
{
MessageBox.Show($@"No selection for: {layerName}");
return;
}
// selectedMapMember is the layer we are interested in
// now we get the row or features
using (var cursor = selectedMapMember.Search(new QueryFilter { ObjectIDs = selection[selectedMapMember] }))
{
while (cursor.MoveNext())
{
using (var feature = cursor.Current as Feature)
{
// process each attribute
MessageBox.Show($@"oid: {feature.GetObjectID()} {columnName}: {feature[columnName]}");
}
}
}
}
catch (Exception ex)
{
MessageBox.Show($@"Exception: {ex}");
}
});
}
... View more
07-06-2021
07:36 AM
|
1
|
0
|
2417
|
|
POST
|
I would recommend to use a ProWindow instead of a Windows Form. A ProWindow can stay on top with this: myProWindow.Owner = FrameworkApplication.Current.MainWindow; I haven't tried this, but you should be able to get your required functionality by using something like this: NativeWindow ownerWindow = new NativeWindow();
ownerWindow.AssignHandle((new WindowInteropHelper(FrameworkApplication.Current.MainWindow)).Handle);
winForm.Show(ownerWindow);
... View more
07-02-2021
08:25 AM
|
2
|
1
|
3757
|
|
POST
|
@MarvisKisakye1 You probably already looked at this sample: arcgis-pro-sdk-community-samples/Geodatabase/DynamicJoins at master · Esri/arcgis-pro-sdk-community-samples (github.com) However, the sample only creates a 'dynamic' result (added to the TOC). To create a relationship class in the geodatabase you have to follow Rich's suggestion.
... View more
07-01-2021
04:12 PM
|
1
|
0
|
2202
|
|
POST
|
Here is a Pro Guide on States & Conditions: ProGuide Code Your Own States and Conditions · Esri/arcgis-pro-sdk Wiki (github.com)
... View more
06-30-2021
01:34 PM
|
0
|
0
|
6868
|
|
POST
|
I tried your code snippet and it worked fine with my sample mapx files. It might be a specific layer/renderer setting that is causing the error you're getting. If you can send me your mapx file using a 'private message' i can take a look.
... View more
06-30-2021
07:04 AM
|
0
|
1
|
1781
|
|
POST
|
The problem has been duplicated by the Pro Dev team and it's been scheduled to be fixed in 2.8.2. Thanks again for reporting this.
... View more
06-30-2021
06:35 AM
|
3
|
0
|
3793
|
|
POST
|
I duplicated the problem using 2.8 on one of my test machines as well. We relayed the information to the Pro Dev team and they are looking into this now.
... View more
06-29-2021
12:13 PM
|
1
|
1
|
3810
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 10-29-2025 10:48 AM | |
| 1 | 05-24-2021 09:04 AM | |
| 1 | 12-03-2020 08:44 AM | |
| 1 | 10-07-2025 07:27 AM | |
| 2 | 12-29-2025 10:03 AM |
| Online Status |
Offline
|
| Date Last Visited |
05-21-2026
01:59 PM
|