System.ArgumentException: 'An item with the Id [ID_New] already exists in the collection!' in Assembly document
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
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
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);
}