ResolveTokenString (XSIUtils)

Introduced

6.01

Description

Resolves a token string at a given time. A token is a word surrounded by square brackets. Some tokens, such as [Frame], are already defined by Softimage and can be time dependent. For a list of all the built-in tokens, see Output Path Templates.

Note: To specify custom (user-defined) tokens, you can pass arrays representing token names and values in the UserTokenNames and UserTokenValues arguments which will be used to resolve the token string. The two string arrays must have the same size.

Scripting Syntax

XSIUtils.ResolveTokenString( TokenString, Time, Verbose, [UserTokenNames], [UserTokenValues] )

C# Syntax

String XSIUtils.ResolveTokenString( String in_TokenString, Object in_Time, Boolean in_bVerbose, Object in_TokenNames, Object in_TokenValues );

Parameters

Parameter

Type

Description

TokenString

String

The input string containing tokens.

Time

Variant

The time used to resolved time dependent tokens.

Verbose

Boolean

True to log error messages.

UserTokenNames

Variant

An optional Array of strings representing the user token names.

UserTokenValues

Variant

An optional Array of strings representing the user token values.

Return Value

String

Examples

C# Example

// This example shows how to resolve token strings. 

object[] tokenNames = new object[2] { "A", "C"};
object[] tokenValues = new object[2] { "AAA", "CCC" };

// Note that the Log method used below is provided by the Softimage wizards
Log( "Resolve using default tokens= " + GetUtils().ResolveTokenString("[A][C][Project]", 0, false, null, null) );
Log( "Resolve using default and user tokens= " + GetUtils().ResolveTokenString("[A][C][Project]", 0, false, tokenNames, tokenValues) );


Autodesk Softimage v7.5