jrn Posted May 3, 2012 Share Posted May 3, 2012 Scripts are not my strongest skill, so I hope to find some basic help. I want to make a action macro that selects the copy the last layout tab, copy that, goes modelspace and -pan @some numbers, go back in modelspace. stop. I've recorded the following steps succesfully: Layout copy and mspace -pan (basepoint plus some mumbers) (@-3000,0) I would like to know the command for selecting the last layout tab. Without using right-click functions which, as I know of, are not recorded? Hope someone can help Quote Link to comment Share on other sites More sharing options...
BIGAL Posted May 4, 2012 Share Posted May 4, 2012 This is the code for getting a list of layout tabs not sure if last is first (setq doc (vla-get-activedocument (vlax-get-acad-object))) (vlax-for lay (vla-get-Layouts doc) (setq plotabs (cons (vla-get-name lay) plotabs)) ) (setq lasttab (nth 1 plotabs )) ;or (cadr plotabs) Quote Link to comment Share on other sites More sharing options...
jrn Posted May 23, 2012 Author Share Posted May 23, 2012 Tank you, Bigal ! I got a bit lost with the code, but I found another lo-fi time consuming practical way :-) Quote Link to comment Share on other sites More sharing options...
MSasu Posted May 23, 2012 Share Posted May 23, 2012 Alternatively: (car (reverse (layoutlist))) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.