Hi there!
I am making my very first steps into the realm of C++ coded Custom Compiled Commands.
In your XSI installation under " XSI_3.01XSISDKexamplesSimpleCommandcpp " there is the project for a simple Custom Compiled Command.
This one I managed to compile and register.
Now I would also like to know how to pass back a return value to XSI. And I don't seem to get that right.
The method has a parameter called io_retVal but I just don't seem to be able to "use" it properly.
When i try to assign a value to it it compiles properly but this value does never arrive in the XSI script editor where the Command got called.
Here is the UNCHANGED source code fragment of the example:
//---------------------------------------------------------------------- --------------------------------
XSI::CStatus XSIOnCommandCPP
(
const XSI::CString& in_strCmdName, // name od the command
XSI::CValueArray& in_array, // array of arguments
XSI::CValue& io_retVal // return value
)
{
Application app;
app.LogMessage( L"Executing command: " + in_strCmdName );
for (long i=0; i < in_array.GetCount(); i++)
{
app.LogMessage( L"Arg " + CValue(i).GetAsText() + L" = " +
in_array.GetAsText() );
}
return CStatus:
K;
}
//---------------------------------------------------------------------- --------------------------------
Any help appreciated...
Martin