# -*- coding: utf-8 -*-
#⬇ IMPORTS
from Autodesk.Revit.DB import *
#📦 VARIABLES
doc = __revit__.ActiveUIDocument.Document
active_view = doc.ActiveView
active_level = doc.ActiveView.GenLevel
#🎴 ALL VIEW TYPES
view_types = FilteredElementCollector(doc).OfClass(ViewFamilyType).ToElements()
#🔎 FILTER VIEW TYPES
view_types_3D = [vt for vt in view_types if vt.ViewFamily == ViewFamily.ThreeDimensional]
view_type_3D = view_types_3D[0]
#🎯 Create 3D - Isometric
with Transaction(doc,'Create 3D Isometric') as t:
t.Start()
view3D = View3D.CreateIsometric(doc, view_type_3D.Id)
t.Commit()
__author__ = '🙋♂️ Erik Frits'