Jump to content
Sbeth85

Quick way to change multiple Layouts? Plot style --> PDF

Recommended Posts

Sbeth85

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:roll:

 

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!

Share this post


Link to post
Share on other sites
Spaj

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...<<<")

Share this post


Link to post
Share on other sites
Sbeth85

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?

Share this post


Link to post
Share on other sites
Spaj

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 by Spaj

Share this post


Link to post
Share on other sites
Sbeth85

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!

Share this post


Link to post
Share on other sites
Spaj

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.

Share this post


Link to post
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...