Topics   All   MacOS (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Deprecated   Guides   Examples   Videos
New in version: 11.0   11.1   11.2   11.3   11.4   11.5   12.0   12.1   12.2   12.3    Statistic    FMM    Blog  


Returns the type at the given index (zero based).

Component Version macOS Windows Linux Server iOS SDK License
Container 1.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes Paid
MBS( "Container.GetType"; Container; index )   More


Parameter Description Example
Container The container field or value to inspect. $container
index The index of the the item to query in the container. 0


Returns the type at the given index (zero based).
A container contains several data parts, each with an unique type.
Types are 4 character long and some types like "PDF " have an extra space.

See Container.GetTypes to query list of all types in a container.


Export all streams in container to individual files:

Set Variable [$container; Value:Test::Image]
#where to save
Set Variable [$DesktopFolder; Value:MBS("Folders.UserDesktop")]
#loop over streams in container
Set Variable [$count; Value:MBS( "Container.GetCount"; $container )]
Set Variable [$index; Value:0]
    #query the type of stream with given index
    Set Variable [$type; Value:MBS( "Container.GetType"; $container; $index )]
    #write it to a file
    Set Variable [$path; Value:$DesktopFolder & "/" & $type]
    Set Variable [$r; Value:MBS( "Container.Export"; $container; $index; $path )]
    Set Variable [$index; Value:$index + 1]
    Exit Loop If [$count = $index]
End Loop

See also

Blog Entries

Created 18th August 2014, last changed 6th November 2018

Container.GetTotalSize - Container.GetTypeSize

Feedback: Report problem or ask question.

Start Chat