Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Page Setups - Where are these stored?

10 REPLIES 10
Reply
Message 1 of 11
Nostromo2
15359 Views, 10 Replies

Page Setups - Where are these stored?

Hi,

I have created a new Profile in an effort to standardize CAD in my office, but I'm having problems trying to link all new Page Setups to the local network server instead of pointing to my computer or at unknown locations for specific projects.

How do I change this? Any suggestions?

PLUS: Please please tell me about THE BEST BOOK I can purchase to learn how to use and manage macros!
10 REPLIES 10
Message 2 of 11
CrazyIvan
in reply to: Nostromo2

page setups are kept with an AUTOCAD DWG file. They ARE NOT kept in a file unto themselves.

Typical way is to set up a template drawing with everything you need: layers, linetypes, colors, plot configurations, etc...

Whenever you create a new file, it should be started by using this template so that everything is in there.

If you have tons of existing drawings, what you could do is set up a LISP that when you type PLOT, it will import the plotstyles from that template drawing and then will go to the standard PLOT window where you will have those Plot Configurations available then.
Message 3 of 11
Nostromo2
in reply to: Nostromo2

Please expand: what is a LISP? how do I set it up?
Message 4 of 11
CrazyIvan
in reply to: Nostromo2

A LISP is simply a macro defined outside of autocad and called upon when needed, just as a macro. It automates functions within AutoCAD.

So, in your case, rather than typing in "Pagesetup" and selecting import, finding your template drawing and selecting the Plot Configurations to import, it will automatically do all that for you with a 2 or 3 key-stroke.
Message 5 of 11
Nostromo2
in reply to: Nostromo2

Thank you, now I know what it does for me. The problem is that I am not sure about how to create this macro. I am not a programmer. Could you help me to create it if I give you more specifics?
Message 6 of 11
Nostromo2
in reply to: Nostromo2

Never mind. I found a lot of information under the Help menu. I will study it and post any question if any.
Message 7 of 11
CrazyIvan
in reply to: Nostromo2

here is a lisp routine:


(DEFUN C:ipt ()
(setq cmde (getvar "cmdecho"))
(setvar "cmdecho" 0)
(command "PSETUPIN" (strcat "J:/autocad/borders/pagesetup-36x24.dwg") "*")
;Import all the Pagesetups
(while (= (getvar "CMDNAMES") "PSETUPIN")
(command "y")
)
(PRINC)
)

You will need to change the path & file name to whatever it is on your server/system and filename.

Type in VLIDE at command prompt, select NEW, cut & paste this into the new lisp file window, then saveas to where your lisps are kept.

You will need to add the lisp to your active lisp functions. Few ways to do this, but easiest for folks who don't have a lot of custom lisps is to do the following:

In AutoCAD:

Type in APPLOAD
Select "Contents"
Select "ADD"
Search & add file
Click "Close"
Click "Close"

Restart AutoCAD. Now, when you type "ipt" it will load all of the pagesetups from the designated file you specify in the lisp above.

let us know if you need further instruction.
Click "
Message 8 of 11
AnnieJ115
in reply to: Nostromo2

Thank you CrazyIvan!
I've been working on something similar to bring in page setups for a new printer, but progress has been slow as I'm new to programming. This will save me hours of explanations to coworkers on how and where to import page setups (It seems they'd rather call me one at a time than read the tutorial I wrote.)

Thanks for sharing~

Annie
Message 9 of 11
danellis
in reply to: Nostromo2

"(command "PSETUPIN" (strcat "J:/autocad/borders/pagesetup-36x24.dwg") "*")"

ah, so that would be why the path I'd saved to didn't work.

I ended up having to copy my definitions file into one of the support directories
Message 10 of 11
CastleCourt
in reply to: CrazyIvan

Crazylvan,

 

I have created the lisp as you have outlined, but get the error message  Unknown command "*" .  Press F1 for help. I tried to delete it from the lisp and then i get an error message can't find file.

 

no matter what I do it cannot either find the file or complete the lisp. I have checked the file path several times as well as tried other files in different locations all to present the same result. What am I doing wrong? 

 

Thanks, Duga

Message 11 of 11
juan.raven
in reply to: CastleCourt

bduga,

 

I know it's been a few months since you last posted, but your post and CrazyIvan's responses helped me out. If you haven't solved your problem, hopefully this will help.

 

I was having the same "unknown command" issue you mentioned. My solution was to change the backslashes (  \  ) to forward slashes (  /  ) in the file path (see slashes in green below).

 

(DEFUN C:ipt ()
(setq cmde (getvar "cmdecho"))
(setvar "cmdecho" 0)
(command "PSETUPIN" (strcat "J:/autocad/borders/pagesetup-36x24.dwg") "*")
;Import all the Pagesetups
(while (= (getvar "CMDNAMES") "PSETUPIN")
(command "y")
)
(PRINC)
)

 

I think when you copy and paste the file path from wherever it is on your computer, the slashes are backslashes by default. Changing them to forward slashes fixed it for me.

 

Good luck!

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost