WorldViz User Forum

WorldViz User Forum (
-   Plug-in development (
-   -   How do I use a dll in Vizard (

vizmaster 05-30-2008 03:59 PM

How do I use a dll in Vizard
I have a .dll file for reading some encoders. I tried simply importing with
import module.dll

I get the error dynamic module does not define init function. What is the proper method to handle a vendor .dll

farshizzo 05-30-2008 04:20 PM

Python is not capable of importing any DLL. The DLL must export specific functions for interfacing with Python. There is a 3rd party Python library called ctypes which allows interfacing with any standard system DLL. I believe this will suit your needs.

kpraveen 02-13-2014 03:08 AM

Hi Farshizzo,
This is praveen.
I am interfacing the Arrington eye tracker with the vizard platform and try to get the gaze point in real time by importing vpx.dll from worldviz i am getting the data's.

similarly,i am trying for other features like pupil size,fixation,Blink,etc., by creating own header file c types function and the corresponding dll.
This is my program and i am getting the following error.


from ctypes import *
import ViewpointCustomDLL
import viz
import os
import sys
import vpx

#Create arrington extension
arrington = viz.add('arrington.dle')

point = ViewpointCustomDLL.getPupilSize()

print point


Traceback (most recent call last):
File "", line 11, in
File "C:\Documents and Settings\admin\Desktop\dll2\", line 2, in
import ViewpointCustomDLL
ImportError: DLL load failed: The specified module could not be found.

kindly,help me out to clear the error and to get the data's in real time,for your information i am using windows xp 32-bit system.
Awaiting for your valuable reply soon.

shall6 02-03-2015 08:58 AM

Hello - I'm having a slightly different problem with a DLL. It imports fine, but when I try to call a function created in the dll, I get an error that there is "No such attribute" in the module. The dll is called RRG.dll, and it includes several functions, one of which is CreateRobot, so what I'm trying to do is

input RRG

robot = RRG.CreateRobot('input1',input2)

The dll is included in 'bin' and a similar dll compiled for use with the same program in Vizard 3.0 worked just fine. The syntax in the program itself and the new c++ code was updated for Vizard 5.

Anyone have any ideas? Is the dll in the right location? How can I get the functions to be recognized?

All times are GMT -7. The time now is 02:51 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2021, vBulletin Solutions, Inc.
Copyright 2002-2018 WorldViz LLC