Sample Code Revit Batch Processor 1.1.11 documentation
list of schedule types to be reported on.
Gets schedule data to be written to report file. The data returned includes all schedule properties available in the file.
For View types reported on refer to SCHEDULE_TYPES list.
doc (Autodesk.Revit.DB.Document) – Current Revit model document.
host_name (str) – The file hostname, which is added to data returned
list of list of view properties.
list of list of str
Gets schedule data to be written to report file. The data returned is filtered by property list past in.
For View types reported on refer to SCHEDULE_TYPES list.
doc (Autodesk.Revit.DB.Document) – Current Revit model document.
host_name (str) – The file hostname, which is added to data returned
schedule_properties (list of str) – List of view properties to be extracted from schedules.
list of list of view properties.
list of list of str
Writes to file all schedule properties.
file type: csv
doc (Autodesk.Revit.DB.Document) – Current Revit model document.
file_name (str) – The fully qualified file path of the report file.
current_file_name (str) – The current revit file name which will be appended to data in the report.
Result class instance. - .status True if data was written successfully. Otherwise False. - .message will contain write status.
Writes to file sheet properties as nominated in past in list.
file type: csv
doc (Autodesk.Revit.DB.Document) – Current Revit model document.
file_name (str) – The fully qualified file path of the report file.
current_file_name (str) – The current Revit file name which will be appended to data in the report.
sheet_properties (list of str) – List of sheet properties to be extracted from sheets.
Result class instance. - .status True if data was written successfully. Otherwise False. - .message will contain write status.
Gets sheet data to be written to report file. The data returned includes all sheet properties available in the file. :param doc: Current Revit model document. :type doc: Autodesk.Revit.DB.Document :param host_name: The file hostname, which is added to data returned :type host_name: str :return: list of list of sheet properties. :rtype: list of list of str
Gets sheet data to be written to report file. The data returned is filtered by property list past in.
doc (Autodesk.Revit.DB.Document) – Current Revit model document.
host_name (str) – The file hostname, which is added to data returned
view_properties (list of str) – List of view properties to be extracted from sheets.
list of list of view properties.
list of list of str
Writes to file all sheet properties.
file type: csv
doc (Autodesk.Revit.DB.Document) – Current Revit model document.
file_name (str) – The fully qualified file path of the report file.
current_file_name (str) – The current revit file name which will be appended to data in the report.
Result class instance. - .status True if data was written successfully. Otherwise False. - .message will contain write status.
Writes to file sheet properties as nominated in past in list.
file type: csv
doc (Autodesk.Revit.DB.Document) – Current Revit model document.
file_name (str) – The fully qualified file path of the report file.
current_file_name (str) – The current Revit file name which will be appended to data in the report.
sheet_properties (list of str) – List of sheet properties to be extracted from sheets.
Result class instance. - .status True if data was written successfully. Otherwise False. - .message will contain write status.
Filters view data by supplied property names. Data gets filtered twice: property needs to exist in headers list as well as in properties list.
data (list of list of str) – List of sheet properties to be kept.
headers (list of str) – Filter: list of headers representing property names.
properties (list of str) – list of optional properties to be extracted from data
default_headers (list of str) – list of view properties always extracted from data
List of sheet properties matching filters.
list of list of str
Converts a list of dictionaries of view properties names and values to a list of properties only.
view_data ([{}]) – List of dictionaries representing view properties
headers ([str]) – list of properties
A list of lists of view property values.
[[str]]
Converts view template graphic overrides data stored in files into flattened json formatted hash table array for import to power bi.
json_files ([str]) – List of files containing view template data of Revit project files. ( One json file per Revit project file)
progress_call_back (func(counter, overall_counter), optional) – A call back function accepting as arguments the number of the current file processed and the number of overall files to be processed, defaults to None
Result class instance. - .status True if flattened array was successfully created. Otherwise False. - .message will contain array size. -. result will contain the flatten array as first value in list
Write view graphic settings to file.
revit_file_name (str) – The revit file name (without path or file extension)
file_path (str) – Fully qualified file path
data ({str:Any}) – json dictionary to be written to file
Result class instance.
result.status False if file failed to write, otherwise True.
result.message will contain file name of file written.
result.result: empty list
On exception:
result.status (bool) will be False.
result.message will contain the exception message.
result.result: will be an empty list
Reads a view data report file into a list of view graphic setting instances
file_path (str) – Fully qualified file path of report file.
ValueError – If data node is missing from file
list of settings if files was read successfully otherwise an exception will be raised.
list of view types to be reported on.
Gets view data to be written to report file. The data returned includes all views properties available in the file.
For View types reported on refer to VIEW_TYPES list.
doc (Autodesk.Revit.DB.Document) – Current Revit model document.
host_name (str) – The file hostname, which is added to data returned
list of list of view properties.
list of list of str
Gets view data to be written to report file. The data returned is filtered by property list past in.
For View types reported on refer to VIEW_TYPES list.
doc (Autodesk.Revit.DB.Document) – Current Revit model document.
host_name (str) – The file hostname, which is added to data returned
view_properties (list of str) – List of view properties to be extracted from views.
list of list of view properties.
list of list of str
Writes to file all views properties.
file type: csv
doc (Autodesk.Revit.DB.Document) – Current Revit model document.
file_name (str) – The fully qualified file path of the report file.
current_file_name (str) – The current revit file name which will be appended to data in the report.
Result class instance. - .status True if data was written successfully. Otherwise False. - .message will contain write status.
Writes to file sheet properties as nominated in past in list.
file type: csv
doc (Autodesk.Revit.DB.Document) – Current Revit model document.
file_name (str) – The fully qualified file path of the report file.
current_file_name (str) – The current Revit file name which will be appended to data in the report.
sheet_properties (list of str) – List of sheet properties to be extracted from sheets.
Result class instance. - .status True if data was written successfully. Otherwise False. - .message will contain write status.
header used in views report
header used in sheets report
header used in schedules report
A list of headers used in report files Hardcoded header list is expanded by parameters added to sheet category in model.
Note: if no sheet views are in a file this will report the hardcoded header only.
doc (Autodesk.Revit.DB.Document) – Current Revit model document.
List of headers.
list str
A list of headers used in report files Hardcoded header list is expanded by parameters added to PlanView class in model.
Note: if no schedule views are in a file this will report the hardcoded header only.
doc (Autodesk.Revit.DB.Document) – Current Revit model document.
List of headers.
list str
A list of headers used in report files Hardcoded header list is expanded by parameters added to PlanView class in model. Revit ui only lists ‘views’ ‘sheets’ and ‘schedules’ as a categories to add project parameters to. Therefore any parameters attached to class ViewPlan should apply to all other view types with exception of schedules and sheets.
Note: if no plan views are in a file this will report the hardcoded header only.
doc (Autodesk.Revit.DB.Document) – Current Revit model document.
List of headers.
list str