Notifications
Clear all

[Closed] max file version number

Is there anyone familiar with the IStorage stuff for reading out the version number under which a max file was saved? I’d like to retrieve the max-version and the saved-as-version. I don’t want to scan always the entire file for searching the strings.

4 Replies

You don’t have to deal with it yourself if you are inside 3ds Max

Inside Max using Maxscript

getMaxFileVersionData <Max filename> 

http://help.autodesk.com/view/3DSMAX/2016/ENU/?guid=__files_GUID_F693FDB5_1B1B_4A4D_9C48_ECF91272FD88_htm

There are some public open source assemblies to help for structured storage access, ( eg http://calummclellan.com/downloads/20100517/StructuredStorage_V10.2_binaries.zip or https://sourceforge.net/projects/openmcdf/ ), but the to decipher the COM properties you have to code something yourself. For reference you can check out the MaxFinder Utility in the SDK sample source code ( C++ )
But be warned the whole IStorage/IProperty stuff is mind boggling …

Without relying on 3ds Max, i started to code a dotNet library ( C++/CLI ) which reads the IStorage stuff ( besides a whole lot other things )

//youtu.be/liYBSK6-VyU

MaxSceneInfo: a dotNet library for Max scene file information parsing
This video shows some features of a dotNet library currently in development.
The library provides an API to parse info in 3ds Max scene files ( *.max files ) without having 3ds Max installed.
Besides other things, the library provides access to the following data:

  • Max file version
  • scene’s thumbnail
  • scene content ( object counts, object types, object names, material names )
  • external file dependencies ( textures, xrefs, plugins, render scripts …)
  • render information ( target resolution and format, output path, renderer used, framerate and frame ranges, batch renders … )
  • user properties and more …

In the video:
At the beginning i give a short overview about what data is provided via this library demoing a small tool written quickly in C#.
The following first half of the video deals with using the library in 3ds Max via Maxscript itself.
The second half demonstrates the library’s usage via Powershell. The latter opens some great possibilities:
I demonstrate how the library helps searching for scenefiles which use a specific 3ds Max plugin, inside a folder structure with several hundreds of Max files. Or filtering specific Max files of a specific version.
As bonus i show how easy it is to extract the thumbnail image from a given scenefile and display it. All this is done via the MaxSceneInfo assembly, loaded in Powershell and without relying on any 3ds Max installation.

I need access from an external C++ application. So I have to immerse in this structured storage stuff first. I thought sombody can give me a love tap to the right direction. BTW: I read somewhere the property “DocumentSummary” has to be leaded in with “\005” ?

1 Reply
(@spacefrog)
Joined: 11 months ago

Posts: 0

Than the MaxFinder Utility source code will be of interest for you. Or if you can go the C++/CLI route, you could make use of one of the existing dotnet assemblies i mentioned above. Structured storage stuff documentation can be found on the web, To analyse structured storage files , there are some great free utilities available too: http://www.mitec.cz/ssv.html or the Structured storage explorer that comes with one of the above mentioned opensource packages

Be warned though, the version information is not accessable without serious parsing effort
The DocumentSummaryInformation holds the scene description in a PropertySet, which in turn holds the version and saved as version records ( as VARIANTs) . Problem is that entries there can be stored either in ascii or MBCS (depending on Max version that saved the file) and most records are localized and the positioning is not fixed. Thus you cannot search for fixed positions and simply read that out. You will have to use the IPropertyStorage interface to read that out, and parse those entries.
For a guide how to do it, read up the SDK sample code for MaxFinder utility, ( the code still depends on some 3ds Max dlls though, so you will have to adapt that code if you don’t want to use any Max dll’s )

Hallo Joe,
danke und thanks for all the informations. I’ll delve into these features as they might be useful for other applications as well.
Istan