TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: POCKETS on July 19, 2010, 12:56:44 PM
-
Cab,
I came across your lisp program, re-name-layouts and I was wondering if that program could be modified to just rename layout1 to paper?
Using AutoCAD 2008
Pockets
-
Try something like this:
*added defun
(defun c:younameit (/)
(if (member "Layout1" (layoutlist))
(vla-put-name
(vla-item (vla-get-layouts (vla-get-activedocument (vlax-get-acad-object)))
"layout1"
)
"paper"
)
)
(princ)
)
-
Ronjonp,
This work great!
Next request, how do I set this up so that I can use a button to activate it?
I am use to working with defun c:
-
Depending on the version you are running, just put the command (younameit) into the Macro line (I'm looking at 2010).
So, for 2010 for example: C^C^_younameit
Be sure the routine Ron provided is in a directory that AutoCAD looks at.
In the older versions there is an <MNS ??> file you would need to edit. I don't recall the layout so I can't post an example here for you, but I know it's somewhat similar.
-
Thank you, one and all!
Pockets
-
So, for 2010 for example: C^C^_younameit
Not trying to be picky, but I thought it was ^C^C
-
So, for 2010 for example: C^C^_younameit
Not trying to be picky, but I thought it was ^C^C
I thought it looked funny when I wrote it, ... I'll blame it on the fat fingers. :-D
-
No worries dude :-)