+3 votes
3.8k views
How to change the default folder in which openLCA saves databases?
in openLCA by (630 points)
retagged by

1 Answer

+8 votes
by (23.7k points)
edited by
 
Best answer

The recent versios of openLCA save databases under

C:\Users\Username\openLCA-data-1.4\databases

To change this navigate to the folder in which the openLCA.exe file lies. Open the file openLCA.ini in the same folder with a text editor. Below the line en add the following two lines of which the second line is the file path to the new folder (make sure you copied the databases from the original folder into the new folder).

-olcaDataDir
Drive:\Path\to\openLCA-database-folder

Save and start openLCA.

Backup your openLCA.ini before applying changes! Don't delete the original folder before you assured that the new folder has been set-up correctly (create a test database and check whether it shows up in the new folder)!

Example for an updated openLCA.ini:

-nl
en
-olcaDataDir
D:\openLCA-data
-data
@noDefault
-vmargs
-Xmx26624M
-Dosgi.framework.extensions=org.eclipse.fx.osgi
--add-modules=ALL-SYSTEM

 

by (170 points)
This does not work. My ini file looks like this:

-clean
-nl
en
-data
@noDefault
-olcaDataDir
D:\Users\Username\Documents\openLCA\Projects
-vmargs
-Xmx3248M
-Dosgi.framework.extensions=org.eclipse.fx.osgi

and still, openLCA always writes to the standard folder on the C drive. What is going on?
by (23.7k points)
I added an example to my answer.
by (240 points)
Unfortunately, that didn't work.
My ini file looks like this:

-nl
en
-olcaDataDir
C:\openLCA-data-1.4
-data
@noDefault
-vmargs
-Xmx6000M
-Dosgi.framework.extensions=org.eclipse.fx.osgi
--add-modules=ALL-SYSTEM

But openLCA still writes the databases to the user profile!
Please give me an indication what to do - Thank you!
by (23.7k points)
Hi Erik, without an error message or some more detail I am afraid, I will not be able to help much. What if yu try this (please backup your openlca.ini first!):

-nl
en
-olcaDataDir
C:\openLCA-data-1.4
-data
@noDefault
-vmargs
-Xmx6000M
-Dosgi.framework.extensions=org.eclipse.fx.osgi
--add-modules=ALL-SYS
by (240 points)
Thank you for your comment, now it works also with the code I posted originally, but I had to restart openLCA several times (for whatever reason...)
by (23.7k points)
Good to hear, thanks.
by (2.0k points)
Hi, just in case it helps someone - I found that I need to manually create the new folder first (i.e. if I just change the ini file, it won't create the folder, it will just stick with the default). This is totally a part of the instructions given above, but caused me problem as I didn't follow them word by word (I didn't have a database already there to copy over)
by (320 points)
OK, so something weird here. On one Mac I have OpenLCA 1.8 installed and the openlca.ini file is located directly inside the OpenLCA/Contents/MacOS/ folder. When I change the ini file, I can see the databases in the navigation pane when I open OpenLCA, but cannot open them with the error message, "Could not get the version from the database. Is this an openLCA database?"

On my other Mac, I'm running openLCA 1.10.3. In this you have to open the openLCA application as a folder, then open the Contents "app" as a folder, then MacOS/openLCA.ini file is available. When I make the same changes to the ini file, OpenLCA still saves the databases to the default location...

Any advice? I'm going to try and reinstall/upgrade openLCA on both machines.
by (320 points)
OK, so something weird here. On one Mac I have OpenLCA 1.8 installed and the openlca.ini file is located directly inside the OpenLCA/Contents/MacOS/ folder. When I change the ini file, I can see the databases in the navigation pane when I open OpenLCA, but cannot open them with the error message, "Could not get the version from the database. Is this an openLCA database?"

On my other Mac, I'm running openLCA 1.10.3. In this you have to open the openLCA application as a folder, then open the Contents "app" as a folder, then MacOS/openLCA.ini file is available. When I make the same changes to the ini file, OpenLCA still saves the databases to the default location.

Any advice? I'm going to try and reinstall/upgrade openLCA on both machines...

Just updated both machines to 1.10.3 and now this does not work on either machine. Any help?
by (320 points)
Is there any way to download an earlier version of openLCA? I only see v1.10.3 on the website.
...