Doc-updater Hook

Hi, all!

I faced a really weird error and I am confused.
Recently I saw an example of using doc-updater hook to set parameters for door orientation.
I thought I could use the same logic to set the Spot Elevation suffix.
So I started creating the script and it turns out that I can’t even load the revit module.

Here is the error message -

image

Any thoughts?

It shoudl work as advertised :slight_smile:
try and bind to a different engine (you are on 277) try 2711
and maybe a restart of Revit can help

Thanks. I tried different engine versions, closed Revit, restarted the PC - everything.
The strange thing is that the same lines are working perfectly fine with another extension.

Do you happen to have multiple doc-updater.py hooks? in different extensions, maybe they are interfering?

No, only this one. I will continue digging and trying to revert engineering the example existing extension hook which is working.

Ok, I managed to make it work but …
I was examining the original extension -“Custom Tools” link -Notion – The all-in-one workspace for your notes, tasks, wikis, and databases.

It turns out that the doc-updater.py hook is not working if it is the only hook in the hooks folder.
It requires the app-init.py hook as well. In app-init.py I am not sure what exactly is happening to make the doc-uptater.py work but with the app-init.py hook, the updater hook starts working. Actually, I kept only the import part of the app-init.py and that was enough.

# -*- coding: UTF-8 -*-

import os

import subprocess

from pyrevit.userconfig import user_config

from hooksScripts import versionLogger, releasedVersion, snapshot

from customOutput import ct_icon, mass_message_url

from customOutput import def_hookLogs, def_revitBuildLogs, def_revitBuilds, def_massMessagePath

from customOutput import def_syncLogPath, def_openingLogPath, def_dashboardsPath, def_language

from customOutput import def_doorUnflipped, def_doorFlipped, def_windowUnflipped, def_windowFlipped

from customOutput import company_conf

there are a bit more library files involved.
All files are available here - Bitbucket
In the hooks and lib folders.

Maybe @davidvadkerti (the author of the original extension) could help a bit to solve the mystery = )