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.
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.
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 = )