Posts

Showing posts from September, 2022

Revit.Dynamo.Python.CPython3 Schedules on sheets

 Python for placed schedules on sheets - returns  Schedule Name Sheet Name Sheet Number Schedule name for schedules not placed on sheets #!python3 ##Code pre-directive untested! ##Apsis0215 R Allen 2022-09-28 CPy3 import clr clr . AddReference ( "RevitServices" ) from RevitServices . Persistence import DocumentManager doc = DocumentManager . Instance . CurrentDBDocument ##Current Document import Revit from Autodesk . Revit . DB import FilteredElementCollector , ScheduleSheetInstance , ViewSchedule PlacedSchedules = FilteredElementCollector ( doc ). OfClass ( ScheduleSheetInstance ). WhereElementIsNotElementType (). ToElements () PlacedSchedulesName = [ PSS . Name for PSS in PlacedSchedules ] PlacedSchedulesID =[ VID . ScheduleId for VID in PlacedSchedules ] AllSchedules = FilteredElementCollector ( doc ). OfClass ( ViewSchedule ). WhereElementIsNotElementType (). ToElements () AllSchedulesID =[ VID . Id for VI

Create Generic Annotations in list in Drafting View.FamilyViewType

Create generic annotaitons in  a drafting view of type AE-GENN-ANNO v2.20 import sys ##Standard system input import clr ##https://gist.github.com/gtalarico/e6be055472dfcb6f597e3dcd20d11f37 from Autodesk . Revit . DB import FilteredElementCollector import RevitServices from RevitServices . Persistence import DocumentManager from RevitServices . Transactions import TransactionManager # Drafting Views from Autodesk . Revit . DB import BuiltInCategory , BuiltInParameter from Autodesk . Revit . DB import ViewFamilyType , ViewDrafting , Element from Autodesk . Revit . DB import ViewFamily from Autodesk . Revit . DB import Transaction ###Creates a Drafting View### from Autodesk . Revit . DB import Transaction , Element , ElementTransformUtils ##https://forum.dynamobim.com/t/collecting-all-elements-of-family-types-in-active-view/19838/2 from Autodesk . Revit . DB import BuiltInCategory , BuiltInParameter