Author Topic: Layout Tabs  (Read 8740 times)

0 Members and 1 Guest are viewing this topic.

AVCAD

  • Guest
Layout Tabs
« on: February 09, 2005, 11:31:17 AM »
Is there a LISP that will just delete all the Tabs in a file??

I get some files with like 30 Tabs on it and its really annoying!

I have the worst petpeaves with these damn files...I wish I were and Architect and just didnt care.... :?

whdjr

  • Guest
Layout Tabs
« Reply #1 on: February 09, 2005, 11:35:21 AM »
All you have to do is left-click on the first tab, then "slide" to the last end, hold down the shift key, left-click on the last tab, and then right-click and select delete.  Just like deleting files in Explorer.

**edit**

Ofcourse you could just right-click on any tab and click on "select all tabs" and then hit delete on the keyboard.  Either way works. :D

Jeff_M

  • King Gator
  • Posts: 4096
  • C3D user & customizer
Layout Tabs
« Reply #2 on: February 09, 2005, 11:48:08 AM »
For whatever reason, the process described by Will is slow to process. Here's a lisp that is a bit faster and could be run in a script, if desired.
Code: [Select]

(defun c:TabsBgone (/ tabs idx tab)
  (setq tabs (vla-get-layouts (vla-get-activedocument (vlax-get-acad-object))))
  (setq idx (vla-get-count tabs))
  (while (< 0 (setq idx (1- idx)))
    (setq tab (vla-item tabs idx))
    (if (not (eq "MODEL" (strcase (vla-get-name tab))))
      (vla-delete tab)
      )
    )
  (princ)
  )

whdjr

  • Guest
Layout Tabs
« Reply #3 on: February 09, 2005, 11:49:30 AM »
Nice name for the function Jeff. :lol:

MP (not logged on)

  • Guest
Layout Tabs
« Reply #4 on: February 09, 2005, 12:06:40 PM »
Code: [Select]
(defun c:LayoutsBeGone ( / layouts )
   
    ;;  exploit the fact that modelspace
    ;;  cannot be deleted even if you try
   
    (repeat
       
        (vlax-get-property
            (setq layouts
                (vlax-get-property
                    (vlax-get-property
                        (vlax-get-acad-object)
                       'ActiveDocument
                    )
                   'Layouts
                )
            )
           'Count
        )
   
        (vl-catch-all-apply
           '(lambda ()
                (vlax-invoke-method
                    (vlax-invoke-method                    
                        layouts
                       'Item
                        0
                    )    
                   'Delete
                )
            )
        )
    )
   
    (princ)
   
)

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Layout Tabs
« Reply #5 on: February 09, 2005, 12:52:49 PM »
While on the subject on tabs.
Is there a way to detect which tabs are selected when more than one is?
I see there is a way using DOSlib, but is there a way with just lisp?
Code: [Select]
(setq layouts_to_plot (dos_multilist "Plot Layouts" "Select layouts" (layoutlist)))
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
Layout Tabs
« Reply #6 on: February 09, 2005, 01:02:15 PM »
What does selecting multiple tabs do for ya?
TheSwamp.org  (serving the CAD community since 2003)

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Layout Tabs
« Reply #7 on: February 09, 2005, 01:11:53 PM »
Quote from: Mark Thomas
What does selecting multiple tabs do for ya?
I have a few routines, two by Jeff Mishler "Edit text that is identical in several tabs",
"add text to all tabs" and several I wrote. One that copies objects to other tabs, and
PlotTabs.LSP that will plot all tabs. In plottabs I used a special character to exclude
unwanted tabs to plot. In these routines it would be nice to be able to
select the tabs you want the action taken on & skip the others.
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

whdjr

  • Guest
Layout Tabs
« Reply #8 on: February 09, 2005, 01:36:22 PM »
I updated my copyb.lsp to allow the user to select layouts:

copyb.lsp

CADaver

  • Guest
Re: Layout Tabs
« Reply #9 on: February 09, 2005, 02:05:11 PM »
Quote from: AVCAD
I get some files with like 30 Tabs on it and its really annoying!
I have the worst petpeaves with these damn files
hmmm... fully intending to hijack a thread  :) ...  What's wrong with multiple tabs?  We use 'em all the time.  Excellent time saver and file manager.

whdjr

  • Guest
Re: Layout Tabs
« Reply #10 on: February 09, 2005, 02:15:33 PM »
Quote from: CADaver
hmmm... fully intending to hijack a thread  :) ...  What's wrong with multiple tabs?  We use 'em all the time.  Excellent time saver and file manager.
Ah...Not so fast CADAver  :D

I've updated the copyb.lsp tool again.  This time it allows for multiple copy selection.  Check it out.

AVCAD

  • Guest
Layout Tabs
« Reply #11 on: February 09, 2005, 02:29:47 PM »
WHATS WRONG WITH THEM!!!!!

lol...

Nothing really just a pet peave. I don tuse them at all. Each sheet is its own file, does away with having layers on and off in the VP...which is another petpeave of mine.

Plus if you have some one using multiple layouts onc eyou end up going into model space....by the lords...you would think a bomb went off in the drawing it is so crazy messy...although this happens even with out using any layout tabs.

I save the files as their drawing names so when we have hard copies I can look at the drawing name and know what file it is. Like T-101a is T-101a.dwg

If there is a T-101b and T-101c and you use layout tabs you have to remeber that those are in the same T-101 file and my mind is not all that good....

ALSO....I use Script pro to plot and my script only prints out the Layout1 tab....

To each his own..

but when trying to clean up a drawing from an acrchitect and the xrefed file has like 30 tabs on it I get really aggravated...I know they dont xref to other drawings but...why they hell are they there then!! Same with all those damn Layerfilters...I know they have no clue what 90% of those are...so i delete them makes life easier. Keep it simple.

By the way that Tabsbgone was just what I wanted! Thanks!

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Re: Layout Tabs
« Reply #12 on: February 09, 2005, 02:44:48 PM »
Quote from: CADaver
...  What's wrong with multiple tabs?  We use 'em all the time.  Excellent time saver and file manager.


Absolutely nothing is wrong with them. They can be a very useful tool if you need them. However if you do not use them (read - have no need to use them) then they merely cause the drawing to bloat in size.

I never have more than 2 or 3 tabs, frequently I use only 1.

If they bug you  ... delete them ... there is no law against it ... there aren't even any good reasons to keep them if you have not changed you standards since R14.

The last company I worked for had not updated their standards since '93 they did not use tabs...ever. When I introduced tabs into the mix, with A2k, production came to a screeching halt because all of the programming we had in place had to be rewritten to accommodate the tabs. Many of the programs could not be made to work properly (or rather how they expected them to work) so we abandoned them all together.

I have never looked back...instead I use a tabbed window for multiple files.
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

ronjonp

  • Needs a day job
  • Posts: 7529
Layout Tabs
« Reply #13 on: February 09, 2005, 02:46:08 PM »
Quote
ALSO....I use Script pro to plot and my script only prints out the Layout1 tab....


What version of CAD are you using? If it's 2005, you should really look into sheet manager for printing.  It has saved me tons of time.

Ron

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

SPDCad

  • Bull Frog
  • Posts: 453
Layout Tabs
« Reply #14 on: February 09, 2005, 03:31:57 PM »
Anyone have a lisp or proggy that makes moving layout tabs order any easier.  I find the 'Move to the end' feature is cad sucks, when I have multiple layout tabs to rearrange.
AutoCAD 2010, w/ OpenDCL

visit: http://reachme.at/spd_designs