PDA

View Full Version : C# CustomCommand return value trouble..


RedBjarne
08-05-2008, 07:50 AM
Hi

I don't seem to be able to get the return value to work using c#. I am using a simple command created with the wizard with no changes to the code.
I use the following line (in another c# plugin) to execute the command.

Array retVal = (Array)m_xsi.ExecuteCommand("ReturnCommand", null);

for some odd reason I seem to get null (c# 'empty' value and not a Null node) instead of an array containing the returnvalue (the command returns a bool).

I can easily make this work in jScript, only difference is the return value is casted as a Boolean to receive the right type.

Does anyone have a suggestion on what I might be doing wrong?

RedBjarne
08-05-2008, 07:51 AM
oh forgot one thing.. I get this exception

Exception Raised : System.NullReferenceException: Object reference not set to an instance of an object.