hier im Forum gibt es auch eine ilogic die das macht.
https://ww3.cad.de/foren/ubb/Forum258/HTML/001389.shtml
Beitrag von Krissi70
den Code habe ich mal ein bißchen angepasst
'
'PDF erstellen - alle Seiten einzeln
'
Dim oSheetName As String
Dim erste_Seite As String
Dim oDoc As DrawingDocument
Dim oSheets As Sheet
oDoc = ThisApplication.ActiveDocument
erste_Seite = ""
oFolder = ThisDoc.PathAndFileName(False)
booleanParam_Farbe = InputRadioBox("Farbe", "SW", "Farbig", True, Title :="Farbauswahl")
oFarbe = 1
If booleanParam_Farbe = "False" Then oFarbe = 0
booleanParam_LS = InputRadioBox("Linienstärke", "ja", "nein", True, Title :="Linienstärke")
oLS = 0
If booleanParam_LS = "False" Then oLS = 1
For Each oSheets In oDoc.Sheets
oSheets.Activate
oSheet = ActiveSheet
oFileName = ThisDoc.FileName(False) 'without extension
oRevNum = iProperties.Value("Project", "Revision Number")
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
oSheetName = Right(oSheet.Name,1) 'Blattnummer
If oSheetName = "1" Then
erste_Seite = oSheet.Name
End If
oOptions.Value("All_Color_AS_Black") = oFarbe
oOptions.Value("Remove_Line_Weights") = oLS
oOptions.Value("Vector_Resolution") = 400
oOptions.Value("Sheet_Range") = Inventor.PrintRangeEnum.kPrintCurrentSheet
Dim WshShell As Object
WshShell = CreateObject("WScript.Shell")
WshShell = Nothing
oDataMedium.FileName = oFolder & "_Blatt-" & oSheetName & ".pdf"
oPDFAddIn.SaveCopyAs(oDocument, oContext, oOptions, oDataMedium)
Next
ActiveSheet = ThisDrawing.Sheet(erste_Seite)
MfG MacFly
------------------
- - - der Erleuchtung ist es egal wie du Sie erlangst - - -
- - - Wir leben alle unter demselben Himmel, aber wir haben nicht alle denselben Horizont - - - (K. Adenauer)
Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP