Introduced
1.0
Description
Saves a preset of the specified objects.
This command is available from every property page, by clicking the "Load" button in the top right-hand corner.
Scripting Syntax
SavePreset( InputObj, PresetName, [PresetPath], [PresetLocation], [Overwrite], [CreateThumbnail], [Description] )
Parameters
|
Parameter |
Type |
Description |
|
InputObj |
The object to be saved. |
|
|
PresetName [in/out] |
Name of the preset. |
|
|
PresetPath |
Specify a full or a partial path. |
|
|
PresetLocation |
The preset location where to save the preset. Default Value: siDefaultLocation |
|
|
Overwrite |
If the file exist do you want to overwrite it? Default Value: True |
|
|
CreateThumbnail |
If true, the render region will be used to create a thumbnail for the preset Default Value: False |
|
|
Description |
Preset Description |
Return Value
Returns the preset object. This is an internal object not exposed to the SDK, but you can pass the object to the Application.LogMessage method to get its full path and filename.
Examples
VBScript Example
dim obj, pst set obj = CreatePrim( "Cone", "MeshSurface" ) ' SavePreset gives an error if the preset already exists 'On Error Resume Next 'set pst = SavePreset( obj, "myPreset", , siUser ) 'msgbox "Preset already exists" ' You can force an overwrite like this: set pst = SavePreset( obj, "myPreset", , siUser, True ) Application.LogMessage pst ' Expected results: 'INFO : <XSI_HOME>\Data\DSPresets\3DObjects\myPreset.Preset
See Also
Autodesk Softimage v7.5