Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Home
Help
Login
Register
TheSwamp
»
Code Red
»
AutoLISP (Vanilla / Visual)
»
Topic:
Remove the Page setup from the command Plot
« previous
next »
Print
Pages: [
1
] |
Go Down
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
Logged
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 ?
Logged
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 .
Logged
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]
(
defun
deleteAllPageSetups
(
)
(
vlax-for
pc
(
vla-get-plotconfigurations
(
vla-get-activedocument
(
vlax-get-acad-object
)
)
)
(
vla-delete
pc
)
)
)
If you want to delete all AND restore setups from a Template drawing ( that has your plot setups saved)
Code - Auto/Visual Lisp:
[Select]
(
defun
c:ChangePageSetups
(
/
old_expert template
)
(
setq
old_expert
(
getvar
"expert"
)
template
"c:/kdub19/Templates/CTT.dwg"
)
(
setvar
"expert"
5
)
(
deleteAllPageSetups
)
(
command
"-PSETUPIN"
template
"*"
)
(
setvar
"expert"
old_expert
)
(
princ
)
)
And the wildcard in the command line can be changed to load a specific setup
ie
Code - Auto/Visual Lisp:
[Select]
(
command
"-PSETUPIN"
template
"ThisIstheSetupFor-A1-PDF-that-I-want-to-use"
)
«
Last Edit: April 01, 2013, 04:06:50 AM by Kerry
»
Logged
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 .
Logged
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
Logged
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 .
It returns nil at the command line .
Logged
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 .
Many thanks
Logged
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
Logged
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 ..
Logged
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 .
Logged
Print
Pages: [
1
] |
Go Up
« previous
next »
TheSwamp
»
Code Red
»
AutoLISP (Vanilla / Visual)
»
Topic:
Remove the Page setup from the command Plot