Hi everyone,
We have a custom toolbar with lots of forms to make loading enterprise wide data more user friendly, especially for non-GIS staff. From time to time we send out surverys asking the users if there are additional data sets they wish added to our forms. Since few people return the surveys, we thought a better way of tracking this is to see what data users are adding themselves through the Add Data button on the Standard toolbar.
My first attempt, was to create an extension and listen for the IActiveViewEvents::ItemAdded event. This works great but I get layers recorded that I do not want to track. We have predefined load sets which contain all the most common layers used by a particular group of users. Right now we have about a dozen different load sets. I already know which layers are in these load sets so I do not need to track them but IActiveViewEvents::ItemAdded tracks everything.
My second attempt was to use a customization filter to trap when the Add Data button is pressed and again this works great. However, as others have pointed out in previous posts, you cannot get anything in return from a built-in command so while I can detect the user pressing the Add Data button, I have no way of detecting what they added.
I thought about creating my own Add Data button but cannot figure out how to remove the built-in Add Data button and replace it with my own. Plus this seems like overkill.
Does anyone have an idea how to best get around this problem?
I could stick with IActiveViewEvents::ItemAdded and just ignore the layers from the load sets but was hoping for something more efficient as I suspect running queries to see if I layer has already been loaded would slow down the whole code and since the code has to run through Citrix, performance is a big issue.
Thanks,
Carlos