The File Properties can be accessed in MAXScript using the methods described in this topic.
The File Properties are organized into three sets. These sets correspond to the three pages in the Main Menu > File > File Properties dialog:
This set contains the Title, Subject, Author, Keywords, Comments fields from the Summary page.
This set contains the Manager, Company, Category and an array of all headers from the Contents page like General, Mesh Totals etc. Note that the Contents page contents are only update when the file is saved. You can perform a max hold to perform a scene hold, which causes the file to be saved and the Contents page contents to be updated.
This set contains all the fields from the Custom page.
The following methods are used to access the above sets. <set_name> can be any of the values from above.
Returns the number of properties in the given set.
Returns as a string the property name of the given index. The index is 1-based.
Returns the property value of given index. The value type can be one of the following types of values currently supported by 3ds Max in the File Properties dialog. The values in bracket are the MAXScript equivalent value type.
Text [String] Date [String] - contains the date eg:"03/23/99" Number [Integer or Float based on actual value] Yes or No [Boolean] Headers [Array of strings]
Headers are items like General, Mesh Totals, etc. that appear in contents page.
Returns an array of strings containing all the items under the given header.
Given the set name and property name string, will return the index of the property if found, 0 if not found.
Adds a new property with the property name and property value to the specified set.
The property values can be any of the types previously described except an Array as you cannot add anything to contents page.
If string containing a date is passed then the optional #date argument has to be passed for it to be added as a date value.
Adding to an existing property name will replace the existing value and act as a setter function - this is why there is no fileProperties.setProperty() method.
Delete the property indicated by <prop_name_string> in the specified set.
Following is an example of printing all the File Properties in an hierarchical fashion for the current scene.