Message 1 of 2
Changing pdf filename before it is created

Not applicable
03-06-2008
07:08 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have convinced myself that there's no way to do this but if someone can tell me I'm wrong that would be excellent!
I plot PDF's with Autodesk's built in PDF Driver. Here's my code
Sub plotpdf()
' This example sends a plot of the current drawing
' to a file.
' Define the plot variable
If ThisDrawing.ActiveLayout.Name = "Model" Then
PrintPoints
Exit Sub
End If
ThisDrawing.ActiveLayout.StandardScale = ac1_1
ThisDrawing.ActiveLayout.RefreshPlotDeviceInfo
ThisDrawing.ActiveLayout.StyleSheet = "KIP 7000.ctb" 'Plot Style Table
ThisDrawing.ActiveLayout.ConfigName = "DWG TO PDF.PC3" 'Printer
ThisDrawing.ActiveLayout.RefreshPlotDeviceInfo
ThisDrawing.ActiveLayout.CanonicalMediaName = "ANSI_expand_D_(34.00_x_22.00_Inches)" 'Paper Size
ThisDrawing.ActiveLayout.RefreshPlotDeviceInfo
ThisDrawing.Plot.PlotToDevice
End Sub
Is there a way to specify the file name when I'm doing it this way? It of course defaults to filename + layout tab. I can do it the dirty way and that's renaming it after it is saved, but maybe I'm missing a property?
Thanks,
Viktor.
I plot PDF's with Autodesk's built in PDF Driver. Here's my code
Sub plotpdf()
' This example sends a plot of the current drawing
' to a file.
' Define the plot variable
If ThisDrawing.ActiveLayout.Name = "Model" Then
PrintPoints
Exit Sub
End If
ThisDrawing.ActiveLayout.StandardScale = ac1_1
ThisDrawing.ActiveLayout.RefreshPlotDeviceInfo
ThisDrawing.ActiveLayout.StyleSheet = "KIP 7000.ctb" 'Plot Style Table
ThisDrawing.ActiveLayout.ConfigName = "DWG TO PDF.PC3" 'Printer
ThisDrawing.ActiveLayout.RefreshPlotDeviceInfo
ThisDrawing.ActiveLayout.CanonicalMediaName = "ANSI_expand_D_(34.00_x_22.00_Inches)" 'Paper Size
ThisDrawing.ActiveLayout.RefreshPlotDeviceInfo
ThisDrawing.Plot.PlotToDevice
End Sub
Is there a way to specify the file name when I'm doing it this way? It of course defaults to filename + layout tab. I can do it the dirty way and that's renaming it after it is saved, but maybe I'm missing a property?
Thanks,
Viktor.