[Closed] Using a math function from a Dot Net DLL
Once again I want to try and get my head round Dotnet and maxscript so heres goes ,
I would like to use a few functions from a DotNet DLL , so far I have got max script to load the dll using this bit of code .
scriptpath=getdir #scripts
Assembly = dotNetClass "System.Reflection.Assembly"
Assembly.loadfrom (scriptpath + "/new fft/Exocortex.DSP.v1.dll")
but as I know only a small % of anything to do with dotnet Im a bit stuck , I want to pass an array full of data to the FFT function in the DLL and read the data back again. is this something I could do with MaxScript ? I think the function (FFT) I want to use is in the public class (Fourier) but Im not sure how to send data to it of read back from it ?.
as far as I can tell this is the function I want to use ,
public static void FFT(float[],int,FourierDirection)
Could someone please please point me the right way to go with this ??
below is a link to the DLL I want to use if thats any help
http://www.exocortex.org/dsp/index.html
Thanks for reading and all the best
Your immediate problem deals with trying to pass the float array. I’d do a quick search through the fourms and check out what other people have said about the issue and check back!
I would immeditaly checkout http://forums.cgsociety.org/showpost.php?p=4899360&postcount=95 and see where that gets you
Shane
ok so is there a way I can get max to show me the properties from the DLL
scriptpath=getdir #scripts
Assembly = dotNetClass “System.Reflection.Assembly”
Assembly.loadfrom (scriptpath + “/new fft/Exocortex.DSP.v1.dll”)
fft = dotnetClass “Exocortex.DSP.Fourier”
showproperties fft.direction
running the script above gives me this .
“C:\Program Files\Autodesk\3ds Max 2008\scripts”
dotNetClass:System.Reflection.Assembly
dotNetObject:System.Reflection.Assembly
dotNetClass:Exocortex.DSP.Fourier
dotNetClass:Exocortex.DSP.Fourier
dotNetClass:Exocortex.DSP.Fourier
– Error occurred in anonymous codeblock; filename: C:\Program Files\Autodesk\3ds Max 2008\Scripts
ew fft
ew fft.ms; position: 244
– Unknown property: “direction” in dotNetClass:Exocortex.DSP.Fourier
OK