Page 2 of 2
Re: Is there a way to get the Data Directory Location in TI?
Posted: Thu Feb 28, 2019 6:53 am
by Elessar
Wim Gielis wrote: ↑Wed Feb 27, 2019 6:19 pm
Hi,
On a related note: does anyone use multiple data directories for 1 model ? We can specify multiple folders in the crg file but I have never been a fan of it.
There was a very interesting idea in tm1forum (I couldn't find the thread) to separate DATA to 2 folders: CODE (.rux and .pro files) and DATA (other files); and commit changes in CODE folder to git or any other "put your favorite version control system".
UPD: here it is:
https://www.tm1forum.com/viewtopic.php? ... ion#p66007
Re: Is there a way to get the Data Directory Location in TI?
Posted: Thu Feb 28, 2019 7:05 am
by Wim Gielis
Elessar wrote: ↑Thu Feb 28, 2019 6:53 am
Wim Gielis wrote: ↑Wed Feb 27, 2019 6:19 pm
Hi,
On a related note: does anyone use multiple data directories for 1 model ? We can specify multiple folders in the crg file but I have never been a fan of it.
There was a very interesting idea in tm1forum (I couldn't find the thread) to separate DATA to 2 folders: CODE (.rux and .pro files) and DATA (other files); and commit changes in CODE folder to git or any other "put your favorite version control system".
Interesting. it’s similar to what Lotsaram said. The difficulty will be to split the new objects regarding their type and have similar objects in the same folder.
Re: Is there a way to get the Data Directory Location in TI?
Posted: Tue Jan 12, 2021 10:47 pm
by stex2727
qml wrote: ↑Fri Apr 12, 2013 10:37 am
I'm in favour of having a consistent folder structure for all environments - tm1s.cfg in the main folder and Data and Logging subdirectories sitting under that main folder too. Or any other way that is consistent. Since you can easily get the Logging directory path using GetProcessErrorFileDirectory, it is easy to construct a formula that will return the Data directory, no matter what the environment. Something along these lines:
Code: Select all
sLogDirName = 'Logging\';
sDataDirName = 'Data\';
sLogDirPath = GetProcessErrorFileDirectory;
sDataDirPath = DELET (sLogDirPath, SCAN (sLogDirName, sLogDirPath), LONG (sLogDirName)) | sDataDirName;
Just used this code and a trap I fell into, the variable sLogDirName needs to be in the right case.
Steve