Create an executive file from hoc file

Anything that doesn't fit elsewhere.
Post Reply
Snake Eater

Create an executive file from hoc file

Post by Snake Eater »

Hello, Can I create an executive file (.exe or .bat) from hoc file?

I want use the result of my simulation in my power point presentation. If I try to use directly the .hoc file that call Neuron (and if in the .hoc file there is an instruction that recall another file) does not work!!

Excuse for my bad english!!
ted
Site Admin
Posts: 6305
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Create an executive file from hoc file

Post by ted »

Snake Eater wrote:Can I create an executive file (.exe or .bat) from hoc file?
No, and that's not the way to do this anyway.
I want use the result of my simulation in my power point presentation.
It is easiest to just grab a bitmap image. There are lots of ways to do this
under MSWin. I like a program called Hypersnap, but there are many others.
If I try to use directly the .hoc file that call Neuron (and if in the .hoc file there is an instruction that recall another file) does not work!!
Do you want to be able to click on something in your PowerPoint presentation,
and have that launch a live simulation?
Snake Eater

Re: Create an executive file from hoc file

Post by Snake Eater »

ted wrote: Do you want to be able to click on something in your PowerPoint presentation,and have that launch a live simulation?
Exactly. If I simple link an object (in my power point presentation) to .hoc file, Neuron is not able to load geometry file

Code: Select all

xopen("geometry.hoc")
that is necessary in my simulation.
Raj
Posts: 220
Joined: Thu Jun 09, 2005 1:09 pm
Location: Groningen, The Netherlands
Contact:

Post by Raj »

You can start neuron from a windows batch file myDemo.bat with the hoc-file of choice as an argument. Make a hyperlink point from powerpoint to this batch file and you are in business:

myDemo.bat:

Code: Select all

@echo off
cd "myFullHocPath"
C:\ProgramFiles\nrn58\bin\neuron.exe myHoc.hoc
Snake Eater

Post by Snake Eater »

Code: Select all

@echo off 
cd "myFullHocPath" 
C:\nrn58\bin\neuron.exe myHoc.hoc
Raj, you are great!!!
Now It's all ok! This is not the first time that yo save me.
Bye :)
ted
Site Admin
Posts: 6305
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Post by ted »

Excellent. I have just taken the liberty of adding it to the list of Hot tips
https://www.neuron.yale.edu/phpBB2/view ... =1359#1359
Thanks again, Raj!
Snake Eater

Post by Snake Eater »

Hey Ted, the default path of Neuron is

Code: Select all

C:\nrn58\bin\....
not

Code: Select all

C:\ProgramFiles\nrn58\bin\..
ted
Site Admin
Posts: 6305
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Post by ted »

I assumed that Raj's example is drawn from his own installation and just
copied it verbatim. But perhaps I should change the tip in case some users
find that confusing.
ted
Site Admin
Posts: 6305
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Post by ted »

I assumed that Raj's example is drawn from his own installation and just
copied it verbatim. But perhaps I should change the tip in case some users
find that confusing.
Raj
Posts: 220
Joined: Thu Jun 09, 2005 1:09 pm
Location: Groningen, The Netherlands
Contact:

Post by Raj »

It is drawn from my own installation. Considering the length of the script, making the necessary changes cannot not pose a real problem.
Post Reply