PDA

View Full Version : how to add the system path of Arrington Application


mouweimin
06-08-2011, 10:19 AM
I have trouble to follow the document in vizard regarding arrington plug-in. I have enclosed the instruction below. The trouble part is in red.

"The Arrington plug-in is implemented as a Vizard extension. In order to use the plug-in you must first run the ViewPoint software. The plug-in communicates with the ViewPoint software through the VPX_InterApp.dll file that is located in your ViewPoint application directory. In order for the plug-in to find this file, the ViewPoint application directory must be located on the system path or the Vizard script must be placed within the ViewPoint application directory."

My viewpoint application is located in C:\Users\shopuser\Desktop\ViewPoint 2.8.6.21.

My script is like

import viz

viz.go()


arrington = viz.add('arrington.dle')

#Connect to eye tracker
Eye_L = arrington.addEyeTracker(eye=arrington.EYE_B)
Eye_R = arrington.addEyeTracker(eye=arrington.EYE_A)

#Print smoothed gaze position (default)
print 'left eye smoothed', Eye_L.getPosition()
print 'right eye smoothed', Eye_R.getPosition()

If I put the script in a file located in the viewpoint application folder, i.e. C:\Users\shopuser\Desktop\ViewPoint 2.8.6.21, it works.

But I do not want to put the script in the viewpoint application folder. I try to follow "the ViewPoint application directory must be located on the system path". Anyone know how to do that exactly? Many thanks.

Jeff
06-08-2011, 05:33 PM
You could add the following to your script:
import sys
sys.path.append('C:/Users/shopuser/Desktop/ViewPoint 2.8.6.21')

farshizzo
06-08-2011, 05:47 PM
The system path refers to the PATH environment variable. Right-click on "My Computer", click "Properties", select the "Advanced" tab, then click "Environment Variables". This will popup a dialog where you can edit the system environment variables. Just add the viewpoint directory to the PATH variable.

mouweimin
06-08-2011, 09:30 PM
Hi Jeff and farshizzo, thank you very much.

Actually I tried both following one old thread in the forum, but I typed '\' instead of '/'.

In the script, I used
import sys
sys.path.append('C:\Users\shopuser\Desktop\ViewPoi nt 2.8.6.21')

In the system PATH variable, I added 'C:\Users\shopuser\Desktop\ViewPoint 2.8.6.21'. But it did not work.

Tomorrow I'll try '/'.