Hi reiteres and jlf,
Thank you for your help and inputs!
I've started to write a macro command but I realized that right now I don't have enough time to learn how to do that. I eventually wrote a short python script, that does more or less what i want, to work around the problem. Maybe I'll have some more time during summer to work on this project, if so I'll try to write macro commands for my problems and post them.
In case you're interested in what i finally did or if you want to do something similar, here is the python script I wrote:
# This python scripts assembles different parts of a command file that
# are written as python scripts.
import os
import fileinput
# define the filename and number
file_name='initial_cond_test_'
file_number=46
# define which files you want to put together (in this order):
if file_number==51:
input_files=[ 'a_beginning.py',
'b_mesh_input.py',
'c_model_definition.py',
'd_material_properties_version_3.py',
'e_material_definition_case_1.py',
'f_material_fields.py',
'g_heat_flow_version_2.py',
'h_time_list.py',
'i_initial_conditions_case_1.py',
'j_boundary_conditions_case_1.py',
'k_calc_step_0.py',
'k_calc_step_1.py',
'k_calc_step_2.py',
'k_calc_step_3.py',
'k_calc_step_4_version_1.py',
'y_fin.py',]
elif file_number==52:
input_files=[ 'y_poursuite.py',
'k_calc_step_5.py',
'k_calc_step_6.py',
'y_fin.py',]
elif file_number==43:
input_files=[ 'y_poursuite.py',
'n_post_processing_fields.py',
'y_fin.py',]
elif file_number==46:
input_files=[ 'y_poursuite.py',
'm_post_processing_tables.py',
'y_fin.py',]
# define the path containing the python scripts with the model-information
input_path='/home/my_name/my_project/3d/python_scripts/'
# define the path where the new command file is to be saved at
output_path='/home/my_name/my_project/3d/comm_files/'
# assembling the output file name
output_file_name=file_name+str(output_file_number)+'.comm'
# adding the path to the filenames
n=len(input_files)
for i in range(0,n):
input_files[i]=input_path+input_files[i]
# creating a new .comm file where the files listed above are inserted
with open(os.path.join(output_path,output_file_name),'w') as output_file:
input_lines=fileinput.input(input_files)
output_file.writelines(input_lines)
have a nice day!
René