WorldViz User Forum  

Go Back   WorldViz User Forum > Plug-in development

Reply
 
Thread Tools Rating: Thread Rating: 5 votes, 5.00 average. Display Modes
  #1  
Old 05-30-2008, 03:59 PM
vizmaster vizmaster is offline
Member
 
Join Date: Aug 2006
Posts: 27
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
__________________
VizMaster
Reply With Quote
  #2  
Old 05-30-2008, 04:20 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
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.
Reply With Quote
  #3  
Old 02-13-2014, 04:08 AM
kpraveen kpraveen is offline
Member
 
Join Date: Oct 2013
Posts: 3
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.

program:

from ctypes import *
import ViewpointCustomDLL
import viz
import os
import sys
import vpx
viz.go()

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

point = ViewpointCustomDLL.getPupilSize()

print'point'
print point

Error:

Traceback (most recent call last):
File "<string>", line 11, in <module>
File "C:\Documents and Settings\admin\Desktop\dll2\arrington5.py", line 2, in <module>
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.
Reply With Quote
  #4  
Old 02-03-2015, 09:58 AM
shall6 shall6 is offline
Member
 
Join Date: Dec 2014
Posts: 9
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?
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Vizard and Augmented Reality realvision Vizard 4 04-04-2008 10:59 AM
Vizard won't run wouters Vizard 5 02-05-2008 12:12 PM
Fall 2007 release of Vizard R3 3 D Announcements 0 10-15-2007 04:50 PM
McAfee Privacy Service 8.1 causes Vizard not to run mspusch Vizard 0 03-01-2007 09:24 PM
Matlab and Vizard brystewa Vizard 1 09-18-2006 03:11 PM


All times are GMT -7. The time now is 08:44 PM.


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