<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Populating Item UDPs in Vault Customization Forum</title>
    <link>https://forums.autodesk.com/t5/vault-customization-forum/populating-item-udps/m-p/3647236#M11674</link>
    <description>&lt;P&gt;Here is the final version:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#008000"&gt;&lt;FONT color="#008000"&gt;&lt;FONT color="#008000"&gt;// Get our Item Numbering Schema ID.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;long&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; itemNumberingSchemeID = GetItemNumberingSchemeID(&lt;FONT color="#a31515"&gt;&lt;FONT color="#a31515"&gt;&lt;FONT color="#a31515"&gt;"Mapped"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000" face="courier new,courier"&gt;&lt;FONT color="#008000"&gt;&lt;FONT color="#008000"&gt;// Create a new Item with that Category ID (Use "Mechanical Detail" for everything for now).&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;newItem = m_ItemSvc.AddItemRevision(GetCatID(&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#a31515"&gt;&lt;FONT color="#a31515"&gt;&lt;FONT color="#a31515"&gt;"Mechanical Detail"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;));&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#008000"&gt;&lt;FONT color="#008000"&gt;&lt;FONT color="#008000"&gt;// Create the parameter for creating a new Item Number.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;string&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;[] newItemNum = &lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;new &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;string&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;[] { itemNumber };&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#008000"&gt;&lt;FONT color="#008000"&gt;&lt;FONT color="#008000"&gt;// Create a new ItemNum object; we have to tell Vault to expect the new number.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;ItemNum &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;newNum = m_ItemSvc.AddItemNumber(newItem.MasterId, itemNumberingSchemeID, newItemNum);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000" face="courier new,courier"&gt;&lt;FONT color="#008000"&gt;&lt;FONT color="#008000"&gt;// Set Item values&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;newItem.ItemNum = newNum.ItemNum1; &lt;/FONT&gt;&lt;FONT color="#008000" face="courier new,courier"&gt;&lt;FONT color="#008000"&gt;&lt;FONT color="#008000"&gt;// Vault knows about the new number now.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;newItem.Detail = GetExcelData(&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#a31515"&gt;&lt;FONT color="#a31515"&gt;&lt;FONT color="#a31515"&gt;"Description"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;newItem.Title = itemNumber;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000" face="courier new,courier"&gt;&lt;FONT color="#008000"&gt;&lt;FONT color="#008000"&gt;// Commit the item, which finalizes the object.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;m_ItemSvc.UpdateAndCommitItems(&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;new &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;Item&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;[] { newItem });&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000" face="courier new,courier"&gt;&lt;FONT color="#008000"&gt;&lt;FONT color="#008000"&gt;// Read the Item back in to update the UDPs.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;savedItem = m_ItemSvc.GetLatestItemByItemNumber(itemNumber);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;editableItem = m_ItemSvc.EditItem(savedItem.RevId);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#008000"&gt;&lt;FONT color="#008000"&gt;&lt;FONT color="#008000"&gt;// Get the User Defined Properties.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;List&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&amp;lt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;string&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&amp;gt; UDPList = FillUDPList();&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;int &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;UDPListLength = UDPList.Count();&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;long&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;[] propDefIdArray = &lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;new &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;long&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;[UDPListLength];&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;string&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;[] propValueArray = &lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;new &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;string&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;[UDPListLength];&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#008000"&gt;&lt;FONT color="#008000"&gt;&lt;FONT color="#008000"&gt;// get the map between the property name and all Vault objects.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;Dictionary&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&amp;lt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;string&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;, &lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;PropDef&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&amp;gt; propDefMap = GetPropDefMap(mgr);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;string&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; excelCellData = &lt;FONT color="#a31515"&gt;&lt;FONT color="#a31515"&gt;&lt;FONT color="#a31515"&gt;""&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;int &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;index = 0;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#008000"&gt;&lt;FONT color="#008000"&gt;&lt;FONT color="#008000"&gt;// Put UDP values and propDefIds into arrays.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;foreach&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; (&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;string&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; item &lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;in &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;UDPList)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;{&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp; excelCellData = GetExcelData(item);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#008000"&gt;&lt;FONT color="#008000"&gt;&lt;FONT color="#008000"&gt;&amp;nbsp;&amp;nbsp; // Get the property definition from the property name.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;&amp;nbsp;&amp;nbsp; PropDef &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;propDef;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&amp;nbsp;&amp;nbsp; if&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; (!propDefMap.TryGetValue(item, &lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;out&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; propDef) || &lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;String&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;.IsNullOrEmpty(excelCellData))&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp; {&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; continue&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;; &lt;FONT color="#008000"&gt;&lt;FONT color="#008000"&gt;&lt;FONT color="#008000"&gt;// tag value doesn't match any Vault properties, or cell was empty.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp; }&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="courier new,courier"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&amp;nbsp;&amp;nbsp; try&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp; {&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000" face="courier new,courier"&gt;&lt;FONT color="#008000"&gt;&lt;FONT color="#008000"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Add to the list of UDPs and values to set.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; propDefIdArray[index] = propDef.Id;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; propValueArray[index] = excelCellData;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; index++;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp; }&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&amp;nbsp;&amp;nbsp; catch&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; (&lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;Exception&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;ex)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp; {&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MessageBox&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;.Show(&lt;FONT color="#a31515"&gt;&lt;FONT color="#a31515"&gt;&lt;FONT color="#a31515"&gt;"Error with property "&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; + item + &lt;FONT color="#a31515"&gt;&lt;FONT color="#a31515"&gt;&lt;FONT color="#a31515"&gt;":\n"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;+ ex.Message);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp; }&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;}&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#008000"&gt;&lt;FONT color="#008000"&gt;&lt;FONT color="#008000"&gt;// Redimension the arrays; it will exception if the arrays are not full.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;Array&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;.&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;Resize(&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;ref&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;propDefIdArray, index);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;Array&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;.Resize(&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;ref&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;propValueArray, index);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;if&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;(index &amp;gt; 0)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;{&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000" face="courier new,courier"&gt;&lt;FONT color="#008000"&gt;&lt;FONT color="#008000"&gt;&amp;nbsp;&amp;nbsp; // We have the arrays all set; now do the actual save.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp; m_ItemSvc.UpdateItemProperties(&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;new &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;long&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;[] { editableItem.RevId }, propDefIdArray, propValueArray);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;}&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 04 Oct 2012 20:31:24 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2012-10-04T20:31:24Z</dc:date>
    <item>
      <title>Populating Item UDPs</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/populating-item-udps/m-p/3643626#M11666</link>
      <description>&lt;P&gt;&lt;FONT size="2" face="helvetica" color="#000000"&gt;&lt;FONT size="2"&gt;&lt;FONT size="2"&gt;I am adding Items to Vault 2013 Professonal through the API.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" face="helvetica" color="#000000"&gt;&lt;FONT size="2"&gt;&lt;FONT size="2"&gt;I now have to populate some UDPs that we have defined for Items.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" face="helvetica" color="#000000"&gt;&lt;FONT size="2"&gt;&lt;FONT size="2"&gt;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.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" face="helvetica" color="#000000"&gt;&lt;FONT size="2"&gt;&lt;FONT size="2"&gt;Here is where I am at:&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" color="#008000"&gt;&lt;FONT color="#008000"&gt;&lt;FONT color="#008000"&gt;// Get our Item Numbering Schema ("Mapped") ID.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;long&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; itemNumberingSchemeID = GetItemNumberingSchemeID(&lt;FONT color="#a31515"&gt;&lt;FONT color="#a31515"&gt;&lt;FONT color="#a31515"&gt;"Mapped"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" color="#008000"&gt;&lt;FONT color="#008000"&gt;&lt;FONT color="#008000"&gt;// Create a new Item with that Category ID.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;newItem = m_ItemSvc.AddItemRevision(GetCatID(&lt;FONT color="#a31515"&gt;&lt;FONT color="#a31515"&gt;&lt;FONT color="#a31515"&gt;"Mechanical Detail"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;));&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" color="#008000"&gt;&lt;FONT color="#008000"&gt;&lt;FONT color="#008000"&gt;// Create an array with the desired item number.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;string&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;[] newItemNum = &lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;new&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;string&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;[] { itemNumber };&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#008000"&gt;&lt;FONT color="#008000"&gt;&lt;FONT color="#008000"&gt;// Create an array of StringArrays with 1 element.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;StringArray&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;[] fieldInputs = &lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;new &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;StringArray&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;[1];&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" color="#008000"&gt;&lt;FONT color="#008000"&gt;&lt;FONT color="#008000"&gt;// Create a single StringArray.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;StringArray&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; tempArr = &lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;new&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;StringArray&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;();&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;tempArr.Items = newItemNum;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;fieldInputs[0] = tempArr;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" color="#008000"&gt;&lt;FONT color="#008000"&gt;&lt;FONT color="#008000"&gt;// Change Item Number.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;ItemNum&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;[] newNums = m_ItemSvc.AddItemNumbers(&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;new&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;long&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;[] { newItem.MasterId }, &lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;new&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;long&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;[] { itemNumberingSchemeID }, fieldInputs);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" color="#008000"&gt;&lt;FONT color="#008000"&gt;&lt;FONT color="#008000"&gt;// Set Item values.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;newItem.ItemNum = itemNumber;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;newItem.Detail = GetExcelData(&lt;FONT color="#a31515"&gt;&lt;FONT color="#a31515"&gt;&lt;FONT color="#a31515"&gt;"Description"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;newItem.Title = &lt;FONT color="#a31515"&gt;&lt;FONT color="#a31515"&gt;&lt;FONT color="#a31515"&gt;""&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#008000"&gt;&lt;FONT color="#008000"&gt;&lt;FONT color="#008000"&gt;// Set Item UDP values.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;newItem.BasicMaterial = &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;newItem.Size = &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;newItem.Vendor = &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Oct 2012 20:27:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/populating-item-udps/m-p/3643626#M11666</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-10-02T20:27:19Z</dc:date>
    </item>
    <item>
      <title>Re: Populating Item UDPs</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/populating-item-udps/m-p/3644344#M11667</link>
      <description>&lt;P&gt;UpdateItemProperties is the function you want.&amp;nbsp; However, there are some things you need to know about working with items.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Editing an item usually follows the pattern of:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Put the item in an editable state, which is essentially "checking out the item"&lt;/LI&gt;
