Answers for "remove paint dynamo revit"

0

remove paint dynamo revit

import clr

#Import the Revit API
clr.AddReference('RevitAPI')
import Autodesk
from Autodesk.Revit.DB import *

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

#Reference the active Document and application
doc = DocumentManager.Instance.CurrentDBDocument

elems = UnwrapElement(IN[0])

gOpts = Options()

TransactionManager.Instance.EnsureInTransaction(doc)
for i in elems:
	geom = i.get_Geometry(gOpts)
	for j in geom:
		face = j.Faces
		for f in face:
			if doc.IsPainted(i.Id, f):
				doc.RemovePaint(i.Id, f)
TransactionManager.Instance.TransactionTaskDone()
		
OUT = 0
Posted by: Guest on August-10-2021

Python Answers by Framework

Browse Popular Code Answers by Language