Sample Code Revit Batch Processor 1.1.11 documentation
Retrieves the corresponding category object from the Revit document based on the category names provided in the category data instance.
doc (Revit Document): The Revit document object. category_data_instance (CategoryData): An instance of the CategoryData class representing the category and subcategory names, and visibility information.
RevitCategoryOverride or None: The created RevitCategoryOverride object if a match is found, otherwise None.
Converts a list of category data objects into category override storage objects.
doc (Revit Document): The Revit document object. category_data_objects (list): A list of category data objects.
list: A list of category override storage objects representing the converted category data objects.
Converts a filter data instance into a RevitFilterOverride object.
doc (Revit Document): The current Revit model document. filter_data_instance (FilterDataInstance): The filter data instance to be converted.
RevitFilterOverride: The converted filter override object, or None if the filter does not exist in the model.
Converts a list of filter data objects into a list of RevitFilterOverride objects.
doc (Revit Document): The current Revit model document. filter_data_objects (list): A list of filter data objects to be converted.
list: A list of RevitFilterOverride objects that represent the converted filter data objects.
Creates a Revit Color object instance from a ColourBase object
data_colour – A ColourBase instance.
None if ColourBase values are -1, or larger then 255, otherwise a Color instance.
Autodesk.Revit.DB.Color
Returns the first fill pattern id in model matching name provided, or None if none was found.
doc (Autodesk.Revit.DB.Document) – Current Revit model document.
data_pattern (PatternSettingBase
) – A pattern settings base object instance
The pattern id if a match eas found or Invalid Element Id (-1)
Autodesk.Revit.DB.ElementId
Returns the first line pattern id in model matching name provided, or None if none was found.
doc (Autodesk.Revit.DB.Document) – Current Revit model document.
data_pattern (PatternSettingBase
) – A pattern settings base object instance
The pattern id if a match eas found or Invalid Element Id (-1)
Autodesk.Revit.DB.ElementId
Creates a Revit OverrideGraphicSettings instance from settings stored in an OverrideByCategory object.
doc (Autodesk.Revit.DB.Document) – Current Revit model document.
data_override (OverrideByCategory
) – An OverrideByCategory object
is_filter_override (bool, optional) – Flag indicating an override for a filter (True), defaults to False
An OverrideGraphicSettings instance
Autodesk.Revit.DB.OverrideGraphicSettings
Retrieves projection override settings from an OverridesGraphicSettings object
view_override_graphic (Autodesk.Revit.DB.OverridesGraphicSettings) – An overrides graphic setting
line_patterns ([AutoDesk.Revit.LinePatternElement]) – All line patterns in the model
fill_patterns ([Autodesk.Revit.DB.FillPatternElement]) – All fill patterns in the model
An overrides projections object instance.
Retrieves cut override settings from an OverridesGraphicSettings object
view_override_graphic (Autodesk.Revit.DB.OverridesGraphicSettings) – An overrides graphic setting
line_patterns ([AutoDesk.Revit.LinePatternElement]) – All line patterns in the model
fill_patterns ([Autodesk.Revit.DB.FillPatternElement]) – All fill patterns in the model
An overrides projections object instance.
Returns the category overrides for all categories past in for a given view.
view (Autodesk.Revit.DB.View) – The view from which to retrieve the category overrides.
categories_in_model (_type_) – All categories in the model.
line_patterns ([AutoDesk.Revit.LinePatternElement]) – All line patterns in the model
fill_patterns ([Autodesk.Revit.DB.FillPatternElement]) – All fill patterns in the model
A list of all category overrides for a view.
Returns the filter overrides for all filter applied to a given view.
doc (Autodesk.Revit.DB.Document) – Current Revit model document.
view (Autodesk.Revit.DB.View) – The view from which to retrieve the category overrides.
line_patterns ([AutoDesk.Revit.LinePatternElement]) – All line patterns in the model
fill_patterns ([Autodesk.Revit.DB.FillPatternElement]) – All fill patterns in the model
A list of all filter overrides for a view.
retrieves the filter and category graphic overrides from a view
doc (Autodesk.Revit.DB.Document) – Current Revit model document.
view (_type_) – _description_
A ViewGraphicsSettings instance with retrieved setting.
Gets view data graphic settings from the model.
doc (Autodesk.Revit.DB.Document) – Current Revit model document.
views ([Autodesk.Revit.DB.View]) – Views of which to report graphical overrides on. (View must support graphical overrides, otherwise an exception will be thrown!)
A progress call back object, default is None
list of ViewGraphicsSettings instances
Get the sheet number of a sheet :param sht: The sheet to get the number of :type sht: ViewSheet :return: The sheet number :rtype: str
Get the sheet name of a sheet :param sht: The sheet to get the name of :type sht: ViewSheet :return: The sheet name :rtype: str
Get the sheet number and name of a sheet and returns the the combination of the two. Typically helpful for logging/printing.
num_first (bool) – Whether the sheet number should be first in the string. Defaults to True
splitter (str) – The string to split the sheet number and name with. Defaults to ‘ - ‘
The sheet number and name
str
Get the sheet of a view. Sheet number to element dictionary can be produced with get_sheet_num_to_elem_dict function from duHast.Revit.Views.Utility.sheets :param view: The view to get the sheet of :type view: View :param sht_num_elem_dict: A dictionary of sheet numbers and sheets :type sht_num_elem_dict: dict :return: The sheet of the view :rtype: ViewSheet
Get a dictionary of the ViewType enum to verbose name e.g. FloorPlan to Floor Plan :return: A dictionary in format of Autodesk.Revit.DB.ViewType.FloorPlan: “Floor Plan” :rtype: dict