c# Export plugin crashing Max

c# Export plugin crashing Max

Anonymous
Not applicable
742 Views
1 Reply
Message 1 of 2

c# Export plugin crashing Max

Anonymous
Not applicable

using System;
using System.Collections.Generic;
using Autodesk.Max;
using Autodesk.Max.Plugins;

namespace MaxDotNet
{

public static class PluginMain
{
public static void AssemblyMain()
{
Autodesk.Max.GlobalInterface.Instance.COREInterface.AddClass(new DotNetSimpleExportDesc());
}

public static void AssemblyShutdown()
{
}

}

class DotNetSimpleExportDesc : ClassDesc2
{
IClass_ID _classid;
public DotNetSimpleExportDesc()
{
_classid = GlobalInterface.Instance.Class_ID.Create(0x4a7dd792, 0x68f24659);
}


public override string ClassName{get {return "DotNetSimpleExport";}}

public override string Category { get { return "DotNetSimpleExport"; } }

public override IClass_ID ClassID
{
get
{
return _classid;
}
}

public override SClass_ID SuperClassID
{
get { return SClass_ID.SceneExport; }
}

public override object Create(bool loading)
{
return new DotNetSimpleExport();
}

public override bool IsPublic
{
get { return true; }
}
}

public class DotNetSimpleExport : SceneExport
{

public DotNetSimpleExport()
{
}

public override int ExtCount
{
get
{
return 1;
}
}

public override string Ext(int index)
{
return ".txt";
}

public override string LongDesc
{
get { return "ExporterByMaxDotNetSDK";}
}

public override string ShortDesc
{
get {return "SimpleExport";}
}

public override string AuthorName
{
get {return "SITT";}
}

public override string CopyrightMessage
{
get {return "Copyright ©2013 SITT";}
}

public override string OtherMessage1()
{
return "Nothing";
}

public override string OtherMessage2()
{
return "NothingToo";
}

public override uint Version
{
get {return 100;}
}

public override void ShowAbout(IntPtr hWnd)
{
}

public override bool SupportsOptions(int ext, uint options)
{
return base.SupportsOptions(ext, options);
}

public override int DoExport(string name, IExpInterface ei, IInterface i, bool suppressPrompts, uint options)
{
System.Windows.Forms.MessageBox.Show(name);
return 1;
}
}
}


thank you
0 Likes
743 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable

same probleme here, don't know why...

0 Likes