files
Helper functions for working with revit files.
Attributes
mlogger = get_logger(__name__)
module-attribute
Functions
cleanup_backups(main_revitfile)
Remove all incremental saves of the given Revit file.
Source code in pyrevitlib/pyrevit/revit/files.py
correct_text_encoding(filename)
Convert encoding of text file generated by Revit to UTF-8.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
filename |
str
|
file path |
required |
Source code in pyrevitlib/pyrevit/revit/files.py
read_text(filepath)
write_text(filepath, contents)
Safely write text files with Revit encoding.
get_file_info(filepath)
Returns file information.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
filepath |
str
|
file path |
required |
Returns:
Type | Description |
---|---|
RevitModelFile
|
file information |