&lt;LI&gt;Make changes, such as setting UDP values.&lt;/LI&gt;
&lt;LI&gt;Commit the changes, which is like a "check-in"&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;For more information, see the "Editing Items" knowledge base article in the SDK documentation. &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Oct 2012 11:48:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/populating-item-udps/m-p/3644344#M11667</guid>
      <dc:creator>Redmond.D</dc:creator>
      <dc:date>2012-10-03T11:48:01Z</dc:date>
    </item>
    <item>
      <title>Re: Populating Item UDPs</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/populating-item-udps/m-p/3645020#M11668</link>
      <description>&lt;P&gt;Ok, now I have:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#008000"&gt;&lt;FONT color="#008000"&gt;&lt;FONT color="#008000"&gt;// =====================================================================&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#008000"&gt;&lt;FONT color="#008000"&gt;&lt;FONT color="#008000"&gt;// Get our Item Numbering Schema ("Mapped") ID.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;long&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; itemNumberingSchemeID = &lt;/FONT&gt;&lt;/FONT&gt;GetItemNumberingSchemeID(&lt;FONT color="#a31515"&gt;&lt;FONT color="#a31515"&gt;&lt;FONT color="#a31515"&gt;"Mapped"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000" face="courier new,courier"&gt;&lt;FONT color="#008000"&gt;&lt;FONT color="#008000"&gt;// Create a new Item with that Category ID (Use "Mechanical Detail" for everything for now).&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;newItem = m_ItemSvc.AddItemRevision(GetCatID(&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#a31515"&gt;&lt;FONT color="#a31515"&gt;&lt;FONT color="#a31515"&gt;"Mechanical Detail"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;));&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#008000"&gt;&lt;FONT color="#008000"&gt;&lt;FONT color="#008000"&gt;// Set Item values&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;newItem.ItemNum = itemNumber;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;newItem.Detail = GetExcelData(&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#a31515"&gt;&lt;FONT color="#a31515"&gt;&lt;FONT color="#a31515"&gt;"Description"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;newItem.Title = &lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#a31515"&gt;&lt;FONT color="#a31515"&gt;&lt;FONT color="#a31515"&gt;""&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;string&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; excelUnits = GetExcelData(&lt;FONT color="#a31515"&gt;&lt;FONT color="#a31515"&gt;&lt;FONT color="#a31515"&gt;"Base Unit of Measure"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;if&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; (excelUnits != &lt;FONT color="#a31515"&gt;&lt;FONT color="#a31515"&gt;&lt;FONT color="#a31515"&gt;""&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;{&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp; newItem.Units = UnitsMappingDictionary[excelUnits];&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;}&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="courier new,courier"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;else&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;{&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp; newItem.Units = &lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#a31515"&gt;&lt;FONT color="#a31515"&gt;&lt;FONT color="#a31515"&gt;""&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;}&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;List&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&amp;lt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;string&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&amp;gt; UDPList = &lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;new &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;List&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&amp;lt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;string&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&amp;gt;();&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;UDPList.Add(&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#a31515"&gt;&lt;FONT color="#a31515"&gt;&lt;FONT color="#a31515"&gt;"Base Unit of Measure"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;UDPList.Add(&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#a31515"&gt;&lt;FONT color="#a31515"&gt;&lt;FONT color="#a31515"&gt;"Basic Material"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;UDPList.Add(&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#a31515"&gt;&lt;FONT color="#a31515"&gt;&lt;FONT color="#a31515"&gt;"Part Number"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;UDPList.Add(&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#a31515"&gt;&lt;FONT color="#a31515"&gt;&lt;FONT color="#a31515"&gt;"Vendor"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;UDPList.Add(&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#a31515"&gt;&lt;FONT color="#a31515"&gt;&lt;FONT color="#a31515"&gt;"Size/Dimension"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#008000"&gt;&lt;FONT color="#008000"&gt;&lt;FONT color="#008000"&gt;//UDPList.Add("Dimension");&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;int &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;UDPListLength = UDPList.Count();&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;long&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;[] propDefIdArray = &lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;new &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;long&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;[UDPListLength];&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;string&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;[] propValueArray = &lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;new &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;string&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;[UDPListLength];&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#008000"&gt;&lt;FONT color="#008000"&gt;&lt;FONT color="#008000"&gt;// get the map between the property name and all Vault objects.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;Dictionary&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&amp;lt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;string&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;, &lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;PropDef&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&amp;gt; propDefMap = GetPropDefMap(mgr);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#008000"&gt;&lt;FONT color="#008000"&gt;&lt;FONT color="#008000"&gt;// Get all property values for the Item.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;PropInst&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;[] itemProperties = propSvc.GetPropertiesByEntityIds(&lt;FONT color="#a31515"&gt;&lt;FONT color="#a31515"&gt;&lt;FONT color="#a31515"&gt;"ITEM"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;, &lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;new&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;long&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;[] { newItem.Id });&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;string&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; excelCellData = &lt;FONT color="#a31515"&gt;&lt;FONT color="#a31515"&gt;&lt;FONT color="#a31515"&gt;""&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;int&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;index = 0;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#008000"&gt;&lt;FONT color="#008000"&gt;&lt;FONT color="#008000"&gt;// Put UDP values and propDefIds into arrays.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;foreach&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; (&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;string&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; item &lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;in &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;UDPList)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;{&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp; excelCellData = GetExcelData(item);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#008000"&gt;&lt;FONT color="#008000"&gt;&lt;FONT color="#008000"&gt;&amp;nbsp;&amp;nbsp; // Get the property definition from the property name.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;&amp;nbsp;&amp;nbsp; PropDef &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;propDef;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&amp;nbsp;&amp;nbsp; if&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; (!propDefMap.TryGetValue(item, &lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;out&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; propDef) || excelCellData == &lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;null&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp; {&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; continue&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;; &lt;FONT color="#008000"&gt;&lt;FONT color="#008000"&gt;&lt;FONT color="#008000"&gt;// tag value doesn't match any Vault properties, or cell was empty.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp; }&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="courier new,courier"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&amp;nbsp;&amp;nbsp; try&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp; {&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000" face="courier new,courier"&gt;&lt;FONT color="#008000"&gt;&lt;FONT color="#008000"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Add to the list of UDPs and values to set.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; propDefIdArray[index] = propDef.Id;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; propValueArray[index] = excelCellData;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; index++;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp; }&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&amp;nbsp;&amp;nbsp; catch&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; (&lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;Exception &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;ex)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp; {&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MessageBox&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;.Show(&lt;FONT color="#a31515"&gt;&lt;FONT color="#a31515"&gt;&lt;FONT color="#a31515"&gt;"Error with property "&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; + item + &lt;FONT color="#a31515"&gt;&lt;FONT color="#a31515"&gt;&lt;FONT color="#a31515"&gt;":\n"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;+ ex.Message);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp; }&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;}&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;if&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;(index &amp;gt; 0)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;{&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000" face="courier new,courier"&gt;&lt;FONT color="#008000"&gt;&lt;FONT color="#008000"&gt;&amp;nbsp;&amp;nbsp; // We have the arrays all set; now do the actual save.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp; m_ItemSvc.UpdateItemProperties(&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt; new &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;long&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;[] { newItem.RevId }, propDefIdArray, propValueArray );&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000" face="courier new,courier"&gt;&lt;FONT color="#008000"&gt;&lt;FONT color="#008000"&gt;&amp;nbsp;&amp;nbsp; // Commit Changes&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp; m_ItemSvc.UpdateAndCommitItems(&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;new &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;Item&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;[] { newItem });&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;}&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#008000"&gt;&lt;FONT color="#008000"&gt;&lt;FONT color="#008000"&gt;// =====================================================================&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000" face="arial,helvetica,sans-serif"&gt;All seems good except that I get a SOAP error on the last command.&amp;nbsp; Is that command (UpdateAndCommitItems) necessary?&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Oct 2012 17:14:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/populating-item-udps/m-p/3645020#M11668</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-10-03T17:14:53Z</dc:date>
    </item>
    <item>
      <title>Re: Populating Item UDPs</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/populating-item-udps/m-p/3646148#M11669</link>
      <description>&lt;P&gt;Yes, you need to call UpdateAndCommitItems.&lt;/P&gt;
