Пример #1
0
def cleanup_assembly_files():
    if coreutils.get_revit_instance_count() == 1:
        for asm_file_path in appdata.list_data_files(file_ext='dll'):
            if not assmutils.find_loaded_asm(asm_file_path, by_location=True):
                appdata.garbage_data_file(asm_file_path)
                asm_log_file = asm_file_path.replace('.dll', '.log')
                if op.exists(asm_log_file):
                    appdata.garbage_data_file(asm_log_file)
Пример #2
0
def _cleanup_cache_files():
    """ Upgrades local files and settings per this commit changes.
    commit message:   Organized data files per Revit version in appdata folder
    commit hash:      44dd765c0f662f3faf5a40b92e3c5173804be37f
    """
    cache_file_exts = ['pickle', 'json', 'log', 'pym']
    for cache_file_ext in cache_file_exts:
        for cache_file_path in appdata.list_data_files(file_ext=cache_file_ext,
                                                       universal=True):
            appdata.garbage_data_file(cache_file_path)

    # Cleanup Universal Dll files
    if get_revit_instance_count() == 1:
        for asm_file_path in appdata.list_data_files(file_ext='dll',
                                                     universal=True):
            if not find_loaded_asm(asm_file_path, by_location=True):
                appdata.garbage_data_file(asm_file_path)
Пример #3
0
def cleanup_assembly_files():
    if get_revit_instance_count() == 1:
        for asm_file_path in appdata.list_data_files(file_ext='dll'):
            if not find_loaded_asm(asm_file_path, by_location=True):
                appdata.garbage_data_file(asm_file_path)