[C#] Creating a new MArgDatabase from MArgList failed

[C#] Creating a new MArgDatabase from MArgList failed

Anonymous
Not applicable
365 Views
1 Reply
Message 1 of 2

[C#] Creating a new MArgDatabase from MArgList failed

Anonymous
Not applicable

Hi!

 

I have a command in c#, and I try to create the MargDataBase from the receive MArgList.

 

void doIt(MArgList args)

MArgDatabase data = null;
try
{
      data = new MArgDatabase(syntax, args);
]
catch (Exception e)
{
       MGlobal.displayError( $"Cannot Parse Args for the command, Abort!\n {e.Message}");
       return;
}

 

 

But it throws an internal failure exception and I cannot use it.

 

I am using .Net API, Windows 10, Maya 2017 Update 3

 

The command is called from Python.

 

What could cause this failure?

 

PS : it does not always fail...

0 Likes
366 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable

Maybe just a typo when copy/pasting in the question, but you have a closing ] instead of a closing }