
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have the following iLogic code in a drawing, and three other rules just like it that save the Engineering, Installation Template, and QC sheets in the drawing under their respective names.
' Activates the marketing sheet and saves it as a PDF under the name
' "partnumber REV# Marketing" and displays a confirmation
ActiveSheet = ThisDrawing.Sheet("Marketing") pdfFile = CStr(ThisDoc.FileName(False)) & " REV" & _ CStr(iProperties.Value("Project", "Revision Number")) & " Marketing.pdf" ThisDoc.Document.SaveAs(pdfFile, True) MessageBox.Show("Marketing PDF saved", "All clear")
My problem is that there are three sheets to the Engineering portion of the file, and just a single sheet to the others. So, if the user has their PDF options set to "current sheet," the code works fine for the Marketing, Installation, and QC sheets, but only saves a single sheet of Engineering. You can change the options to "all sheets" to get the three Engineering sheets into one PDF file, but then you can't save the single sheets for the others unless you go back into PDF options and change the preferences, which basically defeats the purpose of having the code in the first place.
I was wondering if there is any sort of code I can add that checks what the PDF options are set to, and also changes them to match the sheet that is selected ("current sheet" for Marketing, Installation, and QC and "all sheets" for Engineering).
Solved! Go to Solution.