Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

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
Comment

PREVIOUS NEXT
Code Example
Python :: python turn seconds into zulu time 
Python :: sns linear regression 
Python :: how to draw triangle in pygame 
Python :: creation 2eme fenetre tkinter 
Python :: fetch member by id discord.py 
Python :: fibonacci sequence python code 
Python :: python code to print fibonacci series 
Python :: convert python to java online 
Python :: how to check if a column exists before alter the table 
Python :: add vertical line to horizontal graph 
Python :: filter outside queryset in list django 
Python :: python for loop start at index with enumerate 
Python :: how to accept invalidfileexception in python 
Python :: how fast is iglob 
Python :: python last element of list using reverse() function 
Python :: mechanize python #12 
Python :: djago get settings 
Python :: download python for windows 7 32-bit 
Python :: generate jwt token just passing userid in rest_framework_simplejwt 
Python :: schema json in oython 
Python :: # multithreading for optimal use of CPU 
Python :: double except python 
Python :: load xgb 
Python :: insertion sort algorithm in descending order 
Python :: matplotlib insert small subplot into subplot 
Python :: how to create dict key with list default -2 
Python :: python gender input 
Python :: affochage dun index du array list a deux dimension 
Python :: python ordereddict initialization 
Python :: pathlib home 
ADD CONTENT
Topic
Content
Source link
Name
4+1 =