TM1ServerLogDirectory
-
- Regular Participant
- Posts: 173
- Joined: Sat Mar 20, 2010 3:03 pm
- OLAP Product: TM1
- Version: 9.5.2
- Excel Version: 2007-10
TM1ServerLogDirectory
Hello,
I am looking for a way to get the data or log files directory for a specified server in VBA code. Does anyone know if the above APi functionis the right thing to use and if so have any pointers on how to call it.
Many thanks.
I am looking for a way to get the data or log files directory for a specified server in VBA code. Does anyone know if the above APi functionis the right thing to use and if so have any pointers on how to call it.
Many thanks.
-
- Community Contributor
- Posts: 217
- Joined: Thu Aug 15, 2013 9:05 am
- OLAP Product: TM1
- Version: 10.2.1.1
- Excel Version: 14.0.6129.5000
Re: TM1ServerLogDirectory
Hello,
My VB is weak but I found this code on stackoverflow, no TM1 API was used in this code:
You can edit this as you wish.
What exactly do you mean by "to get the data or log files directory for a specified server in VBA code"? Do you mean to return the values in an Array? or by procedure?I am looking for a way to get the data or log files directory for a specified server in VBA code. Does anyone know if the above APi functionis the right thing to use and if so have any pointers on how to call it.
My VB is weak but I found this code on stackoverflow, no TM1 API was used in this code:
Code: Select all
Sub LoopThroughFiles()
Dim MyObj As Object, MySource As Object, file As Variant
file = Dir("z:\testfolder\")
While (file <> "")
If InStr(file, "test") > 0 Then
MsgBox "found " & file
Exit Sub
End If
file = Dir
Wend
End Sub
-
- Regular Participant
- Posts: 173
- Joined: Sat Mar 20, 2010 3:03 pm
- OLAP Product: TM1
- Version: 9.5.2
- Excel Version: 2007-10
Re: TM1ServerLogDirectory
Sorry,
Looking fo a way to determine the URL path to the log or data files folder for a specified server.
A VBA equivilant of the TI function GetProcessErrorFileDirectory()
I am trying to build a VBA UI that can be connected to more than one TM1 service at the same time and need to know the folder paths mentioned above for each.
Looking fo a way to determine the URL path to the log or data files folder for a specified server.
A VBA equivilant of the TI function GetProcessErrorFileDirectory()
I am trying to build a VBA UI that can be connected to more than one TM1 service at the same time and need to know the folder paths mentioned above for each.
-
- Community Contributor
- Posts: 217
- Joined: Thu Aug 15, 2013 9:05 am
- OLAP Product: TM1
- Version: 10.2.1.1
- Excel Version: 14.0.6129.5000
Re: TM1ServerLogDirectory
Ah ok,
You could also open up the .cfg file and check the parameter for each server?
But I am unaware of a VBA equivalent for the TI function GetProcessErrorFileDirectory()
Trevor
You could still pass the server name as an argument and presuppose the rest of the path string?Looking for a way to determine the URL path to the log or data files folder for a specified server.
A VBA equivalent of the TI function GetProcessErrorFileDirectory()
You could also open up the .cfg file and check the parameter for each server?
But I am unaware of a VBA equivalent for the TI function GetProcessErrorFileDirectory()
Trevor
-
- Regular Participant
- Posts: 173
- Joined: Sat Mar 20, 2010 3:03 pm
- OLAP Product: TM1
- Version: 9.5.2
- Excel Version: 2007-10
Re: TM1ServerLogDirectory
Thanks Trevor
I am trying to cater for situaltions where the TM1 services are on different hosts and physical servers. Also the possibility that the folder structures on these physical servers may be different.
I am trying to cater for situaltions where the TM1 services are on different hosts and physical servers. Also the possibility that the folder structures on these physical servers may be different.
-
- Community Contributor
- Posts: 217
- Joined: Thu Aug 15, 2013 9:05 am
- OLAP Product: TM1
- Version: 10.2.1.1
- Excel Version: 14.0.6129.5000
Re: TM1ServerLogDirectory
Hello again,
how about calling a TI which calls the TI function GetProcessErrorFileDirectory() and prints the return value out to a flat file, then pick up that flat file and tada....there is your path.
how about calling a TI which calls the TI function GetProcessErrorFileDirectory() and prints the return value out to a flat file, then pick up that flat file and tada....there is your path.
-
- Regular Participant
- Posts: 173
- Joined: Sat Mar 20, 2010 3:03 pm
- OLAP Product: TM1
- Version: 9.5.2
- Excel Version: 2007-10
Re: TM1ServerLogDirectory
Hmm, I have kind of done that.
I have a TI that sucks the contents of the tm1s.cfg file into a cube so I can get at all of the values that way.
Thanks again Trevor
I have a TI that sucks the contents of the tm1s.cfg file into a cube so I can get at all of the values that way.
Thanks again Trevor
-
- Community Contributor
- Posts: 217
- Joined: Thu Aug 15, 2013 9:05 am
- OLAP Product: TM1
- Version: 10.2.1.1
- Excel Version: 14.0.6129.5000
Re: TM1ServerLogDirectory
Indeed, these are all ways around your problem rather than facing it directly, good luck!Hmm, I have kind of done that.
I have a TI that sucks the contents of the tm1s.cfg file into a cube so I can get at all of the values that way.
Thanks again Trevor
Trevor.
-
- MVP
- Posts: 2836
- Joined: Tue Feb 16, 2010 2:39 pm
- OLAP Product: TM1, Palo
- Version: Beginning of time thru 10.2
- Excel Version: 2003-2007-2010-2013
- Location: Atlanta, GA
- Contact:
Re: TM1ServerLogDirectory
The best place for this information, if needed by a TI process, or VBA, really is a cube. I normally put a cube in all my models that stores all this type of data, like data directory, logging directory, port#, etc., to make it easy to get to instead of having to open the .cfg file. It almost never changes so all you have to do is set it up and populate it one time.
-
- Regular Participant
- Posts: 173
- Joined: Sat Mar 20, 2010 3:03 pm
- OLAP Product: TM1
- Version: 9.5.2
- Excel Version: 2007-10
Re: TM1ServerLogDirectory
Good idea, thanks.tomok wrote: I normally put a cube in all my models that stores all this type of data