Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I have some problems to fill item UDPs automatically.
My program imports items to VaultProf 2017 from a csv-file with individual number, title and title2 (UDP).
The import works fine, the items are generated but filling the UDP 'title2' fails.
( I tried the code from this post: https://forums.autodesk.com/t5/vault-customization/2015-r2-updateitemproperties/td-p/5461108 )
Here is my code snippet:
// Create Item
Item item = itemSvc.AddItemRevision(catID);
item.ItemNum = myItemNumberString;
item.Title = lineOfCsv[1].ToString();
itemService.UpdateAndCommitItems(new Item[] { item });
// Update UDP -> numberPropDefinition is the id of UDP 'title2' from PropertyService
itemService.UpdateItemProperties(
new long[] { item.RevId },
new PropInstParamArray[] {
new PropInstParamArray() {
Items=new PropInstParam[] {
new PropInstParam() { PropDefId=numberPropDefinition.Id, Val=lineOfCsv[2].ToString() }
}
}
}
);
The result:
The items are generated with correct Number, Title and Category (first program part)
But after the second program part the item has lost his category and the UDP title2 isn't filled out !??
Any ideas?
Best regards,
Jens
Solved! Go to Solution.
