NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Set Property Object, Error -17335

Solved!
Go to solution

I'm trying to write a sequence that'll help me set privileges for new groups. Whenever I run my sequence, I get the following error: 

-17335; Property object cannot be added.

 

All I'm doing in my sequence is:

  1. Creating a new user
  2. Setting the name
  3. Setting the privilege using the SetPropertyObject method

I've attached a snippet of my sequence, but the error occurs with the following statement.

Locals.UserRef.AsUser.Privileges.SetPropertyObject(Priv_GrantAll, PropOption_NoOptions, Parameters.Privileges.GrantAllFlag)

I've used this method in other sequences, but I can't seem to figure out whats causing the error here. Any help or pointers to where I could look would be appreciated.

 

I'm using TestStand 2016 (32-bit).

 

Thanks,

Luis

0 Kudos
Message 1 of 2
(2,349 Views)
Solution
Accepted by topic author LGallegos_

Locals.UserRef.AsUser.Privileges.SetPropertyObject(Priv_GrantAll, PropOption_NoOptions, Parameters.Privileges.GrantAllFlag.Clone("", 0))

 

You need to clone the GrantAllFlag.  You can't assign it like that because it already has a parent and cannot be disconnected.

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
Message 2 of 2
(2,334 Views)