Jump to content

Recommended Posts

Posted

Hi,

I'm new to Sysmac studio and I'm building a project that requires an Admin screen for adding /deleting users and roles

I was following a couple of topics here and understood that you can get a list of users  or roles by folowing:

Dim array(100) As String

Sub GetAllRoles
    array= System.Linq.Enumerable.ToArray(_Hmi_s_Roles())
    RolesBox.SetItems(array)
End Sub

Sub GetAllNames
    array= System.Linq.Enumerable.ToArray(_HMI_s_Users())
    NamesBox.SetItems(array)
End Sub    

It was working fine in simulation mode, but when I  downloaded it to PLC I got the following error:

"SafeArrayTypeMismatchException is thrown at CallMethod"

E_SYS_999: 0x80131533

Did anyone encountered it? Any workaround?

Thank you!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...