예제 #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);
            }
        }
 private InvAssemblyDocument(InvAssemblyDocument invAssemblyDocument)
 {
     InternalAssemblyDocument = invAssemblyDocument.InternalAssemblyDocument;
 }
 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));
 }