UpdateItemsFromFiles

UpdateItemsFromFiles

Anonymous
Not applicable
641 Views
1 Reply
Message 1 of 2

UpdateItemsFromFiles

Anonymous
Not applicable

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

0 Likes
Accepted solutions (1)
642 Views
1 Reply
Reply (1)
Message 2 of 2

Daniel.Dulzo
Alumni
Alumni
Accepted solution

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.
0 Likes