Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
abdechafi.neji
240 Views, 2 Replies

System.ArgumentException: 'An item with the Id [ID_New] already exists in the collection!' in Assembly document

Hello , I'm trying to create an assembly document in inventor , but I'm getting always the same exception . How can I solve this problem?

 

System.ArgumentException: 'An item with the Id [ID_New] already exists in the collection!' in Assembly document

 

abdechafineji_0-1672736012497.png

 

 

 

 

AssemblyDocument ActiveDoc = (AssemblyDocument)oApp.ActiveDocument;
try
{

AssemblyDocument oDoc = (AssemblyDocument)InventorApp.Documents.Add(DocumentTypeEnum.kAssemblyDocumentObject, oApp.FileManager.GetTemplateFile(DocumentTypeEnum.kAssemblyDocumentObject), true); // exception here

}
catch (Exception e)
{
MessageBox.Show(e.Message);
}

 

 

 

Tags (1)
Labels (2)