PK$eCL̩ GGrjm/__init__.py"""Python module for creating and reading journal files for Autodesk Revit. Journal files are vbscript files generated by Autodesk Revit for each execution. These files encode all the actions that were done when Autodesk Revit was being run and the user was using the application. This includes all mouse clicks, keyboard shortcuts, command executions, and other actions. Journals generated by Revit are heavily commented but there are no documentation on how to interpret these comments. Journal files can be later fed into Revit to replicate all the actions encoded in the journal. This is a useful feature for Autodesk to replicate bugs reported by users. Using this system and with smart creation of journal files, Autodesk Revit can be automated to open models and make certain changes (e.g purging or exporting warnings). This module is an effort to streamline the process of journal creation and interpretation. See README.md for examples """ import os.path as op from datetime import datetime from rjm import templates from rjm import entries # rjm version __version__ = '1.2.0' class JournalMaker(object): """Handles composing and writing a journal file for Autodesk Revit.""" def __init__(self, permissive=True): """Inititalize the journal maker object. Appends the first lines in the journal (JrnObj variable and timestamp) to the _journal_contents. Args: permissive (bool): if True most errors in journal will not cause Revit to stop journal execution. Some still do. """ self._journal_contents = '' self._init_journal(permissive=permissive) def _add_entry(self, entry_string): """Append the provided string to the journal contents. Args: entry_string (str): String to be added to journal """ self._journal_contents += entry_string def _init_journal(self, permissive=True): """Add the initialization lines to the journal. By default adds JrnObj variable and timestamp to the journal contents. Args: permissive (bool): if True most errors in journal will not cause Revit to stop journal execution. Some still do. """ nowstamp = datetime.now().strftime("%d-%b-%Y %H:%M:%S.%f")[:-3] self._add_entry(templates.INIT .format(time_stamp=nowstamp)) if permissive: self._add_entry(templates.INIT_DEBUG) def _new_from_rft(self, base_template, rft_file): """Append a new file from .rft entry to the journal. This instructs Revit to create a new model based on the provided .rft template. Args: base_template (str): new file journal template from rmj.templates rft_file (str): full path to .rft template to be used """ self._add_entry(base_template) self._add_entry(templates.NEW_FROM_RFT .format(rft_file_path=rft_file, rft_file_name=op.basename(rft_file))) def new_family(self, base_rft_file): """Append a new family from .rft entry to the journal. This instructs Revit to create a new family based on the provided .rft template. Args: base_rft_file (str): full path to .rft family template """ self._new_from_rft(templates.NEW_FAMILY, base_rft_file) def new_conceptual_mass(self, base_rft_file): """Append a new conceptual mass from .rft entry to the journal. This instructs Revit to create a new conceptual mass based on the provided .rft template. Args: base_rft_file (str): full path to .rft conceptual mass template """ self._new_from_rft(templates.NEW_CONCEPTUAL_MASS, base_rft_file) def new_titleblock(self, base_rft_file): """Append a new titleblock from .rft entry to the journal. This instructs Revit to create a new titleblock based on the provided .rft template. Args: base_rft_file (str): full path to .rft titleblock template """ self._new_from_rft(templates.NEW_TITLEBLOCK, base_rft_file) def new_annotation(self, base_rft_file): """Append a new annotation from .rft entry to the journal. This instructs Revit to create a new annotation based on the provided .rft template. Args: base_rft_file (str): full path to .rft annotation template """ self._new_from_rft(templates.NEW_ANNOTATION_SYM, base_rft_file) def new_model(self, template_name=''): """Append a new model from .rft entry to the journal. This instructs Revit to create a new model based on the provided .rft template. Args: template_name (str): optional full path to .rft template to be used. default value is """ self._add_entry(templates.NEW_MODEL .format(template_name=template_name)) def new_template(self, template_name=''): """Append a new template from .rft entry to the journal. This instructs Revit to create a new template model based on the provided .rft template. Args: template_name (str): optional full path to .rft template to be used. default value is """ self._add_entry(templates.NEW_MODEL_TEMPLATE .format(template_name=template_name)) def open_workshared_model(self, model_path, central=False, detached=False, keep_worksets=True, audit=False, show_workset_config=1): """Append a open workshared model entry to the journal. This instructs Revit to open a workshared model. Args: model_path (str): full path to workshared model central (bool): if True opens central model and not local detached (bool): if True opens a detached model keep_worksets (bool): if True keeps worksets when detaching audit (bool): if True audits the model when opening """ if detached: if audit: if keep_worksets: self._add_entry( templates.CENTRAL_OPEN_DETACH_AUDIT .format(model_path=model_path, workset_config=show_workset_config) ) else: self._add_entry( templates.CENTRAL_OPEN_DETACH_AUDIT_DISCARD .format(model_path=model_path, workset_config=show_workset_config) ) else: if keep_worksets: self._add_entry( templates.CENTRAL_OPEN_DETACH .format(model_path=model_path, workset_config=show_workset_config) ) else: self._add_entry( templates.CENTRAL_OPEN_DETACH_DISCARD .format(model_path=model_path, workset_config=show_workset_config) ) elif central: if audit: self._add_entry( templates.CENTRAL_OPEN_AUDIT .format(model_path=model_path, workset_config=show_workset_config) ) else: self._add_entry( templates.CENTRAL_OPEN .format(model_path=model_path, workset_config=show_workset_config) ) else: if audit: self._add_entry( templates.WORKSHARED_OPEN_AUDIT .format(model_path=model_path, workset_config=show_workset_config) ) else: self._add_entry( templates.WORKSHARED_OPEN .format(model_path=model_path, workset_config=show_workset_config) ) def open_model(self, model_path, audit=False): """Append a open non-workshared model entry to the journal. This instructs Revit to open a non-workshared model. Args: model_path (str): full path to non-workshared model audit (bool): if True audits the model when opening """ if audit: self._add_entry(templates.FILE_OPEN_AUDIT .format(model_path=model_path)) else: self._add_entry(templates.FILE_OPEN .format(model_path=model_path)) def ignore_missing_links(self): """Append a ignore missing links entry to the journal. This instructs Revit to ignore missing links when opening models. """ self._add_entry(templates.IGNORE_MISSING_LINKS) def execute_command(self, tab_name, panel_name, command_module, command_class, command_data=None): """Append an execute external command entry to the journal. This instructs Revit to execute the provided command from the provided module, tab, and panel. Args: tab_name (str): name of ribbon tab that contains the command panel_name (str): name of ribbon panel that contains the command command_module (str): name of module that provides the command command_class (str): name of command class inside command module command_data (dict): dict of string data to be passed to command Examples: >>> jm = JournalMaker() >>> cmdata = {'key1':'value1', 'key2':'value2'} >>> jm.execute_command(tab_name='Add-Ins', ... panel_name='Panel Name', ... command_module='Addon App Namespace', ... command_class='Command Classname', ... command_data=cmdata) """ # make sure command_data is not empty command_data = {} if command_data is None else command_data # make the canonical name for the command cmdclassname = '{}.{}'.format(command_module, command_class) self._add_entry(templates.EXTERNAL_COMMAND .format(external_command_tab=tab_name, external_command_panel=panel_name, command_class_name=command_class, command_class=cmdclassname)) # count the data data_count = len(command_data.keys()) # create the entry for the command data if data_count > 0: data_str_list = [] for k, v in command_data.items(): data_str_list.append(' "{}" , "{}"'.format(k, v)) data_str = '_\n ,'.join(data_str_list) self._add_entry(templates.EXTERNAL_COMMANDDATA .format(data_count=data_count, data_string=data_str)) def execute_dynamo_definition(self, definition_path, show_ui=False, shutdown=True, automation=False, path_exec=True): """Execute a dynamo definition. Args: definition_path (str): full path to dynamo definition file show_ui (bool): show dynamo UI at execution shutdown (bool): shutdown model after execution automation (bool): activate dynamo automation path_exec (bool): activate dynamo path execute Examples: >>> jm = JournalMaker() >>> jm.execute_dynamo_definition( ... definition_path='C:/testdef.dyn', ... show_ui=True, ... shutdown=True ... ) """ self._add_entry(templates.DYNAMO_COMMAND .format(dynamo_def_path=definition_path, dyn_show_ui=show_ui, dyn_automation=automation, dyn_path_exec=path_exec, dyn_shutdown=shutdown)) def import_family(self, rfa_file): """Append a import family entry to the journal. This instructs Revit to import a family into the opened model. Args: rfa_file (str): full path of the family file """ self._add_entry(templates.IMPORT_FAMILY .format(family_file=rfa_file)) def add_custom_entry(self, entry_string): """Append a custom journal entry to the journal. Args: entry_string (str): custom journal entry """ self._add_entry(entry_string) def export_warnings(self, export_file): """Append an export warnings entry to the journal. This instructs Revit to export warnings from the opened model. Currently Revit will stop journal execution if the model does not have any warnings and the export warnings UI button is disabled. Args: export_file (str): full path of the ouput html file """ warn_filepath = op.dirname(export_file) warn_filename = op.splitext(op.basename(export_file))[0] self._add_entry(templates.EXPORT_WARNINGS .format(warnings_export_path=warn_filepath, warnings_export_file=warn_filename)) def purge_unused(self, pass_count=3): """Append an purge model entry to the journal. This instructs Revit to purge the open model. Args: pass_count (int): number of times to execute the purge. default is 3 """ for purge_count in range(0, pass_count): self._add_entry(templates.PROJECT_PURGE) def close_model(self): """Append a close model entry to the journal. This instructs Revit to close the currently open model. """ self._add_entry(templates.FILE_CLOSE) def exit(self): """Append a exit Revit entry to the journal. This instructs Revit to close the currently open model and exit. """ self._add_entry(templates.FILE_CLOSE) def save_model(self): """Append a save model entry to the journal. This instructs Revit to save the currently open model. """ self._add_entry(templates.FILE_SAVE) def sync_model(self, comment='', compact_central=False, release_borrowed=True, release_workset=True, save_local=False): """Append a sync model entry to the journal. This instructs Revit to sync the currently open workshared model. Args: comment (str): comment to be provided for the sync step compact_central (bool): if True compacts the central file release_borrowed (bool): if True releases the borrowed elements release_workset (bool): if True releases the borrowed worksets save_local (bool): if True saves the local file as well """ self._add_entry(templates.FILE_SYNC_START) if compact_central: self._add_entry(templates.FILE_SYNC_COMPACT) if release_borrowed: self._add_entry(templates.FILE_SYNC_RELEASE_BORROWED) if release_workset: self._add_entry(templates.FILE_SYNC_RELEASE_USERWORKSETS) if save_local: self._add_entry(templates.FILE_SYNC_RELEASE_SAVELOCAL) self._add_entry(templates.FILE_SYNC_COMMENT_OK .format(sync_comment=comment)) def write_journal(self, journal_file_path): """Write the constructed journal in to the provided file. Args: journal_file_path (str): full path to output journal file """ # TODO: assert the extension is txt and not other with open(journal_file_path, "w") as jrn_file: jrn_file.write(self._journal_contents) class JournalReader(object): """Handle reading and interpretting a journal file from Autodesk Revit.""" def __init__(self, journal_file): """Initialize the reader object with path to the target journal file. Args: journal_file (str): full path to target journal file """ self._jrnl_file = journal_file def _read_journal(self): """Private method that reads the journal file contents. Returns: str: journal file contents """ with open(self._jrnl_file, 'r') as jrn_file: return jrn_file.read() def endswith(self, search_str): """Check whether the provided string exists in Journal file. Only checks the last 5 lines of the journal file. This method is usually used when tracking a journal from an active Revit session. Args: search_str (str): string to search for Returns: bool: if True the search string is found """ for entry in reversed(list(open(self._jrnl_file, 'r'))[-5:]): if search_str in entry: return True return False def is_stopped(self): """Check whether the journal execution has stopped. Returns: bool: True if the journal execution has stopped """ return self.endswith(entries.MODAL_OPEN) PKQsKHPrjm/entries.py# this entry is added to a journal when Revit stops the execution # in journal mode. Checking for this string will help in determining if # Revit has stopped the journal execution. MODAL_OPEN = '0:< ADialog::doModal start' PKdCLqg>g>rjm/templates.py# pylama:skip=1 # initializtion templates ------------------------------------------------------ # timestamp format: 27-Oct-2016 19:33:31.459 INIT = """' revit_journal_maker generated journal ' 0:< 'C {time_stamp}; Dim Jrn Set Jrn = CrsJournalScript """ # initializing the journal in debug permissive mode INIT_DEBUG = """' Adding debug options' Jrn.Directive "DebugMode", "PerformAutomaticActionInErrorDialog", 1 Jrn.Directive "DebugMode", "PermissiveJournal", 1 ' Jrn.Directive "DebugMode", "PermissiveJournalAndReportAsError", 1 ' Jrn.Directive "DebugMode" , "GfxUseDx9AccelerationOnPlay" , 1 """ # new file templates ----------------------------------------------------------- # template for creating a new model NEW_MODEL = """' Create new model Jrn.Command "Ribbon" , "Create a new project , ID_FILE_NEW_CHOOSE_TEMPLATE" Jrn.ComboBox "Modal , New Project , Dialog_Revit_NewProject" _ , "Control_Revit_TemplateCombo" _ , "Select" , "{template_name}" Jrn.RadioButton "Modal , New Project , Dialog_Revit_NewProject" _ , "Project, Control_Revit_RadioNewProject" Jrn.PushButton "Modal , New Project , Dialog_Revit_NewProject" _ , "OK, IDOK" """ # template for creating a new template model NEW_MODEL_TEMPLATE = """' Create new template model Jrn.Command "Ribbon" , "Create a new project , ID_FILE_NEW_CHOOSE_TEMPLATE" Jrn.ComboBox "Modal , New Project , Dialog_Revit_NewProject" _ , "Control_Revit_TemplateCombo" _ , "Select" , "{template_name}" Jrn.RadioButton "Modal , New Project , Dialog_Revit_NewProject" _ , "Project template, Control_Revit_RadioNewTemplate" Jrn.PushButton "Modal , New Project , Dialog_Revit_NewProject" _ , "OK, IDOK" """ # template for creating a new family NEW_FAMILY = """' Create new family model Jrn.Command "Ribbon" , "Create a new family , ID_FAMILY_NEW" """ # template for creating a new conceptual mass NEW_CONCEPTUAL_MASS = """' Create new conceptual mass Jrn.Command "Ribbon" , "Create a new conceptual mass , ID_NEW_REVIT_DESIGN_MODEL" """ # template for creating a new title block NEW_TITLEBLOCK = """' Create new family model Jrn.Command "Ribbon" , "Create a new titleblock , ID_TITLEBLOCK_NEW" """ # template for creating a new annotation symbol NEW_ANNOTATION_SYM = """' Create new family model Jrn.Command "Ribbon" , "Create a new annotation symbol family , ID_ANNOTATION_SYMBOL_NEW" """ # template for responding to Revit GUI when asking for template file NEW_FROM_RFT = """' Get input rft file Jrn.Data "FileDialog" _ , "IDOK", "{rft_file_path}", "rft" _ , "{rft_file_name}", "{rft_file_name}" Jrn.Data "FileType" _ , "Family Template Files (*.rft)" """ # open model templates --------------------------------------------------------- # template for open & detaching workshared model CENTRAL_OPEN_DETACH = """' Opening workshared model as detached Jrn.Command "Ribbon" , "Open an existing project , ID_REVIT_FILE_OPEN" Jrn.Data "FileOpenSubDialog" , "OpenAsLocalCheckBox", "True" Jrn.Data "FileOpenSubDialog" , "DetachCheckBox", "True" Jrn.Data "FileOpenSubDialog" , "OpenAsLocalCheckBox", "False" Jrn.Data "File Name" , "IDOK", "{model_path}" Jrn.Data "WorksetConfig" , "Custom", {workset_config} Jrn.PushButton "Modal , Opening Worksets , Dialog_Revit_Partitions", "OK, IDOK" Jrn.Data "TaskDialogResult" _ , "Detaching this model will create an independent model. You will be unable to synchronize your changes with the original central model." & vbLf & "What do you want to do?", "Detach and preserve worksets", "1001" Jrn.Directive "DocSymbol" , "[]" """ # template for open & detach & auditing workshared model CENTRAL_OPEN_DETACH_AUDIT = """' Opening workshared model as detached and audit Jrn.Command "Ribbon" , "Open an existing project , ID_REVIT_FILE_OPEN" Jrn.Data "FileOpenSubDialog" , "OpenAsLocalCheckBox", "True" Jrn.Data "FileOpenSubDialog" , "DetachCheckBox", "True" Jrn.Data "FileOpenSubDialog" , "OpenAsLocalCheckBox", "False" Jrn.Data "FileOpenSubDialog" , "AuditCheckBox", "True" Jrn.Data "TaskDialogResult" _ , "This operation can take a long time. Recommended use includes periodic maintenance of large files and preparation for upgrading to a new release. Do you want to continue?", _ "Yes", "IDYES" Jrn.Data "File Name" , "IDOK", "{model_path}" Jrn.Data "WorksetConfig" , "Custom", {workset_config} Jrn.PushButton "Modal , Opening Worksets , Dialog_Revit_Partitions", "OK, IDOK" Jrn.Data "TaskDialogResult" _ , "Detaching this model will create an independent model. You will be unable to synchronize your changes with the original central model." & vbLf & "What do you want to do?" _ , "Detach and preserve worksets", "1001" Jrn.Directive "DocSymbol" , "[]" """ # template for open & detach & discard worksets workshared model CENTRAL_OPEN_DETACH_DISCARD = """' Opening workshared model as detached and discard worksets Jrn.Command "Ribbon" , "Open an existing project , ID_REVIT_FILE_OPEN" Jrn.Data "FileOpenSubDialog" , "OpenAsLocalCheckBox", "True" Jrn.Data "FileOpenSubDialog" , "DetachCheckBox", "True" Jrn.Data "FileOpenSubDialog" , "OpenAsLocalCheckBox", "False" Jrn.Data "FileOpenSubDialog" , "AuditCheckBox", "False" Jrn.Data "File Name" , "IDOK", "{model_path}" Jrn.Data "WorksetConfig" , "Custom", {workset_config} Jrn.PushButton "Modal , Opening Worksets , Dialog_Revit_Partitions", "OK, IDOK" Jrn.Data "TaskDialogResult" _ , "Detaching this model will create an independent model. You will be unable to synchronize your changes with the original central model." & vbLf & "What do you want to do?" _ , "Detach and discard worksets", "1002" Jrn.Directive "DocSymbol" , "[]" """ # template for open & detach & audit & discard worksets workshared model CENTRAL_OPEN_DETACH_AUDIT_DISCARD = """' Opening workshared model as detached and discard worksets and audit Jrn.Command "Ribbon" , "Open an existing project , ID_REVIT_FILE_OPEN" Jrn.Data "FileOpenSubDialog" , "OpenAsLocalCheckBox", "True" Jrn.Data "FileOpenSubDialog" , "DetachCheckBox", "True" Jrn.Data "FileOpenSubDialog" , "OpenAsLocalCheckBox", "False" Jrn.Data "FileOpenSubDialog" , "AuditCheckBox", "True" Jrn.Data "TaskDialogResult" _ , "This operation can take a long time. Recommended use includes periodic maintenance of large files and preparation for upgrading to a new release. Do you want to continue?", _ "Yes", "IDYES" Jrn.Data "File Name" , "IDOK", "{model_path}" Jrn.Data "WorksetConfig" , "Custom", {workset_config} Jrn.PushButton "Modal , Opening Worksets , Dialog_Revit_Partitions", "OK, IDOK" Jrn.Data "TaskDialogResult" _ , "Detaching this model will create an independent model. You will be unable to synchronize your changes with the original central model." & vbLf & "What do you want to do?" _ , "Detach and discard worksets", "1002" Jrn.Directive "DocSymbol" , "[]" """ # template for opening the central model of a workshared model CENTRAL_OPEN = """' Opening workshared model as central Jrn.Command "Ribbon" , "Open an existing project , ID_REVIT_FILE_OPEN" Jrn.Data "FileOpenSubDialog" , "OpenAsLocalCheckBox", "False" Jrn.Data "FileOpenSubDialog" , "AuditCheckBox", "False" Jrn.Data "File Name" , "IDOK", "{model_path}" Jrn.Data "WorksetConfig" , "Custom", {workset_config} Jrn.PushButton "Modal , Opening Worksets , Dialog_Revit_Partitions", "OK, IDOK" Jrn.Directive "DocSymbol" , "[]" """ # template for open & audit the central model of a workshared model CENTRAL_OPEN_AUDIT = """' Opening workshared model as central Jrn.Command "Ribbon" , "Open an existing project , ID_REVIT_FILE_OPEN" Jrn.Data "FileOpenSubDialog" , "OpenAsLocalCheckBox", "False" Jrn.Data "FileOpenSubDialog" , "AuditCheckBox", "True" Jrn.Data "TaskDialogResult" _ , "This operation can take a long time. Recommended use includes periodic maintenance of large files and preparation for upgrading to a new release. Do you want to continue?", _ "Yes", "IDYES" Jrn.Data "File Name" , "IDOK", "{model_path}" Jrn.Data "WorksetConfig" , "Custom", {workset_config} Jrn.PushButton "Modal , Opening Worksets , Dialog_Revit_Partitions", "OK, IDOK" Jrn.Directive "DocSymbol" , "[]" """ # template for opening a workshared model WORKSHARED_OPEN = """' Opening non-workshared model Jrn.Command "Ribbon" , "Open an existing project , ID_REVIT_FILE_OPEN" Jrn.Data "FileOpenSubDialog" , "AuditCheckBox", "False" Jrn.Data "File Name" , "IDOK", "{model_path}" Jrn.Data "WorksetConfig" , "Custom", {workset_config} Jrn.PushButton "Modal , Opening Worksets , Dialog_Revit_Partitions", "OK, IDOK" Jrn.Directive "DocSymbol" , "[]" """ # template for open & auditing a workshared model WORKSHARED_OPEN_AUDIT = """' Opening non-workshared model and audit Jrn.Command "Ribbon" , "Open an existing project , ID_REVIT_FILE_OPEN" Jrn.Data "FileOpenSubDialog" , "AuditCheckBox", "True" Jrn.Data "TaskDialogResult" _ , "This operation can take a long time. Recommended use includes periodic maintenance of large files and preparation for upgrading to a new release. Do you want to continue?", _ "Yes", "IDYES" Jrn.Data "File Name" , "IDOK", "{model_path}" Jrn.Data "WorksetConfig" , "Custom", {workset_config} Jrn.PushButton "Modal , Opening Worksets , Dialog_Revit_Partitions", "OK, IDOK" Jrn.Directive "DocSymbol" , "[]" """ # template for opening a non-workshared model FILE_OPEN = """' Opening non-workshared model Jrn.Command "Ribbon" , "Open an existing project , ID_REVIT_FILE_OPEN" Jrn.Data "FileOpenSubDialog" , "AuditCheckBox", "False" Jrn.Data "File Name" , "IDOK", "{model_path}" Jrn.Data "WorksetConfig" , "Custom", 0 Jrn.Directive "DocSymbol" , "[]" """ # template for open & audit a non-workshared model FILE_OPEN_AUDIT = """' Opening non-workshared model and audit Jrn.Command "Ribbon" , "Open an existing project , ID_REVIT_FILE_OPEN" Jrn.Data "FileOpenSubDialog" , "AuditCheckBox", "True" Jrn.Data "TaskDialogResult" _ , "This operation can take a long time. Recommended use includes periodic maintenance of large files and preparation for upgrading to a new release. Do you want to continue?", _ "Yes", "IDYES" Jrn.Data "File Name" , "IDOK", "{model_path}" Jrn.Data "WorksetConfig" , "Custom", 0 Jrn.Directive "DocSymbol" , "[]" """ # misc templates --------------------------------------------------------------- # template for executing an external command EXTERNAL_COMMAND = """' Executing external command Jrn.RibbonEvent "TabActivated:{external_command_tab}" Jrn.RibbonEvent "Execute external command:CustomCtrl_%CustomCtrl_%{external_command_tab}%{external_command_panel}%{command_class_name}:{command_class}" """ # template for providing data to an external command EXTERNAL_COMMANDDATA = """' Providing command data to external command Jrn.Data "APIStringStringMapJournalData" _ , {data_count} _ , {data_string} """ # template for executing a Dynamo script DYNAMO_COMMAND = """' Executing Dynamo Jrn.RibbonEvent "TabActivated:Manage" Jrn.Command "Ribbon" , "Launch Dynamo, ID_VISUAL_PROGRAMMING_DYNAMO" Jrn.Data "APIStringStringMapJournalData" _ , 5 _ , "dynPath", "{dynamo_def_path}" _ , "dynShowUI", "{dyn_show_ui}" _ , "dynAutomation", "{dyn_automation}" _ , "dynPathExecute", "{dyn_path_exec}" _ , "dynModelShutDown", "{dyn_shutdown}" """ # template for importing a family IMPORT_FAMILY = """' Importing family Jrn.Command "Ribbon" , "Load a family into the project , ID_FAMILY_LOAD" Jrn.Data "File Name" _ , "IDOK", "{family_file}" Jrn.Data "FileExternalTypes" _ , "" Jrn.Data "Transaction Successful" _ , "Load Family" """ # not working - needs count and list of all view and sheets EXPORT_CAD = """ Jrn.Command "Ribbon" , " , ID_EXPORT_DWG" Jrn.ComboBox "Modal , DWG Export , Dialog_Revit_AdrExportPersistentDlg" _ , "Control_Revit_CBExportSettings" _ , "Select" , "" , "Select" , "{export_setup_config}" Jrn.ComboBox "Modal , DWG Export , Dialog_Revit_AdrExportPersistentDlg" _ , "Control_Revit_ExportSet" _ , "Select" , "" , "Select" , "" , "Select" , "{export_sheet_set}" Jrn.PushButton "Modal , DWG Export , Dialog_Revit_AdrExportPersistentDlg" _ , "Next..., IDOK" Jrn.Data "Export File Answer", "IDOK" Jrn.Data "Export Number Of Views", "{export_view_count}" ' this line will repeat depending on number of views or sheets exported [Jrn.Data "Export View Names", "{export_view_or_sheet_name}"] ' 0 or 1 Jrn.Data "Export As Single File", "{export_single}" Jrn.Data "Export File Name Type", "2" Jrn.Data "Export File Name", "1" Jrn.Data "Export File Name", "{export_file_path}" """ # template for closing file and Revit FILE_CLOSE = """' Closing model Jrn.Command "SystemMenu" , "Quit the application; prompts to save projects , ID_APP_EXIT" Jrn.Data "TaskDialogResult" , "Do you want to save changes to Untitled?", "No", "IDNO" """ # template for saving non-workshared model FILE_SAVE = """' Saving model Jrn.Command "Ribbon" , "Save the active project , ID_REVIT_FILE_SAVE" """ # template for syncinc workshared model FILE_SYNC_START = """' Syncing model Jrn.Command "Ribbon" , "Save the active project back to the Central Model , ID_FILE_SAVE_TO_MASTER" """ # template options for syncinc workshared model FILE_SYNC_COMPACT = """' Set compact central checkbox to {compact_central} Jrn.CheckBox "Modal , Synchronize with Central , Dialog_Revit_PartitionsSaveToMaster" _ , "Compact Central Model (slow), Control_Revit_ForceCompactCentralModel" _ , {compact_central} """ FILE_SYNC_RELEASE_BORROWED = """' Set compact central checkbox Jrn.CheckBox "Modal , Synchronize with Central , Dialog_Revit_PartitionsSaveToMaster" _ , "Borrowed Elements, Control_Revit_ReturnBorrowedElements" _ , True """ FILE_SYNC_RELEASE_USERWORKSETS = """' Set compact central checkbox Jrn.CheckBox "Modal , Synchronize with Central , Dialog_Revit_PartitionsSaveToMaster" _ , "User-created Worksets, Control_Revit_RelinqUserCreatedPartitions" _ , True """ FILE_SYNC_RELEASE_SAVELOCAL = """' Set compact central checkbox to Jrn.CheckBox "Modal , Synchronize with Central , Dialog_Revit_PartitionsSaveToMaster" _ , "Save Local File before and after synchronizing with central, Control_Revit_SavePartitionsToLocal" _ , True """ FILE_SYNC_COMMENT_OK = """' Commenting and Okaying the sync dialog Jrn.Edit "Modal , Synchronize with Central , Dialog_Revit_PartitionsSaveToMaster" _ , "Control_Revit_Comment" _ , "ReplaceContents" , "{sync_comment}" Jrn.PushButton "Modal , Synchronize with Central , Dialog_Revit_PartitionsSaveToMaster" _ , "OK, IDOK" """ # template for ignoring missing links IGNORE_MISSING_LINKS = """' Ignoring missing links Jrn.Data "TaskDialogResult" _ , "Revit could not find or read 1 references. What do you want to do?", _ "Ignore and continue opening the project", "1002" """ # template for exporting warnings from an open model EXPORT_WARNINGS = """' Exporting warnings ' Jrn.RibbonEvent "TabActivated:Manage" Jrn.Command "Ribbon" , "Review previously posted warnings , ID_REVIEW_WARNINGS" Jrn.Data "Error dialog" , "0 failures, 0 errors, 0 warnings" Jrn.PushButton "Modeless , Autodesk Revit Architecture 2016 , Dialog_Revit_ReviewWarningsDialog" _ , "Export..., Control_Revit_ExportErrorReport" Jrn.Data "Error Report Action" , "IDOK" Jrn.Data "Error Report File Path" , "{warnings_export_path}\\" Jrn.Data "Error Report File Name" , "{warnings_export_file}" Jrn.Data "Error Report File Format" , "html" Jrn.PushButton "Modeless , Autodesk Revit Architecture 2016 , Dialog_Revit_ReviewWarningsDialog" , "Close, IDABORT" """ # template for purging an open model PROJECT_PURGE = """' Purge model ' Jrn.RibbonEvent "TabActivated:Manage" Jrn.Command "Ribbon" , "Purge(delete) unused families and types, ID_PURGE_UNUSED" Jrn.PushButton "Modal , Purge unused , Dialog_Revit_PurgeUnusedTree", "OK, IDOK" ' Jrn.Data "Transaction Successful", "Purge unused" """ PKQsK111rjm-1.2.0.dist-info/LICENSEMIT License Copyright (c) 2017 Ehsan Iran-Nejad Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. PK!Hf$Wdrjm-1.2.0.dist-info/WHEEL HM K-*ϳR03rOK-J,/RH,Q0343 /, (-JLR()*M ILR(4KM̫#DPK!H]I  rjm-1.2.0.dist-info/METADATAWK6W PM{3 Av` ZY\S$ARvCw׏fF<}q/Nh5'%kaNs<.~Ⱦtm~N>}i5$Z[RY`^5aYwV1Ij!EknC`+|[F{gM**@X<3>{{)*PO?.3h;'6)@tZ&'VA2D-I1ɧ/ rg[~8βINީ2%ʲ}$bgEk6,#s.(Ht7e/m}gxLh%e8/ b ]!& v! I5y G2L;V FkX9ߓt2dpoθ}wJZ!94DGVCƁVRWqڳ@[qڀ ߶vf1#gQzKsayd8shk-G^T,ڜ^&19:uKBtFJ^F|xJTeD`+Ė⨈6 lECzq.*OtM9_1X>$(_ M¹gTwOMƄ0Dង8 ~FF8Jb1FUΰ6}USC"!-uSײ$D|4X-^aGxSϰzPS-E,,p.ݩ/QْtxlMet$1 -")ReL9 aEƀYۍY^'G^)c8C[瘋Jo+φRoˡ'0^#د VQ`h)ԥD|sކKBUC\:=*dչ1.anfׁN8m}7PK$eCL̩ GGrjm/__init__.pyPKQsKHPGrjm/entries.pyPKdCLqg>g>Irjm/templates.pyPKQsK111rjm-1.2.0.dist-info/LICENSEPK!Hf$Wdrjm-1.2.0.dist-info/WHEELPK!H]I  rjm-1.2.0.dist-info/METADATAPK!H]Vؐrjm-1.2.0.dist-info/RECORDPKf