Attempting to write a scene exporter using the .NET SDK

216 views
Skip to first unread message

Nicholas Korn

unread,
Jul 18, 2012, 6:19:11 PM7/18/12
to 3ds-max-d...@googlegroups.com
I'm attempting to write a scene exporter using the .NET SDK. I currently have what I thought was the bare minimum setup in order to create an exporter. After building the DLL I copy it into the bin/assemblies directory and launch MAX 2013 and attempt an export. I receive the message "An error has occurred and the application will now close. No scene changes have occurred since your last save."

I copy and pasted the Descriptor and Loader from the example in http://area.autodesk.com/blogs/chris/3ds-max-2013-net-sdk-and-the-maxsharp-source-code

Do I have something set up wrong in my code that could cause this issue? My project references Autodesk.Max and the "Copy Local" is set to false.


Exporter.cs

Lucas Assis

unread,
Jan 21, 2013, 10:39:44 AM1/21/13
to 3ds-max-d...@googlegroups.com
 I know it's been some time you posted this, but a little tip:
On Visual Studio, click on Debug -> Atach to Process and atach to the 3dsmax.exe. Now you can put on breakpoints and debug your code. I'm on my way to write a SceneExporter too, your code was really helpful for me to begin with =)

Nicholas Korn

unread,
Feb 11, 2013, 6:27:10 PM2/11/13
to 3ds-max-d...@googlegroups.com
Yeah, I always had the debugger attached. It never made it that far Max seems to crash before it gets that far.

Stephen Taylor

unread,
Feb 14, 2013, 10:53:39 AM2/14/13
to 3ds-max-d...@googlegroups.com
Where did you crash?  What did VS show as the callstack?

A couple of suggestions - if you can, use the debug build (then you get asserts and can see the callstack into Max.

Did you have the "Break on Exceptions" bit checked (ctrl-alt-e shortcut)?  Often a crash happens, is caught by a catch-all, but we then proceed to crash elsewhere with no clue of what originally caused the crash.  When debugging Max, I try to have the check "Win32" checkbox enabled.  Max throws a bunch of exceptions on startup, but you can "add" the error code to the Win32 exception list, and then deselect it so Max doesn't break on that exception in future.
 
Another tidbit when debugging managed code, enable the checkbox to "debug native code" (in the project options somewhere).  Then you will see whats happening on the native stack, which can be extremely helpful.

The .Net SDK has a few difficulties, but there should be no issues with creating an exporter for it.

jerome puttemans

unread,
Oct 8, 2013, 6:17:02 AM10/8/13
to 3ds-max-d...@googlegroups.com
Same problem here, it crashes when I click export it crashes directly.
VS doesn't show anything... no break point hit after max launched and export was selected. only breakpoint hit was during initialisation but no problems to signal there.
Reply all
Reply to author
Forward
0 new messages