@smunzer8ZZFW wrote:
... they are all stating the same error now that is MaximumlineLength is not defined.
That's because MaximumlineLength is not defined in those post-processors. But you don't need it. You keep each post-processor's own implementation and only tweak the parts that are blocking your use of alphanumeric names.
1. Set programNameIsInteger to false
2. Initializes programId = 1010 with a number. If machines want a number, give them one. Same one all the time it that's not a problem for the machines.
3. Only return an error inside that catch if you changed programNameIsInteger back to true for some reason, so
} catch (e) {
// well, program name only has too be a number if programNameIsInteger says so
if(programNameIsInteger) {
error(localize("Program name must be a number."));
return;
} else {
// it's fine, programId 1010 set above will do
}
}
Leave the rest of the code as already written in the post. It is fine as is.
By making the changes above you have ensued that the code works regardless of the value you set for your program's name. If you call it "MyProgram" it will output a file named MyProgram.nc with the first line being O1010. If you call it "2020" (a number) it will create a file named 2020.nc with the first line being 02020. So total flexibility with just a few changes.