Exemplo n.º 1
0
        private InvAssemblyDocument InternalAddAssemblyDocument()
        {
            string assemblyTemplateFile = @"C:\Users\Public\Documents\Autodesk\Inventor 2013\Templates\Standard.iam";

            Inventor.Application      invApp           = (Inventor.Application)InventorServices.Persistence.PersistenceManager.InventorApplication;
            Inventor.AssemblyDocument assemblyDocument = (Inventor.AssemblyDocument)invApp.Documents.Add(DocumentTypeEnum.kAssemblyDocumentObject, assemblyTemplateFile, true);
            return(InvAssemblyDocument.ByInvAssemblyDocument(assemblyDocument));
        }
Exemplo n.º 2
0
        private dynamic InternalAsDocumentType()
        {
            if (DocumentInstance.DocumentType == DocumentTypeEnum.kUnknownDocumentObject)
            {
                return(null);
            }

            else if (DocumentInstance.DocumentType == DocumentTypeEnum.kAssemblyDocumentObject)
            {
                return(InvAssemblyDocument.ByInvAssemblyDocument((Inventor.AssemblyDocument)DocumentInstance));
            }

            else if (DocumentInstance.DocumentType == DocumentTypeEnum.kPartDocumentObject)
            {
                return(InvPartDocument.ByInvPartDocument((Inventor.PartDocument)DocumentInstance));
            }

            else
            {
                return(null);
            }
        }