To set up Python to work with Nexus:
- Click Start, point to All Programs and then start to type Python.
- Click the Python symbol.
- To automatically configure Python for scripting with Nexus, at the command prompt, enter the following:
vicon = ViconNexus.ViconNexus()
For information on how to access the help provided on the relevant Python commands, see Python commands for use with Nexus. For more information about how to use Python, see https://www.python.org/about/gettingstarted/.
If you disconnect your Ethernet cable and disable wifi, when you enter a Python command, the following error may be displayed:
Host Application is not connected, unable to retrieve command list
This is because Python connects to Nexus over TCP/IP and if you are working entirely offline, Python and Nexus cannot connect.
To solve this issue, install the Microsoft Loopback Adapter. For instructions on how to do this, see Install the Microsoft loopback adapter.
Install the Microsoft loopback adapter
To install the Microsoft loopback adapter on Windows 10:
- Right-click the Windows Start menu icon and select Device Manager (or use your preferred method of opening the Device Manager).
- In the Device Manager, click on an item in the list of devices and then click the Action menu and select Add legacy hardware.
- In the Welcome screen, click Next.
- In the Add Hardware screen, select Install the hardware that I manually select from a list and then click Next.
- In the next screen, scroll down the Common hardware types list, select Network adapters and then click Next.
- From the Manufacturer list, select Microsoft, and then select Microsoft KM-TEST Loopback Adapter card model and click Next.
- In the next screen, click Next.
- Click Finish.