Sample Code Revit Batch Processor 1.1.16 documentation

Contents:

This Page

duHast.Revit.Revisions.Objects.Storage package

Submodules

duHast.Revit.Revisions.Objects.Storage.revision_by_sheet_storage_alphanumeric module

This module contains a class to store revision information by sheet with sequence type ‘Numeric’.

class duHast.Revit.Revisions.Objects.Storage.revision_by_sheet_storage_alphanumeric.RevisionBySheetStorageAlphaNumeric(revit_id, revit_revision, prefix, suffix, sequence, revision_index_on_sheet, revision_are_by_sheet)

Bases: RevisionBySheetStorageBase

Revision by sheet storage for sequence type ‘Alpha Numeric’.

Initializes the revision by sheet storage for alphanumeric sequence type.

Parameters:
  • revit_id (int) – The Revit element id of the revision.

  • revit_revision (Autodesk.Revit.DB.Revision) – The Revit revision element.

  • prefix (str) – The prefix for the revision number.

  • suffix (str) – The suffix for the revision number.

  • sequence ([str]) – The alphanumeric sequence for the revision.

  • revision_index_on_sheet (int) – The index of the revision on the sheet.

  • revision_are_by_sheet (bool) – Flag indicating if revisions are by sheet.

property revit_id
property revit_revision
property prefix
property suffix
property sequence
property revision_index_on_sheet
index_to_revision(index)

Convert a sequential index to Revit revision format.

Args:

index: Sequential index (0-based, e.g., 0, 1, 2, 3…)

Returns:

Revision string (e.g., ‘A’, ‘B’, ‘C’, ‘AA’, ‘BB’, etc.)

get_revision(revision_index_on_sheet)

Gets the revision value for the given revision index on sheet.

Parameters:

revision_index_on_sheet (int) – The index of the revision on the sheet.

Returns:

The revision value.

Return type:

str

duHast.Revit.Revisions.Objects.Storage.revision_by_sheet_storage_base module

This module contains a base class to store revision information by sheet.

class duHast.Revit.Revisions.Objects.Storage.revision_by_sheet_storage_base.RevisionBySheetStorageBase(revit_id, revit_revision, revision_index_on_sheet, revision_are_by_sheet)

Bases: Base

Revision by sheet storage base class

Initializes the revision by sheet storage base class.

Parameters:
  • revit_id (int) – The Revit element id of the revision.

  • revit_revision (Autodesk.Revit.DB.Revision) – The Revit revision element.

  • revision_index_on_sheet (int) – The index of the revision on the sheet.

  • revision_are_by_sheet (bool) – Flag indicating if revisions are by sheet.

property revit_id
property revit_revision
property revision_index_on_sheet
get_revision(revision_index_on_sheet)

Gets the revision value for the given revision index on sheet.

Parameters:

revision_index_on_sheet (int) – The index of the revision on the sheet.

Returns:

The revision value.

Return type:

_NotImplementedType

duHast.Revit.Revisions.Objects.Storage.revision_by_sheet_storage_none module

This module contains a class to store revision information by sheet with sequence type ‘None’.

class duHast.Revit.Revisions.Objects.Storage.revision_by_sheet_storage_none.RevisionBySheetStorageNone(revit_id, revit_revision, revision_index_on_sheet, revision_are_by_sheet)

Bases: RevisionBySheetStorageBase

Revision by sheet storage for sequence type ‘None’.

Initializes the revision by sheet storage base class.

Parameters:
  • revit_id (int) – The Revit element id of the revision.

  • revit_revision (Autodesk.Revit.DB.Revision) – The Revit revision element.

  • revision_index_on_sheet (int) – The index of the revision on the sheet.

  • revision_are_by_sheet (bool) – Flag indicating if revisions are by sheet.

get_revision(revision_index_on_sheet)

Gets the revision value for the given revision index on sheet. (Will always be None for ‘None’ sequence type)

Parameters:

revision_index_on_sheet (int) – The index of the revision on the sheet.

Returns:

The revision value.

Return type:

None

duHast.Revit.Revisions.Objects.Storage.revision_by_sheet_storage_numeric module

This module contains a class to store revision information by sheet with sequence type ‘Numeric’.

class duHast.Revit.Revisions.Objects.Storage.revision_by_sheet_storage_numeric.RevisionBySheetStorageNumeric(revit_id, revit_revision, prefix, suffix, start_number, min_digits, revision_index_on_sheet, revision_are_by_sheet)

Bases: RevisionBySheetStorageBase

Revision by sheet storage for sequence type ‘Numeric’.

Initializes the revision by sheet storage for numeric sequence type.

Parameters:
  • revit_id (int) – The Revit element id of the revision.

  • revit_revision (Autodesk.Revit.DB.Revision) – The Revit revision element.

  • prefix (str) – The prefix for the revision number.

  • suffix (str) – The suffix for the revision number.

  • start_number (int) – The starting number for the revision sequence.

  • min_digits (int) – The minimum number of digits for the revision number.

  • revision_index_on_sheet (int) – The index of the revision on the sheet.

  • revision_are_by_sheet (bool) – Flag indicating if revisions are by sheet.

property revit_id
property revit_revision
property prefix
property suffix
property start_number
property min_digits
property revision_index_on_sheet
get_revision(revision_index_on_sheet)

Gets the revision value for the given revision index on sheet.

Parameters:

revision_index_on_sheet (int) – The index of the revision on the sheet.

Returns:

The revision value.

Return type:

str

Module contents