Contains Text Rule to find Line Type


I would like to filter a specific Detail Line type which contains the keyword ‘red’. In this example I have a line type called ‘00_RED_Boundary’ but can’t find the right Parameter to pass as an input to the component. Is there a way to find the correct parameter name?

Here I tried to identify the type with the inspect component but it didn’t work. The errors I get are:
1. Failed to found parameter ‘Line Style’ in Revit document.
1. Conversion from ‘Line Style’ to Parameter may be ambiguous. Please use ‘BuiltInParameter Picker’ or a ‘Parameter’ Param

Thank you in advance!


A few ways of doing this.

Here we got all the lines in a view, got their Line Style Name and used a Match Text to Cull the List.

Using Revit Lookup you can see that the LineStyle is not a text parameter but a GraphicStyle (hence your error), even further into it you will see the GraphicsStyleCategory is the one needed.

Without going to into scripting a FilteredElementCollector something like this should work for you

Filtering (11.9 KB)

Thank you for the quick reply and the thorough explanation! Both approaches work well. I ended up using Match Text to Cull method because the Value Picker method does not keep the item checked when re-using the definition on a different Revit file. I don’t suppose there is a way to lock the checked item in value picker so it always stays selected?


Using a hard coded Style Name input will return the current documents LineStyle, the value picker in this case needs to refresh on the change of document (Element Ids might be different for the same Style Name in separate documents)

That makes sense, thank you very much!