Hello !
I would need your advice ! I store the result data in an output text file in order to use them in Matlab.
My question relates to a way to check if the file name already exists in the folder and if yes if there is any way to make the name as a sequence (i.e. add “1”, “2” if name already exists). Indeed, I often just forget to change the outputfile name in Anybody and rewrite on the previous file. I so lost my data.
Frankly I am not sure how to do this, but the example models GaitLowerExtremity and GaitFullBody do something like this when they save optimized parameters and Euler angles. You can look into those examples and see if you can figure out how they do it.
I looked into them and I’m not sure to well understand everything. I also looked into the help to found any information about parameters for macro but was able to find anything, Is there any information regarding how to code the anyoperationmacro and into the .anymcr files ? For example, in the “runMacroOperation-Load.anymcr”, file extension is specified with --file ; are there anything else to know ?
Of what I saw, examples you cited do not include search into the specified folder to check if the file exists. I think I hoped a function such as “exist” in matlab…
I do not have any more information about this precise question. If you pose the question in the professional forum you may get some help from the professional supporters.