Hello,
I got an issue in a custom GP tool I don't really understand:
In my UpdateMessages() method, I use the following code to run through all layers:
The purpose is to look for layers with duplicate names.
This works fine when I don't run the tool in the background. In background mode however, the Execute() method is never
triggered.
This seems to happen after enumLayer.Next(). When commenting away the enumLayer.Next() and the code below, it works again.
There are no error messages or exceptions occuring, and Arc claims that the tool executed succesfully.
When calling IGPMessages.AddMessage() as the first action in Exceute(), nothing is yielded.
Am I missing something here ?
Oyvind
I got an issue in a custom GP tool I don't really understand:
In my UpdateMessages() method, I use the following code to run through all layers:
Code:
IEnumLayer enumLayer = gpUtils.GetMapLayers();
enumLayer.Reset();
ILayer layer = enumLayer.Next();
while (layer != null)
{
<code here>
layer = enumLayer.Next();
}
This works fine when I don't run the tool in the background. In background mode however, the Execute() method is never
triggered.
This seems to happen after enumLayer.Next(). When commenting away the enumLayer.Next() and the code below, it works again.
There are no error messages or exceptions occuring, and Arc claims that the tool executed succesfully.
When calling IGPMessages.AddMessage() as the first action in Exceute(), nothing is yielded.
Am I missing something here ?
Oyvind