Update a boolean property using API

Update a boolean property using API

Anonymous
Not applicable
770 Views
2 Replies
Message 1 of 3

Update a boolean property using API

Anonymous
Not applicable

How do I update a boolean property using API?

 

mDocSvc.UpdateFileProperties(new long[] { file.MasterId }, new long[] { propDefId }, new object[] { true });

 

"new object[] { true }" does not work. I've tried a cuple of alternatives using string "True", integer 1 etc., but all of them gick me an exception with error code 0 (UnspecifiedSystemException). The file does exists and in Vault Explorer I can change the property value between True and False in a dropdown combobox.

 

Thanks!

 

 

0 Likes
Accepted solutions (1)
771 Views
2 Replies
Replies (2)
Message 2 of 3

Redmond.D
Autodesk
Autodesk
Accepted solution

Error 0 can mean many things, it might not be the property value.  Have a look a this blog article for tips on how to handle the error.



Doug Redmond
Software Engineer
Autodesk, Inc.

0 Likes
Message 3 of 3

Anonymous
Not applicable

Thanks! That solved my problem!

 

I was too focused on the boolean value, I didn't realize the file had to be checked out.

 

0 Likes