So, I have this drawing with over 200 layout tabs. (I do shop drawings for a cabinet/countertop manufacturer, and we do one drawing per project.) Here's the thing... I need to eliminate pages 1, 6, 14, 20, 24, 30, 40, 44, 47, 56, 61, 64, 73, 78, 81, 90, 95, and 101 because they are now NOT a part of the project.
Here's why that is a problem:
In my title block, I have the layout name as a field, so it says "PG [layout tab name]/224" which is needed because there's a table of contents for the pages that are printed.
Is there any easy eay to renumber all the tabs, or am I stuck re-numbering every single one?
Solved! Go to Solution.
Solved by pendean. Go to Solution.
Solved by steven-g. Go to Solution.
Will this work...Rename the unneeded tabs to Not Used-1, Not Used-6, etc, delete the viewports from those layouts,and now your Title Block shows the Table of Contents with layouts as Not Used-1, etc?
Just an idea.
m
Is there an automatic way with AutoCAD (full version)? I have AutoCAD at home (not student version - we had the scary plot stamp stuck in our office for awhile from a temp worker on a laptop - YIKES). Maybe I could open it into AutoCAD and save and then open it back up in LT. Any suggestions there?
If you have access to AutOCAD, you can post in the Customization Discussion area for an automation customization:
http://forums.autodesk.com/t5/Visual-LISP-AutoLISP-and-General/bd-p/130
Your original post, repeated there, would be plenty of info to share (with the screenshot).
The layout command will allow you to rename a tab layout, so a simple script would do the job, in windows notepad create a simple command matrix as follows
layout r 1 1
layout r 2 2
layout r 3 scratch
layout r 4 3
layout r 5 4
layout r 6 scratch1
layout r 7 5
layout r 8 6
layout r 9 scratch2
layout r 10 7
this gives you a logical view of which layouts need to alter ,the first 2 layouts in the example are fine (the "r" is for rename)
then split this matrix up into individual lines as shown below, make sure there are no spaces anywhere even at the end of a line (the very last line should be a blank line).
script-----
layout
r
3
scratch
layout
r
4
3
layout
r
5
4
layout
r
6
scratch1
layout
r
7
5
layout
r
8
6
layout
r
9
scratch2
layout
r
10
7
script-----
Save the file with an extension scr ("Rename.scr"). Look in the help files for how to run a script in autocad, but you can just drag it onto the autocad window from windows explorer. In the example I started with tabs 1-10 and finished with 1-7 plus 3 tabs called scratch* then just delete the scratch files. Create a test drawing with 10 tabs to try it and whenever you run a script like this I would advise doing it on a copy of a file just in case of errors.
I'm all for autoamtion when it saves time, but for a one-off and at over 99 layouts to delete and rename, it would probably be quicker to manually do so that wrting a script out in full like that IMHO.
Right-click a layout, delete.
Double-click a layout, type in new name.
So much quicker for a one-off 99 layout renaming and deletion project.
Either way, if you are going to suggest a fix, go all the way and not partial to only suit your needs. The OP wishes to delete as well as rename, so the script would be more accurately represented like this:
layout
delete
1
layout
rename
2
1
layout
rename
3
2
layout
rename
4
3
layout
rename
5
4
layout
delete
6
layout
rename
7
5
and so on all the way to layout number 99.
Either way, if you are going to suggest a fix, go all the way and not partial to only suit your needs. and what would my needs be.
I was under the impression the discussion groups were to encourage discussion and give people assistance in finding solutions. It's very easy to say it can't be done and then later come back and say I can do it better when someone else offers a suggestion. I will humbly admit to an oversight on my part for completely missing the delete option, but I was concentrating on the rename part of the question. And indeed I could have gone the whole way and written the whole script and posted it here, but my intention was to show a method that exists and works. And as a matter of fact and not opinion It actually took me just under 2 minutes to complete the script for 201 tabs, I use excel to automate scripts regularly, If it was something that the OP does regularly, and has excel, that could be reduce down to one excel cell to hold the number of tabs in a drawing then a list of the tab numbers to be removed. (rough guess for the example given 20 seconds)
There is a fair amount of "arm waiving" advise being dished out around here, and while some new members may be able to figure it out eventually on their own, we 'regular' contributors should do less of that and be more deliberate and focused with out contributions. No one's perfect, I do the shortcut answer too sometimes, but you got to try and assume anyone seeking help is not sure how to proceed.
>>>... It actually took me just under 2 minutes to complete the script for 201 tabs, I use excel to automate scripts regularly,...<<<
More arm-waving answers do no one any good.
OK I understand what you mean, but how far should you take it, as I suggested I tend to look at this as offering people a direction to look into, there are too many people on forums saying 'do this for me' who are incapable of doing anything without full blown tuorials on how to draw a yellow line, and tommorrow they come back and ask what if I need it to be red. The OP in this case picked up on the layout command and will use it as they see fit, with or without the script. Which I would say is a good result. And what you call 'arm waiving' I prefer to think of as dropping subtle hints to people who are genuinely looking to learn, ---Here is more arm waiving--- I could have posted a fully working excel spread sheet that would allow the OP to automate the process as I indicated, but that is how I would do the same job myself and is probably something the OP wouldn't even look at. And if anyone picks up on it and wishes the discussion to go in that direction then so be it.
This was awesome! Saved me a lot of time. Instead of re-naming the tabs I didn't need then deleting them, I just directly deleted them.
layout
r
11
13
layout
d
A1
layout
r
10
12
Thank you for your help though!
Great advice, going to save me a lot of time in the future.
One thing to note, my tab names have spaces in them:
e.g. Layer-E1 Rev-T1
By using the syntax:
layer
rename
"Layer-E1 Rev-T1"
Layer-E1-Rev-T1
the " " fixes the issue with spaces in the script.
I also used CONCAT command in Excel which helped me to write a script.
https://support.office.com/en-us/article/concat-function-9b1a9a3f-94ff-41af-9736-694cbd6b4ca2
(...)It actually took me just under 2 minutes to complete the script for 201 tabs, I use excel to automate scripts regularly, If it was something that the OP does regularly, and has excel, that could be reduce down to one excel cell to hold the number of tabs in a drawing then a list of the tab numbers to be removed. (rough guess for the example given 20 seconds)
Thank you for this, very useful to know and worth the effort in my opinion.
In my case I didn't need to remove spaces or enter the commands on seperate lines. I just generated my layout numbers in Excel, saved as .txt file, renamed to .scr and then it was ready to use.
I replying to an old post, so technology may have moved on!
@steven-g @pendean This is 8 years after the two of you offered solutions to an issue that I'm having very similar problems to. I have about 40 layout tabs to delete and 40 other tabs to delete. There area bout 45 layouts that will neither be deleted or renamed. I saw you were referring to writing a script in notepad or excel and use it to delete or rename tabs; I'm not familiar with this process at all if you could please shed some light on how to execute the script.
Thank you for the info you've already supplied in the first forum
Several good questions, and the most pertinent one is that I navigated here from google and didn't realize it was an Autocad LT board. I'm on Civ3d, but it may be possible that the command works across both platforms. This is one drawing that contains roughly 125 tabs of which 40 need to be deleted and 40 need to be renamed.
And I know that it may not be the most effective use of time in this instance I absolutely think it will be beneficial in future instances.
Can't find what you're looking for? Ask the community or share your knowledge.