[Python.NET] RE: Problem whith DirectX Mesh importation

Brian Lloyd brian at zope.com
Thu Jan 22 11:13:43 EST 2004


> It seem that Mesh is in NameSpace 'CLR.Microsoft.DirectX.Direct3D' but is
> define in the DLL : Microsoft.DirectX.Direct3DX.dll
> 
> so I try that:
>     a =
> Assembly.LoadWithPartialName("C:\...\Microsoft.DirectX.Direct3DX.dll")
>     from CLR.Microsoft.DirectX.Direct3D import Mesh
> 
> But doesn't work.

I don't think that LoadWithPartialName wants a path. Try:

  Assembly.LoadWithPartialName('Microsoft.DirectX.Direct3DX')



> If i well understand, 'from CLR.Microsoft.DirectX.Direct3D import 
> Mesh' try
> to import 'Mesh' from CLR.Microsoft.DirectX.Direct3D.dll not
> CLR.Microsoft.DirectX.Direct3DX.dll , isn't it ?
> 
> The both dll share the same NameSpace.

That shouldn't be a problem. The Python runtime can find objects 
in different dlls that all live in the same namespace. The key 
is making sure that you get the assembly loaded before trying 
to do the import.


Brian Lloyd        brian at zope.com
V.P. Engineering   540.361.1716              
Zope Corporation   http://www.zope.com 





More information about the PythonDotNet mailing list