Answers for "get all view port type dynamo revit"

0

get all view port type dynamo revit

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

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

clr.AddReference('RevitNodes')
import Revit
clr.ImportExtensions(Revit.Elements)

doc = DocumentManager.Instance.CurrentDBDocument


collection = FilteredElementCollector(doc).OfCategory(BuiltInCategory.OST_Viewports).WhereElementIsNotElementType().ToElements()

vptypes = []
for e in collection:
	if e.Category != None:
		vptypes.append(e.ToDSType(True))

OUT = vptypes
Posted by: Guest on August-15-2021

Python Answers by Framework

Browse Popular Code Answers by Language