v4.0
Creates and adds a library under the sources container. A
library is a container for homogenous objects like materials. To
remove a library, use the DeleteObj
command.
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#).
CreateLibrary( [Name], [Type], [Value] ); |
Parameter | Type | Description |
---|---|---|
Name | String | The name to give to the new library. |
Type | Integer | Specify the type of library. For now only Material libraries
are supported.
Default Value: 1 (material) |
Value | Source | The library created. |
// Since this command uses an output argument, we need to get the return // object out of the output argument array that the command returns. var rtn = CreateLibrary( "MyMaterials" ); var mylib = rtn(0); |