SpdlCheck

Introduced

v5.0

Description

Starts the spdlcheck utility from within Softimage. The spdlcheck utility is a command-line tool that parses a .spdl file and explains any errors it finds.

Note: The spdlcheck utility supports additional features that are not exposed by this command. For more details, please refer to the implementation of this command (in $factory\Application\Commands\SDKHelpers.js) and to the SPDL Reference.

Scripting Syntax

oString = SpdlCheck( strFilePath, [in_WithUI] );

Return Value

A String with the output of the spdlcheck utility.

Parameters

Parameter Type Description
strFilePath String Full path to a spdl file
in_WithUI Boolean Specifies whether to show the user interface. If true, the results of the spdlcheck are displayed immediately to the user. Otherwise, this command is silent and it is left to the caller to handle the results of the spdlcheck.

Default Value: true

Examples

JScript Example

/*

	Demonstration of spdlcheck

*/

// Get the path to the spdl file on an internal Softimage object

var oSphere = ActiveSceneRoot.AddGeometry( "Sphere", "MeshSurface" ) ;

var spdlFile = XSIUtils.DataRepository.GetIdentifier( oSphere, siSpdlFile ) ;

// Check it with spdlcheck (note: this should always pass,

// otherwise we would not be able to create the Sphere in the first place)

var spdlCheckResults = SpdlCheck( spdlFile, false ) ;

// If the string begins with "Compilation succeeded" we know that

// the spdl is ok.

var bSuccess = ( 0 == spdlCheckResults.search( /^Compilation succeeded/ ) );

if ( bSuccess )

	Application.LogMessage( spdlFile + " compiles ok" ) ;

else

	Application.LogMessage( spdlCheckResults ) ;

See Also

DataRepository.GetIdentifier XSIUtils.WriteSPDL