Sample Code Revit Batch Processor 1.1.14 documentation
Groups sheets by a given property
sheet_data ([:class: .DataSheet]) – A list od DataSheet instances
property_name (str) – The name of the sheet instance property by its value to group the sheets by
ValueError – property_name needs to be of type str
ValueError – sheet_data needs to be of type list
ValueError – sheet got multiple properties of the given name
ValueError – sheet no properties of the given name
ValueError – sheet_data list contained a none DataSheet object
- Result class instance.
.status True if sheets where grouped successfully, otherwise False.
.message will be empty.
. result (a list with the grouped sheets as a dictionary)
on exception:
.result Will be False
.message will contain exception message.
. result (empty list)
Gets element data from the model. This is currently limited to
rooms
ceilings
doc (Autodesk.Revit.DB.Document) – The current model document.
A dictionary in format {file name: str, date processed : str, room:[], ceiling:[]}
{}
Bases: object
Class to read data from a json formatted file and store it in data objects.
The class supports the following data types:
.DataRoom
.DataCeiling
Class constructor.
filePath (str) – Fully qualified file path to json formatted data file.
Returns a list of debug messages from the load process.
A list of debug messages.
list
Load json formatted rows into data objects and stores them in this class.
In the moment the following data objects are supported:
.DataRoom
.DataCeiling
Returns all data objects where level name equals past in value.
level_name (str) – The building level name.
A list of room and ceiling data objects
list [data objects]
Returns all data objects where type equals past in type name
data_type (str) – The data type name.
A list of room and ceiling data objects
list [data objects]
Returns all data objects where level name and data type equal past in values.
level_name (str) – The building level name.
data_type (str) – A string describing the data type refer to property .dataType on data object class
A list of data objects
list [data objects]
Adds two header keys to json output to be saved to file.
file name
date processed
dic ({str:[]}) – A dictionary containing all data items. Key is the data tpe, value the data objects
model_name (str) – The revit model name.
A dictionary
{str:[]}