Hide all lines of a specific line style / texts of a specific text type

Hi @ToanDN ,
what I can say from your screenshot is that the problem most probably happens when you filter your list. Nothing comes out of the “In” output, and thats where the lines of the line style you want should be… I would be intersted in seeing what comes out of the list.map node…

Anyway,
You can try this if you’d like:


This little code will get all lines of a linestyle (then you can hide them with the view.hideelements node) :

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


doc = DocumentManager.Instance.CurrentDBDocument


alllines = FilteredElementCollector(doc).OfCategory(BuiltInCategory.OST_Lines)
n = IN[0]
lines = [x for x in alllines if x.LineStyle.Name == n ]

OUT = lines

I have wrapped it in a node called “all lines of linestyle” in the Node-Mode package.

I hope this helps

4 Likes