Aveva cant see a method returning an c# string []array from .dll

 
Parents
  • Hi Metzger !

    You need to use Hashtable (which contains a key-value pair of double-string in your case) to returns a PML Array from a PMLNetCallable method.
    The key starts at 1 (corresponding to the first index of the PML Array).
    Example to convert your string[] to this kind of Hashtable:

    string[] resultValues = new string[] { "A", "B", "C" };
    Hashtable output = new Hashtable();
    foreach(string resultValue in resultValues)
    {[INDENT]output.Add((double)(output.Count + 1), resultValue);[/INDENT]
    }

    return output;


    You have here the list of .Net types accepted by PML here, at the middle of the page:
    https://help.aveva.com/AVEVA_Everything3D/3.1/wwhelp/wwhimpl/js/html/wwhelp.htm#href=NCUG/NCUG5.07.3.html
Reply
  • Hi Metzger !

    You need to use Hashtable (which contains a key-value pair of double-string in your case) to returns a PML Array from a PMLNetCallable method.
    The key starts at 1 (corresponding to the first index of the PML Array).
    Example to convert your string[] to this kind of Hashtable:

    string[] resultValues = new string[] { "A", "B", "C" };
    Hashtable output = new Hashtable();
    foreach(string resultValue in resultValues)
    {[INDENT]output.Add((double)(output.Count + 1), resultValue);[/INDENT]
    }

    return output;


    You have here the list of .Net types accepted by PML here, at the middle of the page:
    https://help.aveva.com/AVEVA_Everything3D/3.1/wwhelp/wwhimpl/js/html/wwhelp.htm#href=NCUG/NCUG5.07.3.html
Children
No Data