jsnosal - Thursday, March 20, 2014 2:37 PM:
Has anyone in countered the "Not a single item" error? Reading through the forums one member renamed the ItemType and another had bad code inside of a Life Cycle method. Both the Life Cycle method and the item type name have not changed. The user is trying to run a DCO against two CAD documents. The actions are set to change and the interchangeable check box is checked. I haven't encountered this error before. The CAD doc is connected to a BoM that is currently released, is that the issue?
Update:
We have done some testing and we found that when two CAD documents that are assigned to different parts are inside the Affected Parts tab, the user is getting an error saying Not a Single Item error. When the user puts just one of the CAD documents on the DCO, it will work as expected. Any ideas why this issue is happening?
Thank you for your help its greatly appreciated.
gks - Wednesday, March 26, 2014 12:57 AM:
It usually is method. This methode could be lifecycle or DCO related. It could also be CAD or even Part related. The Problem is, that this in methods is a single item, ie one CAD if you update a CAD. Because most of the actions you invoke in aras are invoked at a single item. Some actions are invoked on multiple items by the user. Then you can have two different behaviours: Sometimes aras invokes the action an each item, resulting in the default case. Sometimes aras invokes the action on all items at once resulting in an item with multiple items inside (GetItemCount is >1). This usually happens if there is a contextual link between the items. Methods like .GetProperty only work single items and raise this exception. To avoid this you can use a for loop with getItemCount and getItemByIndex to iterate over all items in this or any other item where this is neccessary. You can find the method raising this exception with the standard debuging tools provided by aras innovator.