Check if Schedule field IsHidden?

import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
clr.AddReference('DSCoreNodes')
from DSCore import *
clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.GeometryConversion)
from Revit.Elements import *
clr.AddReference('System')
from System.Collections.Generic import *
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *
clr.AddReference('RevitServices')
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager

doc = DocumentManager.Instance.CurrentDBDocument
uiapp = DocumentManager.Instance.CurrentUIApplication
app = uiapp.Application
#The inputs to this node will be stored as a list in the IN variables.
dataEnteringNode = IN

scheduleField = UnwrapElement(IN[0])

for i in scheduleField:
	Field = i.IsHidden

OUT = Field

Hi guys,
How to check if the schedule field IsHidden?

Got it

import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
clr.AddReference('DSCoreNodes')
from DSCore import *
clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.GeometryConversion)
from Revit.Elements import *
clr.AddReference('System')
from System.Collections.Generic import *
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *
clr.AddReference('RevitServices')
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager

doc = DocumentManager.Instance.CurrentDBDocument
uiapp = DocumentManager.Instance.CurrentUIApplication
app = uiapp.Application
#The inputs to this node will be stored as a list in the IN variables.
dataEnteringNode = IN

keyschedule = UnwrapElement(IN[0])
definition = keyschedule.Definition
ids = definition.GetFieldOrder()
names = []
hidden = []
for id in ids:
param = definition.GetField(id)
names.append(param.GetName())
hidden.append(param.IsHidden)

OUT = hidden
1 Like

Thank you @interactiverendering I know very little Python. When I created a node for this I got some indentation errors. It took me a little while to figure out how to fix it.
Putting it here in case there are any others out there that need to find hidden fields in a table and are horrible with Python like me.

import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
clr.AddReference('DSCoreNodes')
from DSCore import *
clr.AddReference('RevitNodes')
import Revit
clr.ImportExtensions(Revit.GeometryConversion)
from Revit.Elements import *
clr.AddReference('System')
from System.Collections.Generic import *
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *
clr.AddReference('RevitServices')
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager

doc = DocumentManager.Instance.CurrentDBDocument
uiapp = DocumentManager.Instance.CurrentUIApplication
app = uiapp.Application
#The inputs to this node will be stored as a list in the IN variables.
dataEnteringNode = IN

schedule = UnwrapElement(IN[0])

TransactionManager.Instance.EnsureInTransaction(doc)

definition = schedule.Definition
ids = definition.GetFieldOrder()
names = []
hidden = []
for id in ids:
	param = definition.GetField(id)
	names.append(param.GetName())
	hidden.append(param.IsHidden)
	
TransactionManager.Instance.TransactionTaskDone()

OUT = hidden