Message 1 of 6
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
hello,
I am currently working on a lisp to automate three tasks
1- rename current layout tab
2- copy layout tab (to end)
3-switch to last layout tab
here is where i am at so far -
(DEFUN C:RRT2 () (command "-layout" "rename" "" (getstring T "\nEnter new name for current layout"))) (princ) )
i know how to get the sheet to rename through the lisp, but the next part of
1- adding in the next command :
(command "-layout" "copy" "" "")
2- the set command (i know it should look something like this):
(command "ctab" "(the last sheet)" )
but i'm not positive on setting that "the last sheet" variable. this maybe?
(cadr (member (getvar 'CTAB) (layoutlist)))
So that leaves me here
(DEFUN C:RCS () (command "-layout" "rename" "" (getstring T "\nEnter new name for current layout"))) (princ) (command "-layout" "copy" "" "" "ctab" (cadr (member (getvar 'CTAB) (layoutlist))) )
the lisp runs the first part (renaming) but fails to run the rest,
new to writing lisps here, what am i doing wrong?
Solved! Go to Solution.