Hi there
Today I decided to migrate all the files of one of my projects, and I realised that Task Scheduler would also save all my files and create PDFs of the .DWGs. I guess it saved PDFs of my DWGs because I have a rule making it do so after save.
I was happy.. that is, until I realised that it did a horrible job at creating the PDF files with missing lines and everything!
The odd thing, now, is that while the Task Scheduler did a horrible job, I can now open a drawing, just save it, and I have a perfect PDF file. It's the same Ilogic rule and everything!
If necessary you can find my PC specs in the bottom of the message, and I'll also paste my PDF rule and a few examples of Task Scheduler vs. opening and saving them manually.
If anyone has a fix for it, it'd be most appreciated! ๐
'------start of iLogic-------
oPath = ThisDoc.Path
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
'Define the drawing
Dim oDrawing As DrawingDocument
oDrawing = ThisDoc.Document
'set PDF Options
If oPDFAddIn.HasSaveCopyAsOptions(oDataMedium, oContext, oOptions) Then
oOptions.Value("All_Color_AS_Black") = 1
oOptions.Value("Remove_Line_Weights") = 1
oOptions.Value("Vector_Resolution") = 600
oOptions.Value("Sheet_Range") = Inventor.PrintRangeEnum.kPrintAllSheets
End If
If oRevNum = ""
'Set the PDF target file name
oDataMedium.FileName = oPath & "\" & oFileName & ".pdf"
Else
'Set the PDF target file name
oDataMedium.FileName = oPath & "\" & oFileName & " Rev" & oRevNum & ".pdf"
End If
'Publish document
oPDFAddIn.SaveCopyAs(oDocument, oContext, oOptions, oDataMedium)
'------end of iLogic-------
Unfortunately due to company policy I cannot give you the full documents. I hope what I have provided is enough!