Hide PyRevit Core on Startup

Hello @Mark_Ackerley

I use two hook scripts to hide the pyrevit tab on every opening or creation of a file. So this also runs when creating or opening a family, which is not perfect but it works. I don´t use a startup.py for this because I can not control the c drive of all users, thats why i like this method more because i still can control it when it is lying on the server.

image

#-*- coding: utf-8 -*-
import clr
clr.AddReference('AdWindows')
clr.AddReference('RevitAPI')
clr.AddReference("RevitAPIUI")
from Autodesk.Revit.DB import*
import Autodesk.Windows as AdWindows

doc = __eventargs__.Document
app = __revit__

Ribbon = AdWindows.ComponentManager.Ribbon
Tabs = Ribbon.Tabs

names=[]
for tab in Tabs:
    Id = tab.Id
    Name = tab.AutomationName
    visible = tab.IsVisible
    names.append(Name)
    if Name == "pyRevit":
        pyRevit = tab

pyRevit.IsVisible = False
3 Likes