Author Topic: Dwg to to Pdf.pc3 Plot to a Default directory.  (Read 524 times)

0 Members and 1 Guest are viewing this topic.

craigr

  • Water Moccasin
  • Posts: 1904
Dwg to to Pdf.pc3 Plot to a Default directory.
« on: January 18, 2017, 10:51:42 am »
I am trying to write a script to plot to a .Pdf using the 'Dwg to Pdf.pc3' driver that comes with AutoCAD LT 2013. The script works but prints the .Pdfs to the same directory as the .dwg files.

If I print using the Acrobat driver, I can specify a 'default' directory. But, the Adobe driver does not print as a vector file, they are always Raster. The CAD driver does retain Vector.

Do you know how to get the CAD driver to always print to a Default directory?

craigr
Self Taught and Still Learning!
Win7 Pro, AutCad LT  2013. Intel Xeon 8 Core 3.40GHz Processor, 8 Gig Ram, 3 LCD Monitors

Master_Shake

  • Swamp Rat
  • Posts: 1254
Re: Dwg to to Pdf.pc3 Plot to a Default directory.
« Reply #1 on: January 19, 2017, 08:52:49 am »
I don't think there is a variable that controls the default DWG to PDF plot location. If you are running a script you should be able to pass the directory.


(command "-plot""y" "" "DWG To PDF.pc3" "Paper Size" "I" "L" "N" "E" "F" "" "Y" "Plot Style.ctb" "Y" ""  "File Location" "N" "Y")

MSTG007

  • Water Moccasin
  • Posts: 2026
  • I can't remeber what I already asked! I need help!
Re: Dwg to to Pdf.pc3 Plot to a Default directory.
« Reply #2 on: January 19, 2017, 10:02:42 am »
I don't think there is a variable that controls the default DWG to PDF plot location. If you are running a script you should be able to pass the directory.


(command "-plot""y" "" "DWG To PDF.pc3" "Paper Size" "I" "L" "N" "E" "F" "" "Y" "Plot Style.ctb" "Y" ""  "File Location" "N" "Y")

For the file location within the script... How would you place it to your C:\Drive?
Autodesk Infrastructure Design Suite 2017

craigr

  • Water Moccasin
  • Posts: 1904
Re: Dwg to to Pdf.pc3 Plot to a Default directory.
« Reply #3 on: January 19, 2017, 10:08:01 am »
I am VERY busy today, but hopefully can get back to this tomorrow.

The 'File Location' part sounds interesting. I DO plot all .PDFs to my local drive for various reasons, then deal with them while all are separate from the CAD files.

craigr
Self Taught and Still Learning!
Win7 Pro, AutCad LT  2013. Intel Xeon 8 Core 3.40GHz Processor, 8 Gig Ram, 3 LCD Monitors

Master_Shake

  • Swamp Rat
  • Posts: 1254
Re: Dwg to to Pdf.pc3 Plot to a Default directory.
« Reply #4 on: January 19, 2017, 11:40:56 am »
Reading more into it, it might not be possible as you need to pass the entire path, including filename. I have no script experience to know if you are able to pull variables?

MSTG007

  • Water Moccasin
  • Posts: 2026
  • I can't remeber what I already asked! I need help!
Re: Dwg to to Pdf.pc3 Plot to a Default directory.
« Reply #5 on: January 20, 2017, 08:14:49 am »
I was searching around this morning... Found this... Looks like it can help point in the right direction.

http://www.cadtutor.net/forum/showthread.php?69132-Printing-LISP-Help...&highlight=Printing-LISP
Autodesk Infrastructure Design Suite 2017

craigr

  • Water Moccasin
  • Posts: 1904
Re: Dwg to to Pdf.pc3 Plot to a Default directory.
« Reply #6 on: January 20, 2017, 02:40:50 pm »
The following is what I have been using, but sadly, I still cannot get it to Print to 'C:\ACAD' folder.

-plot;Yes;;Adobe PDF with Layers;CSI_(11.00 x 17.00 Inches);Inches;Landscape;No;window;-0.6,-0.2232;15.8233,10.1435;Fit;0.00,0.00;YES;;NO;No;No;No;;No;Yes

I want it to act as it currently does and give the .pdf the same name as the CAD, which it does. But, it places the file(s) into the same directory as the .dwg file(s).

craigr
Self Taught and Still Learning!
Win7 Pro, AutCad LT  2013. Intel Xeon 8 Core 3.40GHz Processor, 8 Gig Ram, 3 LCD Monitors

MSTG007

  • Water Moccasin
  • Posts: 2026
  • I can't remeber what I already asked! I need help!
Re: Dwg to to Pdf.pc3 Plot to a Default directory.
« Reply #7 on: January 20, 2017, 02:43:47 pm »
I have been playing around with this routine alittle. The thing I like about it, is that it prints it to me default folder. But there are still kinks im trying to figure out.

Code: [Select]
(defun c:PDF ( / cm )
;;http://www.cadtutor.net/forum/showthread.php?84744-PDF-file-saving-location-Need-help/page3
    (setq cm (getvar 'CMDECHO))
    (setvar 'CMDECHO 0)
    (command "_.-plot" "_Y"
        (if (= 1 (getvar 'TILEMODE)) "Model" (getvar 'CTAB))
        "DWG To PDF.pc3" "ARCH full bleed D (36.00 x 24.00 Inches)"
        "_I" "_L" "_N" "_E" "1:1" "_C" "_Y" "A.Structurepoint.ctb" "_Y"
    )
    (if (= 1 (getvar 'TILEMODE))
        (command "_A")
        (command "_N" "_Y" "_N")
    )
    (command (strcat (getvar 'DWGPREFIX) "PDF files\\" (vl-filename-base (getvar 'DWGNAME))) "_Y" "_Y")
    (setvar 'CMDECHO cm)
;;    (princ)
)
(vl-load-com)
;;(princ)
Autodesk Infrastructure Design Suite 2017

craigr

  • Water Moccasin
  • Posts: 1904
Re: Dwg to to Pdf.pc3 Plot to a Default directory.
« Reply #8 on: January 20, 2017, 02:54:23 pm »
For my use, the Lisp routine does not help me. Sadly, I am dealing with 2013 LT, which does not support Lisps.

So basically, I have to figure out the 'long way around the barn' to reach my objective.

I am confident that it CAN be done and I will keep chipping away at a solution.

craigr
Self Taught and Still Learning!
Win7 Pro, AutCad LT  2013. Intel Xeon 8 Core 3.40GHz Processor, 8 Gig Ram, 3 LCD Monitors