added code to copy dimensions from a template file if necessary.