Notifications
Clear all

[Closed] VS2005 and 3dsMax9 How-To?

It’s been a long time, but I’m once again trying to get a 3dsMax SDK based plug-in to debug using Visual Studio. I’m starting to think this is some kind of Autodesk trick to get students to just kill themselves.

I would like this thread to be the Be-All-End-All thread about getting Visual Studio and 3dsMax to play well together. Here’re my steps so far:

  1. Install the SDK alongside the 3dsMax root folder.
  2. Open a sample-code project from the SDK installation, say ASCIIEXP under the import/export folder.
  3. Set a breakpoint somewhere, say asciiexp.cpp @ L212
  4. Build it to debug using a hybrid configuration.
  5. Specify the use of …/<root>/3dsMax.exe
    KABOOM<<Debugging information for ‘3dsmax.exe’ cannot be found or does not match. No symbols loaded.>>
    I’m under the impression that this means that 3dsMax has no way of telling VS when it has hit a breakpoint, meaning no debugging. 🙁
  6. Rebuild the solution without running it through the 3dsMax.exe process.
  7. Copy over the entire Hybrid folder into the stdplugs, and remove the ASCII DLL to prevent conflicts.
  8. Restart 3dsMax and try to export. The module is gone- no errors, but no ASCII Export.
  9. Try attaching the process from Visual Studio while 3dsMax is running on allegedly loading that “Hybrid” folder on startup. Still nothing.
  10. Restart 3dsM and try to attach to process one more time for good measure. Still nothing.

Any thoughts? Has anyone actually gotten this to work?

Thanks!

8 Replies

Sorry, I’m not sure what you’re trying to do.

Do you want to debug your max plugin using VC?

Simple, compile it in debug mode. In the project properties, go to the Debugging section, specify 3dsmax.exe as the process, and set the correct working directory.

Start debugging, this will launch 3ds max, and once it hits a breakpoint in your code, it will stop, and let you see what’s going on, step through line by line, as usual.

On the other hand, if you want a debug build of max, you need to be subscribed to ADN. But it’s not essential at all to debug your own code.

I had no problem when debugging 3ds Max plugins with VS 2005…

I think your problem is that the plugin isn’t loaded. The plugin file *.dle must be copied/generated in the \plugins folder of Max in order to be loaded and debugged. Also, have you a name conflict or plugin loading error when running Max ?

To debug your plugin it’s not necessary to compile it in Debug mode, Hybrid mode is better (See http://dl3d.free.fr/resources/3DSMAX_SDK_DavidLanier.pdf page 25).

scorpion007

  1. I set the configuration to hybrid mode,
  2. set the working directory to my maxroot folder,
  3. set the “command” to “3dsMax.exe”,
  4. and set the output and intermediate directories to the …\stdplugs\ASCIIEX\ folder.
    **
    It got the same error as before; no symbols loaded. It starts 3dsMax, but there is no ASCII option when trying to export.

ypuech
After more closely scrutinizing the output of compiling, I notice that there are no DLE or DLL files being compiled. In fact, there are only two files in the ASCIIEX folder: a .res file, and a BuildLog.

Ok, What’s the Output File in the Linker section of the project properties ?

I think your problem is that the dle is generated in a bad \plugin directory in maxsdk directory so Max cannot load it… The plugin file must be outputed in the maxdirectory\plugins folder.

Moreover \stdplugs is only for Autodesk first party plugins and \plugins path is for 3rd party developers.

The outputfile is currently:
“C:\Program Files\Autodesk\3ds Max 9\plugins”

Here is a screenshot of my current linker window.

Thanks again for your help, this has been such a hard processes these last few weeks!

You’ve not specified a filename but a pathname.

For Visual Studio, the file to output is “C:\Program Files\Autodesk\3ds Max 9\plugins” but this is not a file, it’s a path name (it’s specified Output File, not Output Directory).
Just append asciiexp.dle to that path and your plugin will be generated as expected.

AND THE CHORUS SWELLS! [Ode to Joy]

[size=2]The debugging worked, and took me right to the breakpoint. This is like…a miracle. Thanks for your help Ypuech! Couldn’t have done it without you!

p.s. To anyone suffering the same ailment, just ignore the missing symbols error.
[/size]

Great! Good luck with debugging Max :).