&lt;P&gt;When the function fails, what is the error code?&lt;/P&gt;</description>
      <pubDate>Thu, 04 Oct 2012 11:41:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/populating-item-udps/m-p/3646148#M11669</guid>
      <dc:creator>Redmond.D</dc:creator>
      <dc:date>2012-10-04T11:41:17Z</dc:date>
    </item>
    <item>
      <title>Re: Populating Item UDPs</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/populating-item-udps/m-p/3646206#M11670</link>
      <description>&lt;P&gt;Error code 1387.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Oct 2012 12:09:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/populating-item-udps/m-p/3646206#M11670</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-10-04T12:09:44Z</dc:date>
    </item>
    <item>
      <title>Re: Populating Item UDPs</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/populating-item-udps/m-p/3646262#M11671</link>
      <description>&lt;P&gt;I see that the resriction code is 2037, ItemNotEditable.&amp;nbsp; I thought that when a new Item was created, it was in an Editable state, but I guess not.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Oct 2012 12:45:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/populating-item-udps/m-p/3646262#M11671</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-10-04T12:45:30Z</dc:date>
    </item>
    <item>
      <title>Re: Populating Item UDPs</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/populating-item-udps/m-p/3646328#M11672</link>
      <description>&lt;P&gt;I checked some other ADN cases.&amp;nbsp; It turns out that UpdateItemProperties does a commit of the item.&amp;nbsp; So I was wrong earlier; you don't need to call UpdateAndCommitItems.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The UpdateItemProperties should mention the commit operation, but it doesn't.&amp;nbsp; A defect has already been logged.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Oct 2012 13:07:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/populating-item-udps/m-p/3646328#M11672</guid>
      <dc:creator>Redmond.D</dc:creator>
      <dc:date>2012-10-04T13:07:38Z</dc:date>
    </item>
    <item>
      <title>Re: Populating Item UDPs</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/populating-item-udps/m-p/3646332#M11673</link>
      <description>&lt;P&gt;Super.&amp;nbsp; Thanks for the help Doug.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Oct 2012 13:11:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/populating-item-udps/m-p/3646332#M11673</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-10-04T13:11:04Z</dc:date>
    </item>
    <item>
      <title>Re: Populating Item UDPs</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/populating-item-udps/m-p/3647236#M11674</link>
      <description>&lt;P&gt;Here is the final version:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#008000"&gt;&lt;FONT color="#008000"&gt;&lt;FONT color="#008000"&gt;// Get our Item Numbering Schema ID.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;long&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; itemNumberingSchemeID = GetItemNumberingSchemeID(&lt;FONT color="#a31515"&gt;&lt;FONT color="#a31515"&gt;&lt;FONT color="#a31515"&gt;"Mapped"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000" face="courier new,courier"&gt;&lt;FONT color="#008000"&gt;&lt;FONT color="#008000"&gt;// Create a new Item with that Category ID (Use "Mechanical Detail" for everything for now).&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;newItem = m_ItemSvc.AddItemRevision(GetCatID(&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#a31515"&gt;&lt;FONT color="#a31515"&gt;&lt;FONT color="#a31515"&gt;"Mechanical Detail"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;));&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#008000"&gt;&lt;FONT color="#008000"&gt;&lt;FONT color="#008000"&gt;// Create the parameter for creating a new Item Number.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;string&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;[] newItemNum = &lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;new &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;string&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;[] { itemNumber };&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#008000"&gt;&lt;FONT color="#008000"&gt;&lt;FONT color="#008000"&gt;// Create a new ItemNum object; we have to tell Vault to expect the new number.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;ItemNum &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;newNum = m_ItemSvc.AddItemNumber(newItem.MasterId, itemNumberingSchemeID, newItemNum);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000" face="courier new,courier"&gt;&lt;FONT color="#008000"&gt;&lt;FONT color="#008000"&gt;// Set Item values&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;newItem.ItemNum = newNum.ItemNum1; &lt;/FONT&gt;&lt;FONT color="#008000" face="courier new,courier"&gt;&lt;FONT color="#008000"&gt;&lt;FONT color="#008000"&gt;// Vault knows about the new number now.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;newItem.Detail = GetExcelData(&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#a31515"&gt;&lt;FONT color="#a31515"&gt;&lt;FONT color="#a31515"&gt;"Description"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;newItem.Title = itemNumber;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000" face="courier new,courier"&gt;&lt;FONT color="#008000"&gt;&lt;FONT color="#008000"&gt;// Commit the item, which finalizes the object.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;m_ItemSvc.UpdateAndCommitItems(&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;new &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;Item&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;[] { newItem });&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000" face="courier new,courier"&gt;&lt;FONT color="#008000"&gt;&lt;FONT color="#008000"&gt;// Read the Item back in to update the UDPs.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;savedItem = m_ItemSvc.GetLatestItemByItemNumber(itemNumber);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;editableItem = m_ItemSvc.EditItem(savedItem.RevId);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#008000"&gt;&lt;FONT color="#008000"&gt;&lt;FONT color="#008000"&gt;// Get the User Defined Properties.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;List&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&amp;lt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;string&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&amp;gt; UDPList = FillUDPList();&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;int &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;UDPListLength = UDPList.Count();&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;long&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;[] propDefIdArray = &lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;new &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;long&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;[UDPListLength];&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;string&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;[] propValueArray = &lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;new &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;string&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;[UDPListLength];&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#008000"&gt;&lt;FONT color="#008000"&gt;&lt;FONT color="#008000"&gt;// get the map between the property name and all Vault objects.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;Dictionary&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&amp;lt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;string&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;, &lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;PropDef&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&amp;gt; propDefMap = GetPropDefMap(mgr);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;string&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; excelCellData = &lt;FONT color="#a31515"&gt;&lt;FONT color="#a31515"&gt;&lt;FONT color="#a31515"&gt;""&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;int &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;index = 0;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#008000"&gt;&lt;FONT color="#008000"&gt;&lt;FONT color="#008000"&gt;// Put UDP values and propDefIds into arrays.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;foreach&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; (&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;string&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; item &lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;in &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;UDPList)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;{&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp; excelCellData = GetExcelData(item);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#008000"&gt;&lt;FONT color="#008000"&gt;&lt;FONT color="#008000"&gt;&amp;nbsp;&amp;nbsp; // Get the property definition from the property name.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;&amp;nbsp;&amp;nbsp; PropDef &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;propDef;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&amp;nbsp;&amp;nbsp; if&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; (!propDefMap.TryGetValue(item, &lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;out&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; propDef) || &lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;String&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;.IsNullOrEmpty(excelCellData))&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp; {&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; continue&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;; &lt;FONT color="#008000"&gt;&lt;FONT color="#008000"&gt;&lt;FONT color="#008000"&gt;// tag value doesn't match any Vault properties, or cell was empty.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp; }&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="courier new,courier"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&amp;nbsp;&amp;nbsp; try&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp; {&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000" face="courier new,courier"&gt;&lt;FONT color="#008000"&gt;&lt;FONT color="#008000"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Add to the list of UDPs and values to set.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; propDefIdArray[index] = propDef.Id;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; propValueArray[index] = excelCellData;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; index++;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp; }&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&amp;nbsp;&amp;nbsp; catch&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; (&lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;Exception&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;ex)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp; {&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MessageBox&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;.Show(&lt;FONT color="#a31515"&gt;&lt;FONT color="#a31515"&gt;&lt;FONT color="#a31515"&gt;"Error with property "&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; + item + &lt;FONT color="#a31515"&gt;&lt;FONT color="#a31515"&gt;&lt;FONT color="#a31515"&gt;":\n"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;+ ex.Message);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp; }&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;}&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#008000"&gt;&lt;FONT color="#008000"&gt;&lt;FONT color="#008000"&gt;// Redimension the arrays; it will exception if the arrays are not full.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;Array&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;.&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;Resize(&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;ref&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;propDefIdArray, index);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;Array&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;.Resize(&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;ref&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;propValueArray, index);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;if&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;(index &amp;gt; 0)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;{&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000" face="courier new,courier"&gt;&lt;FONT color="#008000"&gt;&lt;FONT color="#008000"&gt;&amp;nbsp;&amp;nbsp; // We have the arrays all set; now do the actual save.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp; m_ItemSvc.UpdateItemProperties(&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;new &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;long&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;[] { editableItem.RevId }, propDefIdArray, propValueArray);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;}&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Oct 2012 20:31:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/populating-item-udps/m-p/3647236#M11674</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-10-04T20:31:24Z</dc:date>
    </item>
  </channel>
</rss>

