Yes/No parameter create ScheduleFilterBy

Hi

I want create ScheduleFilter of YesNo Parameter,
I tried with 1 and True but return error.
Can be fix this.
Thank Advance!!!

image

Hi @manhgt214 try take a look on this post here from Cyril…

2 Likes

Thank you so much!
By the way, can be create Schedule with Multiple Categories in 1 view.

image

I founed below, Thank you!

import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *

clr.AddReference('RevitAPIUI')
from Autodesk.Revit.UI import *

clr.AddReference('RevitServices')
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager

doc = DocumentManager.Instance.CurrentDBDocument

#revit_xyz = XYZ()
#revit_point = Point.Create(revit_xyz)
#revit_xyz.ToPoint() = revit_point.ToProtoType()# Both need library Revit.GeometryConversion
#import os
#PathOfModule = os.path.abspath(a_module.__file__)#Get path of module example (Revit.__file__)

names = IN[0]
schedule = []

#Do some action in a Transaction
TransactionManager.Instance.EnsureInTransaction(doc)

id = ElementId.InvalidElementId

for i in names:
	#newSchedule = ViewSchedule.CreateSchedule(doc,id)
	newSchedule = ViewSchedule.CreateMaterialTakeoff(doc,id)
	newSchedule.Name = i
	schedule.append(newSchedule)

TransactionManager.Instance.TransactionTaskDone()

OUT = schedule