Author Topic: Layout Tabs  (Read 8738 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

CADaver

  • Guest
Layout Tabs
« Reply #15 on: February 09, 2005, 05:26:16 PM »
Quote from: AVCAD
... does away with having layers on and off in the VP...
"THE" viewport?? as in one?  You only have one VP per drawing?

Quote from: AVCAD
which is another petpeave of mine.
?why?

Quote from: AVCAD

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.
Pardon me, but I haven't a clue what that sentence means.  What do layout tabs have to so with the elements in modelspace??


Quote from: AVCAD
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....
You're joking, right?

Quote from: AVCAD
ALSO....I use Script pro to plot and my script only prints out the Layout1 tab....
Okay, that's a reason, but there are tools available to get around that, a great one on these boards.

Quote from: AVCAD
I know they dont xref to other drawings but...why they hell are they there then!!
the original file used them to present drawings maybe??

ronjonp

  • Needs a day job
  • Posts: 7529
Layout Tabs
« Reply #16 on: February 09, 2005, 05:58:57 PM »
Quote
AVCAD wrote:
... does away with having layers on and off in the VP...
"THE" viewport?? as in one? You only have one VP per drawing?

AVCAD wrote:
which is another petpeave of mine.
?why?

AVCAD wrote:

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.
Pardon me, but I haven't a clue what that sentence means. What do layout tabs have to so with the elements in modelspace??


AVCAD wrote:
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....
You're joking, right?

AVCAD wrote:
ALSO....I use Script pro to plot and my script only prints out the Layout1 tab....
Okay, that's a reason, but there are tools available to get around that, a great one on these boards.

AVCAD wrote:
I know they dont xref to other drawings but...why they hell are they there then!!
the original file used them to present drawings maybe??



So you like layout tabs CADaver (so do I)......obviously AVCAD has a system of his own. I believe the initial question was "Is there a LISP that will just delete all the Tabs in a file?? "......not "Could somebody please analyze the things I'm doing, and comment on anything you feel is not right to you?" He found what he wanted......why can't it just be left at that?

Ron :roll:

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

SMadsen

  • Guest
Layout Tabs
« Reply #17 on: February 10, 2005, 05:15:04 AM »
CADaver found what he wanted, too ... a discussion  :lol:

Quote from: CAB
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?

I haven't found a way, CAB. Via ObjectARX you can do it and define it as an AutoLISP function (probably the exact same way that DOSLib is doing it) but I don't think a built-in method exists. On the same note, I believe LAYOUTLIST is an externally defined function, also.

CADaver

  • Guest
Layout Tabs
« Reply #18 on: February 10, 2005, 08:01:04 AM »
Quote from: ronjonp
...why can't it just be left at that?
For the same reason you felt it necessary to jump in here, maybe?  Anytime AVCAD, or anyone else, wishes to stop responding he/she is quite free to do so.

One primary method by which we, all of us, improve our processes, is by questioning them.  Otherwise we'd all still be using V2.5

If someone asked you for a lisp function that made dimension text update automatically as you stretched it, would provide the routine, or point out that associative dimensioning accomplishes just that?  I'm just taking that same concept to every other aspect of the program.  

While "each has his own way" may be "politically correct", it completely ignores the FACT that some methods really are more efficient than others.  This may not be that case, but "bounce checking" methods from time to time is nearly always profitable in some form or another.

AVCAD

  • Guest
Layout Tabs
« Reply #19 on: February 10, 2005, 11:32:19 AM »
Quote from: CADaver
Quote from: AVCAD
... does away with having layers on and off in the VP...
"THE" viewport?? as in one?  You only have one VP per drawing?

No some drawings have Multiple Vp's...enlarged room plans mostly.

Quote from: AVCAD
which is another petpeave of mine.
?why?

Just is. I dont like mess.

Quote from: AVCAD

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.
Pardon me, but I haven't a clue what that sentence means.  What do layout tabs have to so with the elements in modelspace??

Ask the architect why they draft laike crap, and leave elements all over the place. I have found elevations there, differant furniture layouts...notes to themselves...things have no purpose what so ever...why..they are architects...ask them. I just clean it up.


Quote from: AVCAD
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....
You're joking, right?

Why would I joke. If you have 3 drawings in one and all three need to be worked on...one one person can work on them then. I just never like the Tabs. I think they are pointless. doesnt make the overall file size of the project anyless, caused me aggrivation when plotting. Yes I know there are programs to help with this, but really when is enough enough with the add-ons... keep it simple. If you can use a script why not. I mean the program that "helps" you print is basically useing a lisp or a script file anyways. So really what is the differance.

I am all for the upgrading and evolving of the CAD programs, but some things well are pointless to me...like the new rev cloud option...draw a box then select it to turn to a cloud...I like the 2002 revcloud withthe thickness to it...are you going to try to flame for that too.

Like I said in my post...though I do use scripts of other reasons. My plotting script jsut doesnt do Plotting it also etransmits the files after they print. Just making my life easier...here print these drawings..use this script...I go get coffee and a doughnut...come back and its done.

I am sure there is a program that does that too, that someone hase probably worked really hard on to code...but why bother when there is script pro.

My rant is done.

I got the code that was needed to make my life alittle more bearable.

Sorry bad mood today!

whdjr

  • Guest
Layout Tabs
« Reply #20 on: February 10, 2005, 11:50:02 AM »
AVCAD,

I'm not trying to tell you the best way for you to work, but if you know someone nearby that uses TABS frequently and could get them to walk you through the benefits of using them I really think you would like them.  If used properly they really do save time.  :)

ronjonp

  • Needs a day job
  • Posts: 7529
Layout Tabs
« Reply #21 on: February 10, 2005, 12:29:14 PM »
Quote
This may not be that case, but "bounce checking" methods from time to time is nearly always profitable in some form or another.


I'll agree with that. :D

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

CADaver

  • Guest
Layout Tabs
« Reply #22 on: February 10, 2005, 01:37:23 PM »
Quote from: AVCAD
No some drawings have Multiple Vp's...enlarged room plans mostly.
So you'll still have to deal with layer control in different viewports.

Quote from: AVCAD
which is another petpeave of mine.
Quote from: CADaver
?why?

Just is. I dont like mess.[/quote]What mess?  A messy drawing has absolutly nothing to do with layout tabs.

Quote from: AVCAD
Ask the architect why they draft laike crap, and leave elements all over the place. I have found elevations there, differant furniture layouts...notes to themselves...things have no purpose what so ever...why..they are architects...ask them. I just clean it up.
But that has nothing at all to do with multiple layout tabs.  


Quote from: AVCAD
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....
Quote from: Cadaver
You're joking, right?
Why would I joke.
Dunno, but my question was about remebering that file T-101 had T-101a, b, & c in it.  I mean that's pretty basic isn't it?


Quote from: AVCAD
I just never like the Tabs. I think they are pointless.
Until you have a road modification that spans 12 miles and 32 sheets.  Then you might see that they work very well for controlling matchlines and saving time when making a similar mod several times over several drawings..  

Or maybe a 3D modle of a 600,000s.f., six level equipment structure.  Then you'll learn to love multiple tabs.


Quote from: AVCAD
doesnt make the overall file size of the project anyless,
When working on models that are 50-60MB, a couple of K for layouts is not worth thinking about.

Quote from: AVCAD
caused me aggrivation when plotting. Yes I know there are programs to help with this, but really when is enough enough with the add-ons... keep it simple. If you can use a script why not. I mean the program that "helps" you print is basically useing a lisp or a script file anyways. So really what is the differance.
The difference is using one that works well with multiple tabs vs. using one that doesn't.  If you have the time to burn, manipulating the supplied files, I guess go ahead.  But we don't have budgets with that kind of fat.

Quote from: AVCAD
are you going to try to flame for that too.
If you think this is a flame, you've not been paying attention.  I'm merely asking you to test your notions before chiseling them in stone.


Quote from: AVCAD
...but why bother when there is script pro.
My point wasn't about Script-pro, I use it as well.  But there are other methods available that work with multiple tabs.


Quote from: AVCAD
I got the code that was needed to make my life alittle more bearable.
untill the next sheet space advancement, anyway.


Quote from: AVCAD
Sorry bad mood today!
When?? Where??  :wink:

CADaver

  • Guest
Layout Tabs
« Reply #23 on: February 10, 2005, 01:38:05 PM »
Quote from: ronjonp
Quote
This may not be that case, but "bounce checking" methods from time to time is nearly always profitable in some form or another.


I'll agree with that. :D
awww man, I HATE it when someone agrees.  Makes me go back and review my position.

Biscuits

  • Swamp Rat
  • Posts: 502
Sort Tabs
« Reply #24 on: February 10, 2005, 02:05:16 PM »
Code: [Select]
;      This routine will sort layout tabs in alpha-numeric order
;
(defun C:TABORDER (/ cnt)
(vl-load-com)
(setq cnt 1)
(foreach lay (acad_strlsort (layoutlist))
(vla-put-taborder
(vla-item (vla-get-layouts
(vla-get-activedocument (vlax-get-acad-object))
)
lay
)
cnt
)
(setq cnt (1+ cnt))
)
(princ)
)


** edit by MST **
Put your code in the code tags. makes it much easier to read. *wink*

Biscuits

  • Swamp Rat
  • Posts: 502
Layout Tabs
« Reply #25 on: February 10, 2005, 02:07:09 PM »
;      This routine will sort layout tabs in alpha-numeric order
;
(defun C:TABORDER (/ cnt)
(vl-load-com)
(setq cnt 1)
(foreach lay (acad_strlsort (layoutlist))
(vla-put-taborder
(vla-item (vla-get-layouts
(vla-get-activedocument (vlax-get-acad-object))
)
lay
)
cnt
)
(setq cnt (1+ cnt))
)
(princ)
)

Biscuits

  • Swamp Rat
  • Posts: 502
Layout Tabs
« Reply #26 on: February 10, 2005, 02:16:25 PM »
Sorry for the double posting. I'm seeing double today. I could sure use a cold one about now.

AVCAD

  • Guest
Layout Tabs
« Reply #27 on: February 11, 2005, 11:41:19 AM »
OK, just we are all aware that I am not nuts in what I say...please download this and check it out for you self and then tell me that the people I get drawings from should be using tabs and the drawing doesnt look like a an A-bomb went off.

And this is one of the better one..

http://www.theswamp.org/lilly_pond/avcad/sample.zip?nossi=1

This all has to do with tabs, If the drawings were split up instead of having everything drawn on top of each other life would be alot simpler.

The whole layer managment system is jsut way WAY out of control. You shouldnt have to have 50 layers turned on or off just to view a simple floor plan and furniture. Maybe 5, 10 at the most..

How hard is it to have a Walls, Doors, Windows, Furn, Plumbing, text, dims, and maybe some misc. layers....

ELOQUINTET

  • Guest
Layout Tabs
« Reply #28 on: February 11, 2005, 01:22:14 PM »
maaaan that is too funny i feel for ya avcad. don't feel insulted cadaver will argue about paperspace til the cows come home. i think it comes down to your discipline. i do fabrication so there's no way i could break a job down with seperate files. i project my details off of my elevations too so when i adjust one the other automatically updates, can't do that with multiple files. to each his own i say

ronjonp

  • Needs a day job
  • Posts: 7529
Layout Tabs
« Reply #29 on: February 11, 2005, 01:30:11 PM »
Looks like those architects need a talk about "XREFS".   :D

Sorry you gotta look a that mess :(

Ron

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC