Sbeth85 Posted July 1, 2014 Author Posted July 1, 2014 BIGAL- brilliant idea to erase the contents!! I'd tried attaching an example earlier but the DWG was too large. Excuse my ignorance- when you post that code, do you want me to make it into a LISP and APPLOAD it? Or is there another way I'm supposed to use/input the code? Here's the file BLANK change pc3 test.dwg For the sake of clarity I'll reiterate what I'm trying to do: 1. Change all Layouts to a new PC3: "DWG to PDF" (regardless of what the old one was (ex: HPDesignJet yadda yadda) because it keeps shifting depending on who sent me the file.) 2. Find a way to click on the "Display Plot Style" box in the Page Setup, so that I don't need to go through each Layout and click on it manually myself. 3. MAINTAIN all respective Layouts different page sizes... So in the file I attached, some are A0, A3, etc. -- 4. Last but not least... I've tried searching for this answer and can't find- I need an idiot's guide to batch plotting when all the Layouts have different sizes. TIA! Basically looking for a way to process DWGs full of tons of Layouts in one fell swoop! Quote
Spaj Posted July 1, 2014 Posted July 1, 2014 Hi This will automate Item 2 ie turn the 'Display Plot Style' option on for all tabs (defun c:DPSON (/ lo loList) (setvar "FILEDIA" 0); <------------prevents the dialog box (foreach lo (layoutlist) (progn (setvar "CTAB" lo) (vla-put-showplotstyles (vla-get-activelayout (vla-get-activedocument (vlax-get-acad-object) ) ) :vlax-True ; True=on False=off ) ) ) (setvar "FILEDIA" 1) ) (princ "\n>>> Type DPSOn to Run...<<<") Quote
Sbeth85 Posted July 1, 2014 Author Posted July 1, 2014 Spaj, I made it into a LISP and it worked!!! Awesome!! Thank you so much. Can I use the "Record" button to activate a bunch of LISPs in a row for one big process? Quote
Spaj Posted July 1, 2014 Posted July 1, 2014 (edited) Hi You're welcome. All credit to the kind soul who wrote the code. Not familiar with the "Record" feature but it should work. Far better to combine the functions together to form a complete routine, try this... (defun C:TEST (/ lo ) (vl-load-com) (vlax-for x (vla-get-Layouts (vla-get-ActiveDocument (vlax-get-acad-object) ) ) (vla-put-ConfigName x "DWG to PDF.pc3") ) (foreach lo (layoutlist) (progn (setvar "CTAB" lo) (vla-put-showplotstyles (vla-get-activelayout (vla-get-activedocument (vlax-get-acad-object) ) ) :vlax-True ) ) ) ) This should combine Items 1 & 2 ! Edited July 1, 2014 by Spaj Quote
Sbeth85 Posted July 13, 2014 Author Posted July 13, 2014 Spaj- I've just tried this code for items 1 and 2. While it DID turn the PC3 to "dwg to pdf" (awesome!) and it did turn on the display plot styles (woot!) it unfortunately did NOT preserve the original Layout's page size. So basically all the page sizes got reset to ANSI A for some reason. Is there a way to make the code retain the original designated size for each sheet for each layout tab? Thank you again! Quote
Spaj Posted July 13, 2014 Posted July 13, 2014 Hi Unfortunately this is out of my league... I can only suggest you experiment with paper sizes defined in your DWG to PDF.pc3 file and see if you cannot add the sizes already defined is the drawings you wish to change. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.