def write_addin(addin_file_path, addin_template, rvt_version):
    """
    Writes the required *.addin to run RPS inside rvt to the journal folder
    :param addin_file_path: addin output path.
    :param addin_template: addin template to be used as base.
    :param rvt_version: rvt version to open the model with.
    :return: addin_file_path
    """
    journal_template = addin_template.format(str(rvt_version))
    with open(addin_file_path, "w") as jrn_file:
        jrn_file.write(journal_template)
    return addin_file_path