Tags (part of Packages & Tags) Questions

I just want good clarification on how TAGs work and their nuances.

Can you confirm what Tags work with? I believe the following are not taggable:

  • Groups
  • Lines
  • Text
    Can you confirm this? If I wrong can you advise how? Are there other things that I’ve missed that aren’t taggable?

Semi unrelated: Is there another tool/ way to filter specific lines and groups?

In reply to your semi unrelated question:

Here’s one way you can filter specific lines by part of a name:

# string to filter for
npId = 'NPLT'

# shortcut for DB.BuiltInParameter
BIP = DB.BuiltInParameter

param_provider = DB.ParameterValueProvider(DB.ElementId(BIP.BUILDING_CURVE_GSTYLE))
param_rule = DB.FilterStringRule(param_provider,DB.FilterStringContains(),npId)
param_filter_curve = DB.ElementParameterFilter(param_rule)

curve_elem_ids = DB.FilteredElementCollector(doc).WherePasses(param_filter_curve).WhereElementIsNotElementType().ToElementIds()

Can you give me a little more info on how to do this? I don’t even know where to start to put in this script.

In my post from the other day I copied in the entire script: https://discourse.pyrevitlabs.io/t/challenge-optimize-noplot-hooks/1196?u=scartmell