At this point I have project templates. I will be posting a further question on a thread about Templates verses Packages, but this one is about relative path names.
long set up :
My Goal is a template or package that will allow a particular project to be loaded onto another machine and run a map project from that machine. In this project the user will supply one data table and it along with one pre-existing feature layer will be put through two models. The other user should be able to function without any path to any existing data source.
A further complexity is that we are in a One Drive environment. ESRI has not solved all of the problems associated with One Drive. That again is a separate issue.
The one feature that the user must have to run either of this project's two tools is stored in a geodatabase. It looks like the geodatabase is recreated in each new project made from the template. So far so good.
What I cannot test, for the moment, is how well this works from another computer.
Almost there:
The tools that calls for the feature class seems to work with a path to the geoodatabase like this:
C:\Users\MYLoginName\OneDrive(localDirectory)\HomeDirectory\Map1FmTemplate3_21\MapProject1.gdb .
Un fortunately the tool opens in the new project map asking for the feature class with the path:
C:\Users\My long in name\OneDrive - HPD\(Subfolder where the original map project was developed\MapProject1\MapProject1.gdb\feature name
Footnote, the subfolder: OneDrive(localDirectory) is always on my computer and in the cloud, apparently solving some ESRI/ArcPro issues. I am using my C: drive to save computer operating time as our server connection is not that robust.
Actual Question:
In the Template, I think I need to change the path to the geodatabase to something like:
C:\Users\%anyones login name%\
OneDrive(localDirectory)\HomeDirectory\Map1FmTemplate3_21\MapProject1.gdb .
For %anyones login name%
I have tried %name% and %username%
Any suggestion as to the right inline variable to allow a path to whatever C drive is the host drive for their new map project?
Bonus Question
The feature class is in the geodatabase in the newly created map project. How do I design the model so that it does not look to the geodatabase back in the original, project development geodatabase?