Sample Code Revit Batch Processor 1.1.11 documentation
Creates a new revision in a revit document up to version 2022.
doc (Autodesk.Revit.DB.Document) – Current Revit model document.
revision_data (revisionData
) – Named tuple containing revision data
Result class instance.
Revision created status returned in result.status. False if an exception occurred, otherwise True.
result.message will contain the message revision created successfully.
result.result: will contain list with single entry: the new revision created
On exception:
result.status (bool) will be False.
result.message will contain the exception message.
Creates a new revision in a revit document version 2023 and onwards.
doc (Autodesk.Revit.DB.Document) – Current Revit model document.
revision_data (revisionData
) – Named tuple containing revision data
Result class instance.
Revision created status returned in result.status. False if an exception occurred, otherwise True.
result.message will contain the message revision created successfully.
result.result: will contain list with single entry: the new revision created
On exception:
result.status (bool) will be False.
result.message will contain the exception message.
alias of revisionData
Creates a revision in the document.
doc (Autodesk.Revit.DB.Document) – Current Revit model document.
revision_data (revisionData
) – Named tuple containing revision data
Result class instance.
Revision created status returned in result.status. False if an exception occurred, otherwise True.
result.message will contain the message revision created successfully.
result.result: will contain list with single entry: the new revision created
On exception:
result.status (bool) will be False.
result.message will contain the exception message.
Sets a revision status to ‘Issued’.
doc (Autodesk.Revit.DB.Document) – Current Revit model document.
revision (Autodesk.REvit.DB.Revision) – The revision
Result class instance.
Revision status returned in result.status. False if an exception occurred, otherwise True.
result.message will contain the message revision marked as issued successfully.
result.result: empty list
On exception:
result.status (bool) will be False.
result.message will contain the exception message.
Sets a revision, identified by its id, status to ‘Issued’.
doc (Autodesk.Revit.DB.Document) – Current Revit model document.
revision_id (Autodesk.Revit.DB.ElementId) – The Id of the revision.
Result class instance.
Revision marked as issued status returned in result.status. False if an exception occurred, otherwise True.
result.message will contain the message revision marked as issued successfully.
result.result: empty list
On exception:
result.status (bool) will be False.
result.message will contain the exception message.
Adds revisions to single sheet
doc (Autodesk.Revit.DB.Document) – Current Revit model document.
sheet (Autodesk.Revit.DB.SheetView) – The sheet to add the revision to.
revision_ids ([Autodesk.Revit.ElementId]) – List of revision ids
Result class instance.
Revision adding to sheet status returned in result.status. False if an exception occurred, otherwise True.
result.message will contain the message revision added to sheet successfully.
result.result: empty list
On exception:
result.status (bool) will be False.
result.message will contain the exception message.
Get all issued revisions in a model.
doc (Autodesk.Revit.DB.Document) – Current Revit model document.
list of revision objects
[Autodesk.Revit.DB.Revision]
Get the last issued revision from a model.
doc (Autodesk.Revit.DB.Document) – Current Revit model document.
A revision object or None if no issued revision in the model
Autodesk.Revit.DB.Revision or None
Updates the revision sequence number of a revision.
Pop the revision from its current index in the revision sequence list. Insert it again at the new index
doc (Autodesk.Revit.DB.Document) – Current Revit model document.
revision (Autodesk.Revit.DB.Revision) – the revision
new_sequence_number (int) – The new index (sequence number ) of the revision. 1 based!!
Result class instance.
Revision re-ordering status returned in result.status. False if an exception occurred, otherwise True.
result.message will contain the message revision re-ordered successfully.
result.result: new revision sequence list
On exception:
result.status (bool) will be False.
result.message will contain the exception message.
Attempts to replace the current revision sequence with the one past in.
Note: both sequences must contain the same revisions…just in a different order.
doc (Autodesk.Revit.DB.Document) – Current Revit model document.
revision_sequence (IList<ElementId>) – List of revision element ids describing the new sequence.
Result class instance.
Revision re-ordering status returned in result.status. False if an exception occurred, otherwise True.
result.message will contain the message revision re-ordered successfully.
result.result: new revision sequence list
On exception:
result.status (bool) will be False.
result.message will contain the exception message.
Deletes all revision in file passing filter in one transaction.
doc (Autodesk.Revit.DB.Document) – Current model document
revision_description_filter (list, optional) – list of filters, defaults to []
Result class instance.
result.status. True if all possible revisions where deleted successfully, otherwise False.
result.message will contain the name(s) of the revisions excluded by filter and number of revisions deleted.
result.result empty list
On exception:
result.status (bool) will be False.
result.message will contain generic exception message.
result.result will be empty
Gets a revision sequence by its name. If no match is found None is returned!
doc (Autodesk.Revit.DB.Document) – Current Revit model document.
revision_sequence_name (str) – The sequence name
The matching sequence or None
Autodesk.Revit.DB.RevisionNumberingSequence
Creates a revision sequence with provided name and settings.
Will throw an exception if sequence creation failed.
doc (Autodesk.Revit.DB.Document) – Current Revit model document.
revision_sequence_name (str) – The name of the sequence
alpha_settings (Autodesk.Revit.DB.AlphanumericRevisionSettings, optional) – Custom settings, defaults to rdb.AlphanumericRevisionSettings()
The new sequence.
Autodesk.Revit.DB.RevisionNumberingSequence