Start to support version read/write
This commit is contained in:
@@ -246,7 +246,7 @@ def parse_file(project: str, inp: str) -> None:
|
||||
print(f"Total (in second): {(end-start).seconds}(s)")
|
||||
|
||||
|
||||
def read_inp(project: str, inp: str) -> bool:
|
||||
def read_inp(project: str, inp: str, version: str = '3') -> bool:
|
||||
if is_project_open(project):
|
||||
close_project(project)
|
||||
|
||||
@@ -267,7 +267,7 @@ def read_inp(project: str, inp: str) -> bool:
|
||||
return True
|
||||
|
||||
|
||||
def import_inp(project: str, cs: ChangeSet) -> bool:
|
||||
def import_inp(project: str, cs: ChangeSet, version: str = '3') -> bool:
|
||||
if 'inp' not in cs.operations[0]:
|
||||
return False
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ from .s27_backdrop import inp_out_backdrop
|
||||
#from .s28_end import *
|
||||
|
||||
|
||||
def dump_inp(project: str, inp: str):
|
||||
def dump_inp(project: str, inp: str, version: str = '3'):
|
||||
if not have_project(project):
|
||||
return
|
||||
|
||||
@@ -144,7 +144,7 @@ def dump_inp(project: str, inp: str):
|
||||
close_project(project)
|
||||
|
||||
|
||||
def export_inp(project: str) -> ChangeSet:
|
||||
def export_inp(project: str, version: str = '3') -> ChangeSet:
|
||||
if not have_project(project):
|
||||
return ChangeSet()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user