Sample Code Revit Batch Processor 1.1.11 documentation

Contents:

This Page

duHast.Revit.BIM360 package

Submodules

duHast.Revit.BIM360.bim_360 module

Functions around Revit BIM360.

duHast.Revit.BIM360.bim_360.get_bim_360_path(doc)

Gets human readable BIM 360 path.

Parameters:

doc (Autodesk.Revit.DB.Document) – Current Revit model document.

Returns:

The path to the bim360 model. If an exception occurred an empty string will be returned.

Return type:

str

duHast.Revit.BIM360.bim_360.convert_bim_360_file_path(path)

Pretend this is a file server path rather than cloud model path and swap cloud path with C:/

Parameters:

path (str) – The model cloud file path starting with BIM360

Returns:

A file path without BIM360

Return type:

str

duHast.Revit.BIM360.bim_360.get_model_bim_360_ids(doc)

Gets project id, model id, human readable path from the model.

Parameters:

doc (Autodesk.Revit.DB.Document) – Current Revit model document.

Returns:

project GUID, model GUID, human readable cloud path

Return type:

GUID, GUID, str

duHast.Revit.BIM360.bim_360.get_model_file_size(doc)

Gets BIM360 file size, if file does not exists on local cache it will return -1.

Parameters:

doc (Autodesk.Revit.DB.Document) – Current Revit model document.

Returns:

If file exists the file size in MB, otherwise -1

Return type:

float

duHast.Revit.BIM360.util_bim_360 module

This module contains a number of helper functions relating to BIM360.

duHast.Revit.BIM360.util_bim_360.get_bim_360_revit_files_from_file_list(file_path_csv, extension)

Method reading BIM360 file data from a CSV file.

Parameters:
  • file_path_csv (str) – Fully qualified file path to CSV to be read.

  • extension (TODO) – Is an empty place holder…this method is past into another where it expects 2 arguments…

Raise:

On exception an empty list is returned.

Returns:

List in format [Revit version, Project GUID, File GUID, file size in MB, file name]

Return type:

list of str

duHast.Revit.BIM360.util_bim_360.get_bim_360_file_data(file_path_csv)

Reads a csv file containing BIM 360 file data into list of FileItem instances.

Parameters:

file_path_csv (str) – Fully qualified file path to CSV to be read.

Returns:

a list of FileItem instances representing BIM360 file data. Will return an empty list of an exception occurred.

Return type:

list of SampleCodeBatchProcessor.FileItem

duHast.Revit.BIM360.util_bim_360.process_bim_360_file_data_row(row_data)

Reads a list of str into file item class object

Parameters:

row_data (list of str in format [Revit version, Project GUID, File GUID, file size in MB, file name]) – the list containing the file data

Returns:

Initialized file item instance, None if row is not the right length

Return type:

SampleCodeBatchProcessor.FileItem

Module contents