Vault Customization

Reply
Contributor
ewcv
Posts: 22
Registered: ‎02-01-2012
Message 1 of 2 (186 Views)
Accepted Solution

UpdateItemsFromFiles

186 Views, 1 Replies
06-04-2012 04:09 AM

Hi,

it seems, that m_ServiceManager.ItemService.UpdateItemsFromFiles(new long[] { editItem.RevId } );

doesn't work with a .dwf file.

the result is an exception (error code 0)

the log file is attached.

there is no exception with an underlying .ipt-file for example.

Erika

Employee
Daniel.Dulzo
Posts: 61
Registered: ‎05-25-2011
Message 2 of 2 (156 Views)

Re: UpdateItemsFromFiles

06-15-2012 12:45 PM in reply to: ewcv

Hello Erika,

 

As a potential workaround to this issue, I would suggest using the ItemService.PromptComponents() method instead. The code below should have the same effect as a call to ItemService.UpdateItemFromFiles():

 

wsManager.ItemService.AddPromoteComponents(new long[] { dwfFile.Id });

DateTime time;

long[] promoteComponents = wsManager.ItemService.GetPromoteComponentOrder(out time);

wsManager.ItemService.PromoteComponents(time, promoteComponents);

ItemsAndFiles dwfItemsAndFiles = wsManager.ItemService.GetPromoteComponentsResults(time);



Daniel Dulzo
Software Engineer
Autodesk, Inc.
Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.