Filled Region Edge Graphic Style Id

@jacob.small & @Nick_Boyts, thanks for the revisions, I agree that is how it should look, but I think the process of changing individual lines is the problem I don’t have a solution for. One step back on this, I appear to be getting different results from “Select Model Elements” vs “Get Filled Regions”.

When I select one or multiple Filled Regions via Select Model Elements, I get the “IF” statement to work and all of the GraphicsStyleId’s that I am supposed too. However, I just get a broken node when I use 'Get Filled Regions". I have tried to flatten, create list, levels and nothing seems to work. Anyone have thoughts on that?

Here is the current code:

import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *

# Import DocumentManager and TransactionManager
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager

# Import RevitAPI
clr.AddReference("RevitAPI")
import Autodesk
from Autodesk.Revit.DB import *

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


region = UnwrapElement(IN[0])
geoOpt = app.Create.NewGeometryOptions()
gs1 = UnwrapElement(IN[1])
gs2 = UnwrapElement(IN[2])

TransactionManager.Instance.EnsureInTransaction(doc)

edgeArray = []
for r in region:
	geoElem = r.get_Geometry(geoOpt)
	enum1 = geoElem.GetEnumerator() ; enum1.MoveNext()
	geo2 = enum1.Current
	edgeArray.append(geo2.Edges)
	
currentLineStyles = []
newLineStyles = []
for reg in edgeArray:
	cls = []
	nls = []
	
	for edge in reg:
		cs = doc.GetElement(edge.GraphicsStyleId)
		if cs.Id == gs1.Id:
			cls.append(True)
		else:
			cls.append(False)
			#ns = edge.GraphicsStyleId = gs2.Id
			#nls.append(ns)
	currentLineStyles.append(cls)
	#newLineStyles.append(nls)
TransactionManager.Instance.TransactionTaskDone()

#Assign your outputs to the OUT variable
OUT = currentLineStyles

Here is the Error when using “Get Filled Regions” node:
Capture1

Here is what it looks like when I use “Select Model Elements”: