I would like to read, using maxscript, the "File Properties - Custom - Used Plug-ins" data from a .max file without opening the file in 3ds max.
What I have tested so far:
- CalumMcLellan.StructuredStorage.dll, using the sample code, provided by denisT in this thread.
- DSOFile.dll
but with no success. I can get some data, but not the "Used Plug-ins".
Solved! Go to Solution.
Solved by Serejah. Go to Solution.
openmcdf definitely can read this data stream
// https://learn.microsoft.com/en-us/windows/win32/stg/the-documentsummaryinformation-and-userdefined-property-sets
CompoundFile cf = new CompoundFile(@"C:\...\test.max");
var stream_name = $"{((char)0x05)}DocumentSummaryInformation";
CFStream fs;
if ( cf.RootStorage.TryGetStream(stream_name, out fs) )
{
byte[] bytes = fs.GetData();
Console.WriteLine( Encoding.Default.GetString( bytes ) );
}
cf.Close();
and btw, AutodeskAssetLibrary tool has this c# dll that has some useful methods like the one you need
@miauuuu написал (-а):is there any way to read all those methods from the dll files without opening them one by one until we find what we need?
If you want to do it with maxscript inside max then you'll have to load the assembly anyway. Then using reflection you can get all the needed info about properties/methods of a particular class. There're a lot of examples on the web
But the most convenient way to analyze dlls is searching for documentation or browsing them with tools like dnSpy, DotPeek, Visual Studio Object Browser and I believe there're many more others
I can't find MaxFileUtilitiesDotNet.dll anywhere. I assume it is installed when the AssetLibrary tool is being installed, but this tool is no longer available for download from the Autodesk App store. Is there any chance to share the tool if you have it?
Can't find what you're looking for? Ask the community or share your knowledge.