- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am adding Items to Vault 2013 Professonal through the API.
I now have to populate some UDPs that we have defined for Items.
I don't see the Item UDPs for the Item object, so I figure that something else is needed to access them, but I can't find examples in the Help File or here.
Here is where I am at:
// Get our Item Numbering Schema ("Mapped") ID.
long itemNumberingSchemeID = GetItemNumberingSchemeID("Mapped");
// Create a new Item with that Category ID.
newItem = m_ItemSvc.AddItemRevision(GetCatID("Mechanical Detail"));
// Create an array with the desired item number.
string[] newItemNum = newstring[] { itemNumber };
// Create an array of StringArrays with 1 element.
StringArray[] fieldInputs = new StringArray[1];
// Create a single StringArray.
StringArray tempArr = newStringArray();
tempArr.Items = newItemNum;
fieldInputs[0] = tempArr;
// Change Item Number.
ItemNum[] newNums = m_ItemSvc.AddItemNumbers(newlong[] { newItem.MasterId }, newlong[] { itemNumberingSchemeID }, fieldInputs);
// Set Item values.
newItem.ItemNum = itemNumber;
newItem.Detail = GetExcelData("Description");
newItem.Title = "";
// Set Item UDP values.
newItem.BasicMaterial =
newItem.Size =
newItem.Vendor =
Solved! Go to Solution.
