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

1 Answer

+4 votes
by (22.6k 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 (22.6k points)
I added an example to my answer.
by (190 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 (22.6k 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 (190 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 (22.6k points)
Good to hear, thanks.
by (1.8k 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)
...