Uma,
Thanks. I've changed both the autoLoad and loadOnClick as you suggested, however, the button code does not execute until the button has been click.
<modules>
<insertModule id="EditRBIDGeneratorPro_Module" className="Module1" autoLoad="true" caption="Module1">
<button id="EditRBIDGeneratorPro_Button1" caption="RBID Activate" className="Button1" loadOnClick="false" ...>
<tooltip heading="RBID Activate Tooltip">Click to ensure the automatic addition of a RBID during edit sessions<disabledText /></tooltip>
The code I'm trying to execute is within the the OnClick function. Is that the issue?
namespace EditRBIDGeneratorPro
{
internal class Button1 : Button
{
private Incrementor uid;
protected override async void OnClick()
{
try
{
var mapView = MapView.Active;
if (mapView == null)
{
var startString = "No map view";
MessageBox.Show(startString);
}
var featureLayers = mapView.Map.Layers.OfType<FeatureLayer>();
....
}
catch (Exception ex)
{
var ErrorString = ex.Message;
MessageBox.Show("An error occurred while updating attribute column data " + ErrorString);
}
}
Thanks again,
Frank