Since the ability to store mxds inside a file gdb is still just an idea, I've been mulling over my options for using a "template" mxd within a model. My model uses 4 different mxds, but currently it accepts one at a time (i.e. I run the model 4 times for each feature class, using the different mxds). The model does various things such as saving a copy of the "template" as a new mxd, replacing data sources etc.
Up to now I have "Input Template mxd" as a model parameter. This is fine, if I'm the one running the model, so I know which mxd is the correct one. However, if someone else were to run the model, they could input any mxd they wished, which would inevitably lead to the model failing. The options I thought of were:
1. Trust that the user will enter the correct template mxd containing the correct layers: if only. 2. Force the user to enter a template mxd which has the correct name: won't work in this multiple template mxds scenario, as I would then have to duplicate the model 4 times to check for the 4 different names. Alternatively, if I wrote an if statement inside the model to check which template I'm receiving, it still would not potentially stop the user from renaming Template1.mxd to Template2.mxd, causing the wrong processes to run. 3. Store the templates inside the same file gdb with the model: as stated, cannot be done.
My current scenario has my model and template feature classes inside a gdb, inside a folder along with the four template mxds. The model automatically accesses each template mxd as needed, so the branch for each template runs consecutively everytime the model is executed. However, the user could still rename the mxds, or simply remove them from the folder...
My question is, is there a way to somehow store the template mxds within the model itself or in some other way so that the user cannot change it?