Using AutoCAD 2009 or 2010, is there any way to Publish without the Layout name (or -Model, for that matter) being added to the PDF file name?
|
|
|
Using AutoCAD 2009 or 2010, is there any way to Publish without the Layout name (or -Model, for that matter) being added to the PDF file name?
It's a function of the driver used. Which one are you using?
R.K. McSwain | CAD Panacea |
I use whatever driver "DWG to PDF" is.
As long as there's been the Publish command, regardless of AutoCAD or Adobe version, it's always done it this way. "Filename-Layoutname.PDF", "Filename-Model.PDF".
That is the driver that comes with AutoCAD.
It has to include the layout name, otherwise each subsequent plot would overwrite the last one since only the drawing name would be used.
If you use SSM and publish from there, then the PDF files are created using the names assigned in SSM.
R.K. McSwain | CAD Panacea |
I use the DOS rename command to get rid of the -Layout1 in the file name, however because of the difference in the length you will have to use a ? for each unique character versus an *.
rename C????-Layout1.pdf C????.pdf
will rename all the files in the directory
you might want to create a test or practice directory when you try it.
if you file names are not similar, use DOS dir > filename.txt to create a file that you can bring into excel and use concatonate to create a bat command.
1. Put this below coding in a notepad file and save the file as " cad.vbs "
2. Place all your PDF files which includes "Layout1" in filename to the same folder
3. Rename the folder path to match this location on 2nd line of script.
4. save the file and just double click the bat file to execute.
5. You can see all your "Layout1" name is vanished from the file name
-------------------------------------------------------------------
Set objFso = CreateObject("Scripting.FileSystemObject")
Set Folder = objFSO.GetFolder("C:\Users\Girish\Desktop\CAD")
For Each File In Folder.Files
sNewFile = File.Name
sNewFile = Replace(sNewFile,"Layout1" , "")
if (sNewFile<>File.Name) then
File.Move(File.ParentFolder+"\"+sNewFile)
end if
Next
-------------------------------------------------------------------