on 02-06-2007 4:22 PM
Hi, does anyone have a configuration file working with their add-on. For some reason when I add a configuration file with some user settings and put it into the add-on folder the add-on crashes? Anyone got an idea?
Thanks
Sally
Thanks I ended up using a text file and reading it in line by line.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
How do you read your config file from the add-on ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
well the normal way of reading a configuration file in vb is just having a configuration file which ends in the name of the executable and config
My vb program uses and executable but when i used the B1DE to create the add-on the config file dissapears (i think it must package it all up)
After that I attempted to put the configuration file back into the bin folder with the executable B1AddOnInstallerNET1.exe and i called it B1AddOnInstallerNET1.exe.config but when i run the add-on it fail.
Any ideas why?
Thanks
Sally
Hi
I have something similar. Once installing i have a text file with certain settings. By changing that certain things will be done by the add-on differently. So, it can be done. My add-on also creates a log file that writes error to this log file. It is in the add-on directory and has never gotten deleted.
Hope this helps
Hi Sally
I use VB.Net. I use the following code to get the directory
Private AddOnDirectory As String = Nothing
AddOnDirectory = Environment.CurrentDirectory+ "\" + FileName + ".txt"
Then you just write or read to the. Here is sample code where I write to the file.
Dim WriteToFileStream As StreamWriter
Dim Path As String
Path = AddOnDirectory + "\" + FileName + ".txt"
WriteToFileStream = New StreamWriter(Path, True, System.Text.Encoding.Default)
WriteToFileStream.WriteLine("Hello")
Hope the above helps
I suppose its one way of doing it...I'm not sure if it will work in my case
I was hoping to be able to use a configuration file the usual way as i have already created it whilst developing my add-on in vb.net. It seems odd that when the add-on is packaged up it cannot access the configuration file the usual way. Maybe it's something SAP needs to consider.
If anyone else has managed to use a configuration file this way then please let me know...
Thanks
Sally
User | Count |
---|---|
99 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.