Python 3: import dll with ctypes or numpy.ctypeslib

0

I want to work with the Autodesk Robot Structural Analysis API to extract information. With IronPython I import the references from a library dll in the following way:

import clr
clr.AddReferenceToFileAndPath(‘midirectorio\Interop.RobotOM.dll’)
from RobotOM import *
robapp = RobotApplicationClass()
robproj = robapp.Project
robstruct = robproj.Structure

With robstruct I can already extract the information I need.

Now I would like to do the same with Python 3 . I've tried it with ctypes and with numpy.ctypeslib :

import ctypes
lib_ctypes = ctypes.cdll[‘midirectorio\Interop.RobotOM.dll']
print(lib_ctypes)
<CDLL 'midirectorio\Interop.RobotOM.dll', handle 1a1ff900000 at 0x1a1e8e22710>

import numpy
lib_numpy = numpy.ctypeslib.load_library('Interop.RobotOM.dll', ' midirectorio’)
print(lib_ numpy)
<CDLL 'midirectorio\Interop.RobotOM.dll', handle 1a1ffb40000 at 0x1a1ffb194e0>

My question is, from here, how should I continue?

    
asked by Pedro Biel 13.02.2018 в 11:13
source

0 answers