v5.0
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.
oString = SpdlCheck( strFilePath, [in_WithUI] ); |
A String with the output of the spdlcheck utility.
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 |
/* 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 ) ; |