Here is a summary of the discussion and solution for setting
ActiveView during the
Idling event from the Revit API discussion forum raised and solved by Rudi 'Revitalizer' and Kinjal Desai; As per API documentation, this operation should not be invalid: no open transactions;
IsModifiable is ok;
IsReadOnly is ok; No pre-action events around. However, trying to do so throws an
InvalidOperationException with the message "Setting active view is temporarily disabled"...