internal static Inventor.AssemblyDocument CreateTempAssembly (Inventor.AssemblyDocument oDoc)
{
Inventor.Application oApp = (Inventor.Application) oDoc.ComponentDefinition.Application;
oApp.SilentOperation = true;
oDoc.SaveAs(@"D:\temp.iam", true);
Inventor.AssemblyDocument oDocNew = (Inventor.AssemblyDocument) oApp.Documents.Open(@"D:\temp.iam");
oDoc.Close();
oApp.SilentOperation = false;
return oDocNew;
}