changing layouts for multiple drawings..

Jan-Mikael Kristiansson

Usenet Archive
Joined
Aug 6, 2003
Messages
4
Reaction score
0
Hi!
I have maybe 1000 drawings wich are made in R14. They all have a paperzize in the layout that I'm not happy with. I want to change the paperzize automaticly in all drawings. Right now I'm doing it manually and it is very time consuming. I already have a lisp-file that can generate a script and open a file wich performs any commands i put in there. Then this lisp saves the dwg-files in the version I selected. The thing is that I don't know how to write a command to change layout-settings? The layout command only seem to be able to change name of existing layouts, making new layouts etc..not being able to perform all "advanced" settings from command-line. Does anybody have a clue how I can proceed here?

thx

Mikael
 
You can use aclyutil.arx and set up the page in a template, then do a pageout. That would write the script the import the page setup. For the layout, do this:
(thanks to Jason Peircey .......credit where credit is due) (defun c:implay (setvar "tilemode" 0) (setq lst (mapcar 'strcase (vl-remove "Model" (layoutlist)))) (foreach x (mapcar 'strcase '("yourlayout1" "yourlayout2" "yourlayout3")) (if (vl-position x lst) (princ "\nlayout already exists") (command "layout" "t" "mylayouttemplate.dwt" x))) (command "layout" "d" "existinglayout1") (command "layout" "d" "existinglayout2") (setvar "ctab" "layout you want to set up") (princ)) I use this method for converting vendor drawings to our standards. It can all be done in a script, but there may be a better way to do it. It works well for me. HTH Russ
 
Thanks, I will try this. =)

/Mikael

rewilson said:
You can use aclyutil.arx and set up the page in a template, then do a
pageout. That would write the script the import the page setup. For the layout, do this:
(thanks to Jason Peircey .......credit where credit is due) (defun c:implay (setvar "tilemode" 0) (setq lst (mapcar 'strcase (vl-remove "Model" (layoutlist)))) (foreach x (mapcar 'strcase '("yourlayout1" "yourlayout2" "yourlayout3")) (if (vl-position x lst) (princ "\nlayout already exists") (command "layout" "t" "mylayouttemplate.dwt" x))) (command "layout" "d" "existinglayout1") (command "layout" "d" "existinglayout2") (setvar "ctab" "layout you want to set up") (princ)) I use this method for converting vendor drawings to our standards. It can
all be done in a script, but there may be a better way to do it. It works well for me.
 

Latest threads

Back
Top