Printing and Plotting

Reply
Distinguished Contributor
bruceclement
Posts: 182
Registered: ‎11-24-2003
Message 1 of 6 (103 Views)

Inserting Standard Pagesetups

103 Views, 5 Replies
06-19-2000 02:21 PM
Is there a way to delete or purge pagesetups at the command line (or better yet directly with AutoLISP)? I created a dummy "pagesetup" drawing containing several pagesetups that gets inserted automatically every time a user opens a drawing or starts a new drawing. It worked great until I wanted to change one of the pagesetups in the dummy "pagesetup" drawing. Reinserting the drawing does not overwrite an existing pegesetup with the same name. I know I can use PSETUPIN instead of Insert to bring in the pagesetups, which is a partial fix. I would also like to be able to delete pagesetups that are no longer needed for whatever reason. Is there a way to "purge" one or all pagesetups automatically? Thanks.
*Schillace, Eva
Message 2 of 6 (103 Views)

Re: Inserting Standard Pagesetups

06-20-2000 11:18 AM in reply to: bruceclement
Bruce,

I would recommend loading them via Lisp (by calling PSETUPIN in acaddoc.lsp or similar). You will be able to modify them in your dummy drawing, and they will be redefined next time they are imported. My autoload looks like this:

(setq expert (getvar "EXPERT"))
(setvar "EXPERT" 2)
(command "._-PSETUPIN" "C:/pagesetups.dwg" "*")
(setvar "expert" expert)

When I open a drawing, I get confirmation that the page setups are being overwritten:
"Page setup "Oce E size (bond)" already exists, redefining."

This is great as we frequently "tweak" these setups. It seems like you are currently making a Lisp call to insert the dummy drawing anyway--I really think this way is easier.

HTH,
-Eva

bruceclement wrote:

> Is there a way to delete or purge pagesetups at the command line (or better yet directly with AutoLISP)? I created a dummy "pagesetup" drawing containing several pagesetups that gets inserted automatically every time a user opens a drawing or starts a new drawing. It worked great until I wanted to change one of the pagesetups in the dummy "pagesetup" drawing. Reinserting the drawing does not overwrite an existing pegesetup with the same name. I know I can use PSETUPIN instead of Insert to bring in the pagesetups, which is a partial fix. I would also like to be able to delete pagesetups that are no longer needed for whatever reason. Is there a way to "purge" one or all pagesetups automatically? Thanks.
Distinguished Contributor
bruceclement
Posts: 182
Registered: ‎11-24-2003
Message 3 of 6 (103 Views)

Re:

06-20-2000 11:40 AM in reply to: bruceclement
Thanks Eva. I have already changed the lisp to do exactly what you've suggested. That solves the problem of redifining existing page setups. I'm still looking for a way to get rid of other page setups. We share a lot of drawings between offices, and each office has 6 or 8 page setups, so they tend to pile up. It would be nice to be able to wipe them all out, then load the correct ones.
*B, Jimmy
Message 4 of 6 (103 Views)

SV: Inserting Standard Pagesetups

06-20-2000 07:58 PM in reply to: bruceclement
This will do it!

;;; (deleteAllPageSetups )
;;; (deleteAllPageSetups (vla-get-activedocument (vlax-get-acad-object)))
(defun deleteAllPageSetups (doc)
(vlax-for pc (vla-get-plotconfigurations doc)
(vla-delete pc)
)
)

;;; (deletePageSetup )
;;; (deletePageSetup (vla-get-activedocument (vlax-get-acad-object)) "PageSetupName")
(defun deletePageSetup (doc name)
(vlax-for pc (vla-get-plotconfigurations doc)
(if (= (strcase (vla-get-name pc)) (strcase name))
(vla-delete pc)
)
)
)

--
Best regards: Jimmy B
CAD coordinator at Emtunga International AB
http://hem.fyristorg.com/cadman/
www.emtunga.com
*Hampton, Stan
Message 5 of 6 (103 Views)

