コード例 #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));
        }
コード例 #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);
            }
        }
コード例 #3
0
 private InvAssemblyDocument(InvAssemblyDocument invAssemblyDocument)
 {
     InternalAssemblyDocument = invAssemblyDocument.InternalAssemblyDocument;
 }
コード例 #4
0
 public static InvAssemblyDocument ByInvAssemblyDocument(InvAssemblyDocument invAssemblyDocument)
 {
     return new InvAssemblyDocument(invAssemblyDocument);
 }
コード例 #5
0
 private InvAssemblyDocument(InvAssemblyDocument invAssemblyDocument)
 {
     InternalAssemblyDocument = invAssemblyDocument.InternalAssemblyDocument;
 }
コード例 #6
0
 public static InvAssemblyDocument ByInvAssemblyDocument(InvAssemblyDocument invAssemblyDocument)
 {
     return(new InvAssemblyDocument(invAssemblyDocument));
 }