Author Topic: DWG to PDF.pc3  (Read 4320 times)

0 Members and 1 Guest are viewing this topic.

MVIALL

  • Guest
DWG to PDF.pc3
« on: August 07, 2012, 01:21:07 PM »
Is there a routine to get this driver to prompt for input of a filename and choose where to save?  I've created layout tabs to implement batch plotting and when I use the Adobe.pc3 driver I can only plot on whatever machine made the sheet sets and when I use the DWG to PDF.pc3 driver it works on every machine, just doesn't allow me to name each file as it goes through or choose where I want to save it.  I would prefer to name the files as they print instead of opening windows explorer afterwards and individually renaming.  Any help would be greatly appreciated.

Crank

  • Water Moccasin
  • Posts: 1503
Re: DWG to PDF.pc3
« Reply #1 on: August 07, 2012, 02:29:51 PM »
Try the EXPORTPDF command.

If that doesn't work for you (and you're using lisp), you can create a interface for the location/filename and move/rename the file to that location inmedially after it's created.
Vault Professional 2023     +     AEC Collection

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Re: DWG to PDF.pc3
« Reply #2 on: August 07, 2012, 03:22:01 PM »
hmmm ... how about a plot to file script that supplies the filename?
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

irneb

  • Water Moccasin
  • Posts: 1794
  • ACad R9-2016, Revit Arch 6-2016
Re: DWG to PDF.pc3
« Reply #3 on: August 08, 2012, 02:53:43 AM »
There are quite a few of these threads. Most use the PDF2DWG driver (even the ExportPDF command uses this driver). Scripting might be the answer as you can customize file-naming through lisp inside the script: which means you can program the filename and never need to manually enter / rename at all.

I'm not too sure why the DWG2PDF isn't asking you the filename. Are you running it through a script or through lisp? If so it might be that the dialog doesn't open, but it asks for the filename on the command-line. To force the dialog, you might look into the FileDia system variable, or more likely the initdia lisp function. Just be careful if you do this inside a script file - waiting for user input might cause the script to time-out.

If you mean the Publish command doesn't ask you for the filename when printing to PDF, then there's unfortunately no fix (it only asks when set to multi-page documents, which is a bit silly). Renaming afterwards is the only way (see end of this post to make this step much easier). For me the Publish is still not perfect, it needs to have a filename template edit box so you can specify how the filename is supposed to look - and preferably this needs to include lisp calls so the filename could even be calculated from something like attribute values of the title block (e.g. Revision suffix). It needs to be at least similar to field-codes - as a bare minimum.

As for the Adobe.pc3 only working on one machine: You need to check that the PC3 points to the correct windows "printer". If it's named something different on another PC (which is very possible) the PC3 points to a non-existent driver (even though it may exist as a different name). Also I think Adobe is not free (unlike their Reader) so you need a license for each PC - main reason I go with free PDF printers (my favorite is PDFCreator - works similar to Adobe but IMO has more functionality, especially since you can control it through lisp with its ActiveX/COM object).

Renaming
I'm totally with you about the windows explorer. It's just plain silly trying to rename one file at a time - makes for huge possibility of errors. I tend to use batch file renamers, the 2 I love are:
  • File Renamer (Basic) - Allows for extremely powerful renaming features, stuff like removing parts from the name, replacing using wildcards / even regular expressions.
  • XNView - This is actually an image library viewer & editor. It has a function to Batch-Rename selected files, though not as powerful as FR's - but enough to get around.
Common sense - the curse in disguise. Because if you have it, you have to live with those that don't.

Krushert

  • Seagull
  • Posts: 13679
  • FREE BEER Tomorrow!!
Re: DWG to PDF.pc3
« Reply #4 on: August 08, 2012, 07:16:07 PM »
The way I have acheive the naming is part is to use either Layout tab name (ctab variable) or playing with the drawing file name.  It depends on your standards.  At my old employer we named our layout tab(s) with mulitple tabs per file and here at my new employer one sheet per file an the file name is the drawing number.

As for the chosing where to save I realy don't give the user a choice.  I wrote the lisp to place the file in a particulare folder and if they want in a different spot, they can move all the files at once.

Note that the user steps through each tab or file.  I want the user to take one last glance at the file to make sure everything is hunkie dorie before typing "PDF" at the comand file.  The lisp does everything else.  The publish command is great once you are sure that there are no wierd things on your plots. 
I + XI = X is true ...  ... if you change your perspective.

I no longer CAD or Model, I just hang out here picking up the empties beer cans

dgpuertas

  • Newt
  • Posts: 81
Re: DWG to PDF.pc3
« Reply #5 on: August 09, 2012, 04:02:13 AM »
To put name of the pdf file before print I use this code:


(defun put_name_pdf (path name)
(vl-registry-write "HKEY_CURRENT_USER\\SOFTWARE\\ADOBE\\Acrobat Distiller\\PrinterJobControl"
  (strcat (vla-get-path (vlax-get-acad-object)) "\\acad.exe")
  (strcat path "\\" name".pdf")
))

I use Adobe Acrobat to generate pdf and I can put any name.

Sorry about my english.

andrew_nao

  • Guest
Re: DWG to PDF.pc3
« Reply #6 on: August 13, 2012, 02:05:22 PM »
(defun printpdf (/ fileloc filenam)
(setq fileloc (strcat (getvar "dwgprefix")

(vl-filename-base (getvar "dwgname"))))
(setq filenam (vl-filename-base (getvar "dwgname")))

(command "-plot""y" "" "DWG To PDF.pc3" "ANSI expand A (8.50 x 11.00 Inches)" "I" "P" "N" "E" "F" "" "Y" "nao.ctb" "Y" ""  fileloc "n" "y")
)