Hey, sorry to dig up an old thread, but my question is pretty relevant to this stuff…
I’ve started implementing SVN integration into 3dsmax using SharpSvn through dotNet, it was really easy to get the basic stuff working, but now I’ve hit a roadblock.
Basically I need to create a Collection of class SvnLogEventArgs (which is a SharpSvn class), and I can’t figure it out.
Making a Collection of String objects is easy since it’s a System thing (as in Biddle’s great example):
local aqn = ( dotNet.getType "System.String" ).AssemblyQualifiedName
local logItems = dotNetObject ("System.Collections.ObjectModel.Collection`1[[" + aqn + "]]")
This works fine.
But then I try to make a Collection using the SharpSvn class, like so:
local aqn = ( dotNet.getType "SharpSvn.SvnLogEventArgs" ).AssemblyQualifiedName
local logItems = dotNetObject ("System.Collections.ObjectModel.Collection`1[[" + aqn + "]]")
And it ends up spitting the error:
– Runtime error: Cannot resolve type: System.Collections.ObjectModel.Collection`1[[SharpSvn.SvnLogEventArgs, SharpSvn, Version=1.6016.1637.10768, Culture=neutral, PublicKeyToken=d729672594885a28]]
I’m guessing that’s because I’ve only defined “SharpSvn” from within Maxscript by using LoadAssembly pointing at the SharpSvn.dll directly, and so the dotNet method it uses to construct the Collection has no concept of where this class is coming from (since it’s not a default Windows DLL).
Am I on the right track there? Is there any way to make this work from within Maxscript or am I out of luck?
Can anyone suggest a better route?