Re:

06-30-2000 01:14 PM in reply to: bruceclement
Now that I've imported the pagesetup I want how do I set it current?
Thanks in advance!
Stan

Eva Schillace wrote in message
news:394FB564.A005F548@nospam.henneman.com...
> Bruce,
>
> I would recommend loading them via Lisp (by calling PSETUPIN in
acaddoc.lsp or similar). You will be able to modify them in your dummy
drawing, and they will be redefined next time they are imported. My
autoload looks like this:
>
> (setq expert (getvar "EXPERT"))
> (setvar "EXPERT" 2)
> (command "._-PSETUPIN" "C:/pagesetups.dwg" "*")
> (setvar "expert" expert)
>
> When I open a drawing, I get confirmation that the page setups are being
overwritten:
> "Page setup "Oce E size (bond)" already exists, redefining."
>
> This is great as we frequently "tweak" these setups. It seems like you
are currently making a Lisp call to insert the dummy drawing anyway--I
really think this way is easier.
>
> HTH,
> -Eva
>
> bruceclement wrote:
>
> > Is there a way to delete or purge pagesetups at the command line (or
better yet directly with AutoLISP)? I created a dummy "pagesetup" drawing
containing several pagesetups that gets inserted automatically every time a
user opens a drawing or starts a new drawing. It worked great until I
wanted to change one of the pagesetups in the dummy "pagesetup" drawing.
Reinserting the drawing does not overwrite an existing pegesetup with the
same name. I know I can use PSETUPIN instead of Insert to bring in the
pagesetups, which is a partial fix. I would also like to be able to delete
pagesetups that are no longer needed for whatever reason. Is there a way to
"purge" one or all pagesetups automatically? Thanks.
>
*Jones, Dave
Message 6 of 6 (103 Views)

Re:

06-30-2000 04:33 PM in reply to: bruceclement
(command "-PLOT" "N" "YourLayoutTabName" "YourPageSetupName" "Your.pc3" "N"
"Y" "N")

Dave

Stan Hampton wrote in message
news:ef23ead.3@WebX.SaUCah8kaAW...
> Now that I've imported the pagesetup I want how do I set it current?
> Thanks in advance!
> Stan
>
> Eva Schillace wrote in message
> news:394FB564.A005F548@nospam.henneman.com...
> > Bruce,
> >
> > I would recommend loading them via Lisp (by calling PSETUPIN in
> acaddoc.lsp or similar). You will be able to modify them in your dummy
> drawing, and they will be redefined next time they are imported. My
> autoload looks like this:
> >
> > (setq expert (getvar "EXPERT"))
> > (setvar "EXPERT" 2)
> > (command "._-PSETUPIN" "C:/pagesetups.dwg" "*")
> > (setvar "expert" expert)
> >
> > When I open a drawing, I get confirmation that the page setups are being
> overwritten:
> > "Page setup "Oce E size (bond)" already exists, redefining."
> >
> > This is great as we frequently "tweak" these setups. It seems like you
> are currently making a Lisp call to insert the dummy drawing anyway--I
> really think this way is easier.
> >
> > HTH,
> > -Eva
> >
> > bruceclement wrote:
> >
> > > Is there a way to delete or purge pagesetups at the command line (or
> better yet directly with AutoLISP)? I created a dummy "pagesetup" drawing
> containing several pagesetups that gets inserted automatically every time
a
> user opens a drawing or starts a new drawing. It worked great until I
> wanted to change one of the pagesetups in the dummy "pagesetup" drawing.
> Reinserting the drawing does not overwrite an existing pegesetup with the
> same name. I know I can use PSETUPIN instead of Insert to bring in the
> pagesetups, which is a partial fix. I would also like to be able to
delete
> pagesetups that are no longer needed for whatever reason. Is there a way
to
> "purge" one or all pagesetups automatically? Thanks.
> >
>
Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.