ILoveMadoka Posted December 15, 2010 Posted December 15, 2010 I want to simply run a command (or a series of commands) on every tab in a drawing. The tabs most likely are not named in any consistent fashion. It might be as simple as going to a tab and zooming extents. I have no idea how to cycle through the tabs and end when the command is run on the last tab. Help please!! Thanks! Quote
Lee Mac Posted December 15, 2010 Posted December 15, 2010 You could use a construct such as: (foreach tab (layoutlist) (setvar 'CTAB tab) ... ) Bear in mind that (layoutlist) excludes the Model tab, to include it, you could use: (foreach tab (cons "Model" (layoutlist)) (setvar 'CTAB tab) ... ) Lee Quote
ILoveMadoka Posted December 15, 2010 Author Posted December 15, 2010 Thanks Lee... I'm digging through older threads right now looking at what others have done. In my frustration I always forget to search before posting... 'preciate it! Quote
pBe Posted December 15, 2010 Posted December 15, 2010 sample (defun c:test ( / ot ac ) (vl-load-com) (setq this_dwg (vlax-get-acad-object)) (foreach d (layoutlist) (setvar 'CTAB d) (vla-ZoomExtents this_dwg)) (princ) ) Nevermind: Lee you're a smoking gun Quote
Freerefill Posted December 16, 2010 Posted December 16, 2010 If you find my Finalblitz lisp, you could try that. It works on multiple tabs and multiple drawings. Quote
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.