pyRevit

Code
Library
Create View: ViewDrafting
# -*- 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_drafting = [vt for vt in view_types if vt.ViewFamily == ViewFamily.Drafting]
view_type_drafting = view_types_drafting[0]
#๐ฏ Create Drafting View
with Transaction(doc,'Create Drafting') as t:
t.Start()
view = ViewDrafting.Create(doc, view_type_drafting.Id)
t.Commit()
__author__ = '๐โโ๏ธ Erik Frits'
โจ๏ธ Happy Coding!
Erik Frits