Hooks doc-opened

So I am finally understanding what goes ‘wrong’.

Let me explain it better (now I understand the cause).

I have a hook that checks a file name.

  1. I run a script
  2. script print ‘running script started’
  3. output window popup showing ‘running script started’.
  4. Script opens projectfile in the background
  5. script print ‘loaded from file …’
  6. NEW output window popup showing ‘loaded from file ….’
  7. Script opens another projectfile in the background
  8. script print ‘loaded from file …’
  9. ANOTHER output window popup showing ‘loaded from file ….’

What python does:

The popup has an OutputId which is set tot the pyRevit command it belongs to.
source: pyrevitlib/pyrevit/output__init__.py/def output_id(self)

So

  1. popup = script id.

  2. popup = hook check_file_name is probably seen as new pyrevit command thus new popup

  3. popup = hook check_file_name is probably seen as new pyrevit command thus new popup

This is what I think is happening.

Unsure if it’s logical to have hooks labelled as pyrevit commands.

Your thoughts?