which version of Neuronvisio are you using?
Loading directly an hoc is possible only with the latest development on github.
To load an hoc file with version 0.7.3 you can do something like:
from neuron import h
from neuronvisio.controls import Controls
controls = Controls()
h.load_file('path/to/file.hoc')
Check out this:
http://mattions.github.com/neuronvisio/gettingstarted.html#hoc-intergration
HIH,
Michele.
if you want to stick with 0.7.3, you could try some inspiration from
the pyramidal example on github
https://github.com/mattions/neuronvisio/tree/master/examples/pyramidal
Check out the readme as well
https://github.com/mattions/neuronvisio/blob/master/examples/pyramidal/README_NEURONVISIO.rst
In particular this is the main script:
https://github.com/mattions/neuronvisio/blob/master/examples/pyramidal/main.py
If you are able to load the GUI, then simply do
from neuron import h
h.load_file('main_model_file.hoc')
Otherwise, you can try the dev version as Uri suggested,
however we are still trying to squash these two bugs
(https://github.com/mattions/neuronvisio/issues/32,
https://github.com/mattions/neuronvisio/issues/34)
HIH,
Michele.