Author Topic: Remove the Page setup from the command Plot  (Read 1611 times)

0 Members and 1 Guest are viewing this topic.

Coder

  • Swamp Rat
  • Posts: 827
Remove the Page setup from the command Plot
« on: April 01, 2013, 03:20:51 AM »
Hello everybody . :)

Is it possible to remove all the list of page setup names and return it to default ?

Thank you in advance

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Remove the Page setup from the command Plot
« Reply #1 on: April 01, 2013, 03:31:13 AM »

Yes,
Do you have a drawing with correct defaults ?
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Coder

  • Swamp Rat
  • Posts: 827
Re: Remove the Page setup from the command Plot
« Reply #2 on: April 01, 2013, 03:46:46 AM »
Hi Kerry :)

The default is the same as if you open a new drawing and have only that three options :
<None>
<Previous>
Import...


Thank you for your answer .

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Remove the Page setup from the command Plot
« Reply #3 on: April 01, 2013, 03:58:21 AM »
OK,
If you just want to delete all


Code - Auto/Visual Lisp: [Select]
  1. (defun deleteAllPageSetups ()
  2.         (vla-delete pc)
  3.     )
  4. )


If you want to delete all AND restore setups from a Template drawing ( that has your plot setups saved)

Code - Auto/Visual Lisp: [Select]
  1. (defun c:ChangePageSetups (/ old_expert template)
  2.     (setq old_expert (getvar "expert")
  3.           template   "c:/kdub19/Templates/CTT.dwg"
  4.     )
  5.     (setvar "expert" 5)
  6.     (deleteAllPageSetups)
  7.     (command "-PSETUPIN" template "*")
  8.     (setvar "expert" old_expert)
  9.     (princ)
  10. )
  11.  

And the wildcard in the command line can be changed to load a specific setup
ie

Code - Auto/Visual Lisp: [Select]
  1. (command "-PSETUPIN" template "ThisIstheSetupFor-A1-PDF-that-I-want-to-use")
« Last Edit: April 01, 2013, 04:06:50 AM by Kerry »
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Coder

  • Swamp Rat
  • Posts: 827
Re: Remove the Page setup from the command Plot
« Reply #4 on: April 01, 2013, 04:07:36 AM »
That's great

At the moment , I need the first code that you posted and it works great .

Thank you so much . :)

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Remove the Page setup from the command Plot
« Reply #5 on: April 01, 2013, 04:08:36 AM »

You're welcome :)
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Coder

  • Swamp Rat
  • Posts: 827
Re: Remove the Page setup from the command Plot
« Reply #6 on: April 01, 2013, 04:22:29 AM »
I am sorry , the code worked on the first drawing and did not work on the rest .  :oops:

It returns nil at the command line .  :-o

Coder

  • Swamp Rat
  • Posts: 827
Re: Remove the Page setup from the command Plot
« Reply #7 on: April 01, 2013, 04:31:08 AM »
Please take a look at the sample drawing .

I can not delete the page setups *PART 1* and *PART 2* and many more on the other drawings . :oops:

Many thanks

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Remove the Page setup from the command Plot
« Reply #8 on: April 01, 2013, 04:48:58 AM »
Can you post a copy of that drawing before you ran the routine.
I'll guess the problem is related to your setup naming. I have never seen Setups named using * before. I thought that was an illegal naming character  :|
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Remove the Page setup from the command Plot
« Reply #9 on: April 01, 2013, 04:51:23 AM »

Yes, it is illegal for me anyway ..

kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Coder

  • Swamp Rat
  • Posts: 827
Re: Remove the Page setup from the command Plot
« Reply #10 on: April 01, 2013, 06:38:32 AM »
Yes , you are right Kerry , I couldn't name the a new page setup with these characters but this is how I have received them from the consultant .

Could you delete these pages from the drawing ?

Many thanks .