SIImportReferencedMatLib

Introduced

v6.0

Description

Imports a .xsi file-based material library as a referenced file. Only the SI_MaterialLibrary part of the file is read. It becomes part of the scene as if merged. The original path is maintained and the library itself is flagged locked.

Note: This command is an alias for the command SIImportMatLib with the ShareOptions parameter forced to siImportShareOptionsMaterials.

Note: This command uses output arguments. C# and some scripting languages (such as JScript, PerlScript and Python) don't support arguments passed by reference so you need to use the best workaround for your situation:

For scripting languages this command returns an ISIVTCollection which you can use to get the output arguments.

For C# you can use the XSIApplication.ExecuteCommand method to call this command. ExecuteCommand packs the output arguments into a C# System.Object containing an Array of the output arguments (see Calling Commands from C#).

Scripting Syntax

SIImportReferencedMatLib( FileName, [Value] );

Parameters

Parameter Type Description
FileName String Name of the model file to import.

Default Value: If this parameter is not specified, a browser pops up, prompting the user to pick an .xsi file

Value MaterialLibrary Returns the library created

See Also

SIImportMatLib ExportMaterialLibrary Material.Library Scene.ActiveMaterialLibrary