AVEVA Community
AVEVA Community
  • Site
  • User
  • Site
  • Search
  • User
PDMS/E3D Forum
  • AVEVA World
PDMS/E3D Forum
PDMS Quick Tips & Customizations Net C Sharp - return array
  • Forums
  • Resources
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Replies 8 replies
  • Subscribers 2 subscribers
  • Views 55 views
  • Users 0 members are here
Options
  • Share
  • More
  • Cancel
Related

Net C Sharp - return array

CESBRON Jean-Charles
CESBRON Jean-Charles over 12 years ago
 
  • Sign in to reply
  • Cancel
  • CESBRON Jean-Charles
    CESBRON Jean-Charles over 12 years ago
    Hi,
    i want return with void array and use it with pml.
    For example:
           [PMLNetCallable]
           public ArrayList hello ()
           {
               Process p = new Process();
               p.StartInfo.UseShellExecute = false;
               p.StartInfo.RedirectStandardOutput = true;
               p.StartInfo.FileName = "cmd.exe";
               p.StartInfo.Arguments = "/k arp -a && exit";
               p.Start();
               string output = p.StandardOutput.ReadToEnd();

               string[] result = output.Split(' ');
               ArrayList result1 = new ArrayList(result.Length);
               result1.AddRange(result);
               return result1;
           }
    but i think a ArrayList type is not valable for return to pml?

       IMPORT 'NAME OF DLL'
       handle (1000,0)
       endhandle
       USING NAMESPACE 'NAME OF NAMESPACE'
       !A = OBJECT PMLClassTest()
       !test = !A.hello()


    have you idea?
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • CESBRON Jean-Charles
    CESBRON Jean-Charles over 11 years ago
    It's OK,

    For return array, you must use hastable type.
    Hashtable hashtable = new Hashtable();
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Tepliuk Aleksandr
    Tepliuk Aleksandr over 10 years ago
    Join this group to learn PMLNET
    https://lnkd.in/eZJFWV2
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • me_hungry
    me_hungry over 10 years ago
     

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Han_BFY
    Han_BFY over 10 years ago
    [QUOTE=sasha;94359]Join this group to learn PMLNET
    https://lnkd.in/eZJFWV2

    Hi sasha..

    I think it is good also if you could contribute your idea and knowledge on PDMS C# in this PDMSworld forum... instead of hoping people to joint and ask question in linkedin group .. I mean the other option of sharing knowledge and help others via the website....

    ;-)..cheers!!!
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Tepliuk Aleksandr
    Tepliuk Aleksandr over 10 years ago
    I do not spam. Just informing people where they can find useful information.
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Tepliuk Aleksandr
    Tepliuk Aleksandr over 10 years ago
    [QUOTE=Han_BFY;94373]Hi sasha..

    I think it is good also if you could contribute your idea and knowledge on PDMS C# in this PDMSworld forum... instead of hoping people to joint and ask question in linkedin group .. I mean the other option of sharing knowledge and help others via the website....

    ;-)..cheers!!!
    Unfortunately, on this forum there is no section devoted to programming in C #. Therefore, the information is scattered. When the information is in one place, it is easier to search. :smile-new:
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Han_BFY
    Han_BFY over 10 years ago
    Unfortunately, on this forum there is no section devoted to programming in C #. Therefore, the information is scattered. When the information is in one place, it is easier to search. :smile-new:


    I really hope the Administrator of AVEVA world forum will create new title for PDMS C# discussion...

    most of people also asking same question to AVEVA world Administrator.. but till now they didn't do anything yet.

    hope in near future AVEVA team will make that happen..
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel