How do I add multible objects to a selection, without having the ObjectGotSelection fired once for each object ?
That’s an odd request–the whole point of the GoView.ObjectGotSelection event is to notice when GoView.Selection.Add is called. (The same is true for the GoObject.OnGotSelection method, which is called at the same time, if the object is a document object.)
But you don’t have to define a GoView.ObjectGotSelection event handler, if you don’t want to. Or perhaps you can optimize its behavior, if it’s taking too much time because of repetitive updating of your UI.
For example, I did one such optimization in one of my test applications where a ListView displays the contents of the GoView.Selection. I made the code smarter so that it didn’t modify the ListView unless a visible change would occur.
An alternative strategy would be to update your Selection-dependent UI at a later time. So the GoView.ObjectGotSelection/ObjectLostSelection events would just record the fact that your UI was out of date. Then some other event could actually cause your UI to update itself. The appropriate event might be a Control.Paint event, or might be something else specific to your application.