I need for my background plugin the information which window in a view has the focus (which is selected). In the example picture it would be the 4th (Index 3). I just have not figured out how to get to this info.
There is a “SmartClient.GetSelectedCameraRequest”.
You can see it in use if you explore the Message Tester tools plugin sample.
This does not give you the view item but gives you the currently selected camera in that view item if the view item has a camera. This is not what you have asked but I hope it is what you can use.
I did not find a method where you can ask for and get the view item. What you can do instead is to subscribe to “SmartClient.SelectedViewItemChangedIndication” and then yourself maintain the information about which view item is currently selected.
You can also see this in use if you explore the Message Tester tools plugin sample.
Great, with “SmartClient.SelectedViewItemChangedIndication” and “SmartClient.SelectedViewChangedIndication” I’m able to get the index:
private object SelectedViewItemChanged(Message message, FQID destination, FQID sender)
{
if (\_viewAndLayoutItem != null && \_viewAndLayoutItem.HasChildren != [HasChildren.No](http://HasChildren.No "http://HasChildren.No"))
{
List<Item> children = \_viewAndLayoutItem.GetChildren();
\_actualViewIdx = children.FindIndex(f => f.FQID.ObjectId == message.RelatedFQID.ObjectId);
}
return null;
}
Thanks… ![]()