Notifications
Clear all

[Closed] dotnet xml reading taking time

By the way, to check if there are any constructors defined, you can use:
dotNet.showConstructors [<dotNetClass> | <dotNetObject> | <dotNetControl>]

 You were right!
 I get excellent results with the C++ approach,
 
 Thanks to your help i managed  to make a class able to parse the XML.
 It returns an Array to Max.
 
 I did the same in maxscript and here are the benchmarks!
C++ getXML:
     #("C01_Idle_P2", "C01", "Idle", "Test", "Test5", "C01_Idle.max", "true", "200", "0", "true", "true", "false", "1", "P2 Comment.", "8", "C01_Idle2_P2", "C01", "Idle2", "Test", "Path", ...)
     Time: 7 ms
     ------------- 
     MaxScript Array:
     #("C01_Idle_P2", "C01", "Idle", "Test", "Test5", "C01_Idle.max", "true", "200", "0", "true", "true", "false", "1", "P2 Comment.", "8", "C01_Idle2_P2", "C01", "Idle2", "Test", "Path", ...)
     Time : 468 ms 
     OK
     
468 ms for the maxscript version, only 7ms for the C++ version!
I didn't expect such a big difference!
That sounds very very promising!
--
--


During my C++ tests, i tryed to pass a simple string from my class to maxscript and it didnt work well, is there something special to do?

I tryed this sort of function : 
#include <string> 
    
    
    using namespace std;
    
    
    namespace ParseXML {
    
    	public ref class Class1
    	{
    	public: 	 
      string getString ()
    		{
    			string MyString = "Hello";
    			return "MyString;
    		}
    	};
    

But then in maxscript i get this error:
– Runtime error: No method found which matched argument list

With an Int or an array it works fine. but not with a string.

I suspect that it converts maxscript strings to a char* array, rather than a standard library string. However, I just messed around with that a bit and couldn’t get it to work…

Page 2 / 2