Xopen / load_file not working
Posted: Fri Jan 04, 2013 11:21 pm
So I went to create a new model. I already had nrn7.1 but I thought I should install the new version. I did not delete the old one. Installation appeared to go fine.
On the desktop I made the folder I was going to work in "TC1" and within that folder I put a folder "cells" which was going to containing the geometry of the cells I was going to work on.
I created my .hoc file. (mosinit.hoc) in the folder "TC1". And in the folder "cells" I placed tc200.geo
mosinit.hoc contains two lines
I was sure this morning, this gave no errors.
I changed the way I was opening .hoc files, so that when I doubled clicked on them, they were opened in a code editor. Now I am dragging and dropping the .hoc file onto the nrngui shortcut to open them.
However, now I get the error. I have read that xopen and load_file both check "$HOC_LIBRARY_PATH" i.e. they start from the directory TC1. Is this not correct?
I am not 100% sure that changing how I open the files is the problem, but it seems to be the only thing it could be. I tried to fix this problem by reinstalling nrn7.2 however, it does reset the file handling.
I'm pulling my hair our! How do I open the geometry file in a way such that I can create a portable directory?
On the desktop I made the folder I was going to work in "TC1" and within that folder I put a folder "cells" which was going to containing the geometry of the cells I was going to work on.
I created my .hoc file. (mosinit.hoc) in the folder "TC1". And in the folder "cells" I placed tc200.geo
mosinit.hoc contains two lines
Code: Select all
load_file("nrngui.hoc")
xopen("cells/tc200.geo")
I changed the way I was opening .hoc files, so that when I doubled clicked on them, they were opened in a code editor. Now I am dragging and dropping the .hoc file onto the nrngui shortcut to open them.
However, now I get the error. I have read that xopen and load_file both check "$HOC_LIBRARY_PATH" i.e. they start from the directory TC1. Is this not correct?
I am not 100% sure that changing how I open the files is the problem, but it seems to be the only thing it could be. I tried to fix this problem by reinstalling nrn7.2 however, it does reset the file handling.
Code: Select all
1
nrniv: Can't open cells/tc200.geo
in /cygdrive/C/Users/Bill/Desktop/TC1/mosinit.hoc near line 2
xopen("cells/tc200.geo")
^
xopen("cells/tc200.geo" )