Hi everyone,
is there a way to export the filter overrides to excel or extract the colors, line patterns and patterns from the overrides? I am trying to assign the projection line colors to the patterns as they were wrongly assigned.
thanks
Hi everyone,
is there a way to export the filter overrides to excel or extract the colors, line patterns and patterns from the overrides? I am trying to assign the projection line colors to the patterns as they were wrongly assigned.
thanks
Does this help get you moving?
#Sean Page, 2022
import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *
from Autodesk.Revit.DB.Structure import *
clr.AddReference('RevitAPIUI')
from Autodesk.Revit.UI import *
clr.AddReference('System')
from System.Collections.Generic import List
clr.AddReference('RevitNodes')
import Revit
clr.ImportExtensions(Revit.GeometryConversion)
clr.ImportExtensions(Revit.Elements)
clr.AddReference('RevitServices')
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
doc = DocumentManager.Instance.CurrentDBDocument
uidoc=DocumentManager.Instance.CurrentUIApplication.ActiveUIDocument
#Preparing input from dynamo to revit
view = UnwrapElement(IN[0])
overrides = UnwrapElement(IN[1])
#Do some action in a Transaction
TransactionManager.Instance.EnsureInTransaction(doc)
ovr = [view.GetFilterOverrides(x.Id) for x in overrides]
cutLineColors = [y.CutLineColor for y in ovr]
cutLineWeights = [y.CutLineWeight for y in ovr]
cutLinePatternIds = [y.CutLinePatternId for y in ovr]
TransactionManager.Instance.TransactionTaskDone()
OUT = cutLineColors,cutLineWeights,cutLinePatternIds
Here is the reference to the API which will give you what you can get from the Filter.
Excellent @Alban_de_Chasteigner!
Thank you guys, much appreciated