XSI.FIE.US

FIEJSEval

Description

This is by far the simplest addon I've ever written. It's so simple I feel guilty about claiming authorship.

FIEJSEval is a command that takes a string as an argument. It will then execute (eval) the code with the JScript scripting engine in XSI. This allows any COM enabled language executing in the XSI environment to run JScript code simply and easily.

Optionally, one can return an object. If one sets the intrinsic object "retObj" to a value from within the eval code, it will be returned from the FIEJSEval command as its return value. If one does not set the "retObj" object to anything, the command will simply return null.

I wish there were more to say, but there isn't. Its just that simple.

Example Usage

testObj = null;
testObj = FIEJSEval("retObj = Selection(0);");
LogMessage(testObj);

Download

Version 0.1

©2004 Brad Friedman