Filled Region Edge Graphic Style Id

Thanks!
I ended up finding this thread which led me to get that script working.

Here’s the script that is currently working in 22:

# Enable Python support and load DesignScript library
import clr

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

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

doc = DocumentManager.Instance.CurrentDBDocument

#The inputs to this node will be stored as a list in the IN variable.
filled_regions = IN[0]
line_style = IN[1]


def function(filled_region, line_style):
	filled_region.SetLineStyleId(line_style.Id)
	
	return filled_region


output = None


TransactionManager.Instance.EnsureInTransaction(doc)

if isinstance(filled_regions, list):
	output = [function(
		UnwrapElement(a), UnwrapElement(line_style)) for a in filled_regions]
else:
	output = function(
		UnwrapElement(filled_regions), UnwrapElement(line_style))

TransactionManager.Instance.TransactionTaskDone()

#Assign your output to the OUT variable.
OUT = output

I have yet to test it in R24, so I may come back to what you’re providing here shortly! :slight_smile:

1 Like