Subelements of Filled Regions

I’m working on a script to automate changing linetypes and linetypes of filled region sketches in Dynamo. Changing lines works great, but I’m having some trouble with the filled regions. I want to change all filled region sketch lines of Graphic Style “03_Solid_Black” to something else. So far I’ve only found a way to do this by specific filledregion type, not individual sub element graphic styles…
How can I iterate through the subelements and check their line styles? This python returns an empty list of subelements for each filled region.

import clr
from Autodesk.DesignScript.Geometry import *

# Import DocumentManager and TransactionManager
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager

# Import RevitAPI
import Autodesk
from Autodesk.Revit.DB import *

doc = DocumentManager.Instance.CurrentDBDocument
uiapp = DocumentManager.Instance.CurrentUIApplication
app = uiapp.Application

region = FilteredElementCollector(doc).OfClass(FilledRegion).WhereElementIsNotElementType().ToElements()

out = []


for r in region:
	z = UnwrapElement(r)

#Assign your outputs to the OUT variable
OUT = out

Hi @jackchaskell,

There is a FilledRegion LineStyle Change node in Genius Loci package.
It might help you accomplish this task.

Ooh, thanks - I’ll have to check it out.

@Alban_de_Chasteigner this node from Genius Loci still doesn’t offer any way to filter out filled regions that don’t contain the line style I’m trying to change - it’s just taking all filled regions and changing them to a new line style…Any other ideas?
I’m not finding any method in the Revit API that will allow me to do this :frowning: