Message 1 sur 2
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Lien permanent
- Imprimer
- Signaler
Bonjour,
Est-ce que possible de faire imprimer plusieurs pdf dans une seul pdf.
Cest une code quelle je utilise pour umprimer les pdf:
'------start of iLogic------- If ThisDoc.FileName IsNot "" Then oPath = ThisDoc.Path oFileName =ThisDoc.FileName(False) 'without extension oRevNum = iProperties.Value("Project", "Revision Number") oProject = iProperties.Value("Project", "Project") oPDFAddIn = ThisApplication.ApplicationAddIns.ItemById ("{0AC6FD96-2F4D-42CE-8BE0-8AEA580399E4}") 'oDocument = ThisApplication.ActiveDocument oContext = ThisApplication.TransientObjects.CreateTranslationContext oContext.Type = IOMechanismEnum.kFileBrowseIOMechanism oOptions = ThisApplication.TransientObjects.CreateNameValueMap oDataMedium = ThisApplication.TransientObjects.CreateDataMedium Dim oDoc As DrawingDocument = ThisApplication.ActiveDocument Dim oSheet As Sheet = oDoc.ActiveSheet Dim oSymbol As SketchedSymbol Dim oSymbols As SketchedSymbols 'Define the drawing Dim oDrawing As DrawingDocument oDrawing = ThisDoc.Document ' Dim oSheet As Sheet ' oSheet = oDrawing.ActiveSheet Dim lPos As Long Dim rPos As Long Dim sLen As Long Dim sSheetName As String Dim iSheetNumber As Integer ''find the seperator in the sheet name:number lPos = InStr(oSheet.Name, ":") ''find the number of characters in the sheet name sLen = Len(oSheet.Name) ''find the sheet name sSheetName = Left(oSheet.Name, lPos - 1) '-------Options----- oOptions.Value("All_Color_AS_Black") = 0 oOptions.Value("Remove_Line_Weights") = 1 oOptions.Value("Vector_Resolution") = 400 oOptions.Value("Sheet_Range") = Inventor.PrintRangeEnum.kPrintAllSheets 'oOptions.Value("Sheet_Range") = Inventor.PrintRangeEnum.kPrintCurrentSheet '------get PDF target folder path--------------------------------------- oFolder2 = Left(oPath, InStrRev(oPath, "\")) & "PDF" ' Add an instance of the sketched symbol definition to the sheet. For Each oSymbol In oSheet.SketchedSymbols ' If oSymbol.Name="PE_RÉFERENCE_FR" oFolder = oFolder2 & "\" & "Reference" ElseIf oSymbol.Name = "PE_COMMENTAIRE_FR" Or oSymbol.Name = "PE_PRÉLIMINAIRE_FR" Or oSymbol.Name = "PRÉLIMINAIRE_FR" Or oSymbol.Name = "PREMILINARY_EN" ' oFolder = Left(oPath, InStrRev(oPath, "\")) & "Preliminaire" oFolder = oFolder2 & "\" & "Preliminaire" ElseIf oSymbol.Name="PE_SOUMISSION_FR" Or oSymbol.Name = "TENDER_EN" oFolder = oFolder2 & "\" & "Soumission" ElseIf oSymbol.Name="PE_CONSTRUCTION_FR" Or oSymbol.Name = "CONSTRUCTION_EN" oFolder = oFolder2 & "\" & "Construction" Else oFolder = oFolder2 & "\" & "Preliminaire" End If Next ThisApplication.ActiveView.Fit '________________________________________________________________________________________________________________________ 'Check for the PDF folder and create it if it does not exist If Not System.IO.Directory.Exists(oFolder) Then System.IO.Directory.CreateDirectory(oFolder) End If 'Set the PDF target file name oDataMedium.FileName = oFolder & "\" & oFileName & " - Rev" & oRevNum & ".pdf" If System.IO.File.Exists(oDataMedium.FileName) Then Dim fio As New System.IO.FileInfo(oDataMedium.FileName) If fio.IsReadOnly = False Then MsgBox(fio.FullName & " Read Only") Else 'System.IO.File.Delete(oDataMedium.FileName) End If 'System.IO.File.SetAttributes(oDataMedium.FileName, oAtts) System.IO.File.Delete(oDataMedium.FileName) End If 'Publish document oPDFAddIn.SaveCopyAs(oDoc, oContext, oOptions, oDataMedium) 'OpenFolder Shell("explorer.exe /Select," & oFolder, vbNormalFocus) ThisDoc.Launch(oDataMedium.FileName) Else MessageBox.Show("Save Document", "Save", MessageBoxButtons.OK) End If
Résolu ! Accéder à la solution.