Community
Vault Customization
Share your knowledge, ask questions, and explore popular Vault API, Data Standard, and VBA topics related to programming, creating add-ins, or working with the Vault API.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Blank system properties after editing items

2 REPLIES 2
Reply
Message 1 of 3
fnacer
383 Views, 2 Replies

Blank system properties after editing items

I am running code to clean up items, their attachments and their BOM in Vault 2012 Professional. After I run the code, the items end up with several system properties being blank including Category Name, Property Compliance, Revision Scheme and Type. "Historical" versions of those properties (where they exist) do show the correct value. Subsequently editing and releasing records by hand results in all the properties being populated properly once again.

 

Any idea what might be causing this? Thanks.

2 REPLIES 2
Message 2 of 3
Daniel.Dulzo
in reply to: fnacer

Hello fnacer,

 

Could you provide more details as to what you mean when you say you're running code to update items? A more detailed description of what your code is doing including what web service methods you're using or an example code snippet would be helpful.

 

Thanks



Daniel Dulzo
Software Engineer
Autodesk, Inc.
Message 3 of 3
fnacer
in reply to: Daniel.Dulzo

The code does the following:

 

1) Take item to Work in Progress

2) Remove all attachments

3) Edit selected user-defined properties

4) Remove selected items from the BOM

5) Associate new user-defined properties

6) Attach files

7) Return the item to its original lifecycle state

 

The code is running against Vault Pro 2012 and uses the web service API (e.g., ItemService, DocumentService, etc.).  Here's an edited sample of the code I am using for step #1 and #7:

 

Item[] itemsToEdit = itemSvc.EditItemLifeCycleStates(new long[] { id });

ProductRestric[] primaryRestrictions;
ProductRestric[] warnings;
ProductRestric[] optionalRestrictions;
Item[] optionalItems;

Item[] editedItems = itemSvc.UpdateLifeCycleStates(new long[] { itemsToEdit[0].Id }, lifeCycleId, false,

      out primaryRestrictions, out warnings, out optionalRestrictions, out optionalItems);
itemSvc.UpdateAndCommitItems(editedItems);

 

None of my code does anything explicit with Category Name or the other system properties I am having trouble with. But since manually changing the item's lifecycle to WIP and back to Release appears to restore the property values, perhaps you could suggest the right code to do that. Thanks.

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report