Sample Code Revit Batch Processor 1.1.11 documentation
Bases: Base
Constructor: assigns the default element filter (pass all)
Default filter for elements past into solver…returns True for any element past in.
doc (Autodesk.Revit.DB.Document) – Current Revit model document.
element_id (Autodesk.Revit.DB.ElementId) – The id of the element to be checked.
True always.
bool
default solver classes
solver dictionary of available warning solvers by guid
Method allowing to override the default filter function
same_mark_filter_solver (func(document, elementId, list of filter values)) – A function to filter elements in warnings by
Attempts to solve some warning in a revit model using available warnings solver.
It will get all warnings in model, filter them by available solver GUIDs and finally will attempt to solve the warnings matched up with a solver.
doc (Autodesk.Revit.DB.Document) – Current Revit model document.
Result class instance.
.status True if all warnings could be solved. Otherwise False.
.message will contain all messages solver returned.
Currently address’ area separation lines overlapping with other area separation lines only.
Bases: Base
A solver that addresses overlapping area separation lines in a Revit model. It can delete or modify these lines to resolve the overlap issue.
Example Usage: solver = RevitWarningsSolverAreaSepLinesOverlap() result = solver.solve_warnings(doc, warnings) print(result.status) print(result.message)
Main functionalities: - Solving overlapping area separation lines by deleting or modifying them. - Ignoring area separation lines that overlap when they are in group instances.
Class constructor.
solve_by_lengthening_curves (bool, optional) – Whether to solve the overlapping curves by lengthening or shortening. Defaults to True.
group_id (int, optional) – The group ID that the curves need to belong to for processing. Defaults to -1.
transaction_manager (function, optional) – The transaction manager function used to perform the modifications. Defaults to in_transaction.
callback (function, optional) – An optional callback function.
guid identifying this specific warning
Solver addressing overlapping area separation lines.
will ignore area separation lines overlapping when in different group instances.
doc (Autodesk.Revit.DB.Document) – Current Revit model document.
warnings (Autodesk.Revit.DB.FailureMessage) – List of warnings to be solved.
Result class instance.
.status True if all area separation lines could be deleted / modified without an exception. Otherwise False.
.message will be ‘moved tag to area xyz’
Bases: Base
Constructor: this solver takes two arguments: a filter function and a list of values to filter by
filter_func (func(document, elementId, list of filter values)) – A function to filter elements in warnings by
filter_values (list, optional) – A list of filter values, defaults to []
guid identifying this specific warning
Solver setting element mark to nothing, provided it passes the filter.
doc (Autodesk.Revit.DB.Document) – Current Revit model document.
warnings (Autodesk.Revit.DB.FailureMessage) – List of warnings to be solved.
Result class instance.
.status True if all duplicate mark warnings could be solved. Otherwise False.
.message will contain stats in format parameter value set to ‘’
Currently address’ room separation lines overlapping with other room separation lines only.
Bases: Base
A solver that addresses overlapping room separation lines in a Revit model. It can delete or modify these lines to resolve the overlap issue.
Example Usage: solver = RevitWarningsSolverRoomSepLinesOverlap() result = solver.solve_warnings(doc, warnings) print(result.status) print(result.message)
Main functionalities: - Solving overlapping room separation lines by deleting or modifying them. - Ignoring room separation lines that overlap when they are in group instances.
Class constructor.
param solve_by_lengthening_curves: Whether to solve the overlapping curves by lengthening or shortening. Defaults to True. :type solve_by_lengthening_curves: bool, optional :param group_id: The group ID that the curves need to belong to for processing. Defaults to -1. :type group_id: int, optional :param transaction_manager: The transaction manager function used to perform the modifications. Defaults to in_transaction. :type transaction_manager: function, optional :param callback: An optional callback function. :type callback: function, optional
guid identifying this specific warning
Solver addressing overlapping room separation lines.
will ignore room separation lines overlapping when in different groups.
doc (Autodesk.Revit.DB.Document) – Current Revit model document.
warnings (Autodesk.Revit.DB.FailureMessage) – List of warnings to be solved.
Result class instance.
.status True if all room separation lines could be deleted / modified without an exception. Otherwise False.
.message will be ‘moved tag to room xyz’
Bases: Base
Empty constructor this solver does not take any further arguments.
guid identifying this specific warning
Solver moving room tags to room location point.
doc (Autodesk.Revit.DB.Document) – Current Revit model document.
warnings (Autodesk.Revit.DB.FailureMessage) – List of warnings to be solved.
Result class instance.
.status True if all room tags within warnings could be moved to room location point. Otherwise False.
.message will be ‘moved tag to room xyz’
Returns a list of warnings from the model
doc (Autodesk.Revit.DB.Document) – Current Revit model document.
List of all failure messages in model.
list of Autodesk.Revit.DB.FailureMessage
Returns all failure message objects where failure definition has matching GUID
doc (Autodesk.Revit.DB.Document) – Current Revit model document.
guid (Autodesk.Revit.DB.Guid) – Filter: Identifying a specific failure of which the corresponding messages are to be returned.
list of all failure messages with matching guid
list of Autodesk.Revit.DB.FailureMessage
Returns a list of element ids of all warnings with a specific guid
doc (Autodesk.Revit.DB.Document) – Current Revit model document.
guid (string) – Filter: Identifying a specific failure of which the corresponding messages are to be returned.
List of element ids of all warnings with a specific guid
list of Autodesk.Revit.DB.ElementId
Returns a list of element ids of all warnings with a specific guid Returns the first failing element in each warning only!
doc (Autodesk.Revit.DB.Document) – Current Revit model document.
guid (string) – Filter: Identifying a specific failure of which the corresponding messages are to be returned.
List of element ids of all warnings with a specific guid
list of Autodesk.Revit.DB.ElementId
Returns a dictionary of warnings where all warnings specified by guid related to each other are grouped together. Key will be the element with the lowest element id, value will be a list of element ids, in ascending order, of all warnings in the group (including the key!)
Note: Revit must report exactly two elements per warning for this to work
doc (Autodesk.Revit.DB.Document) – Current Revit model document.
guid (Autodesk.Revit.DB.Guid) – Filter: Identifying a specific failure of which the corresponding messages are to be returned.
Dictionary of warnings grouped by element id
dict