AutoCAD Electrical Forum
Welcome to Autodesk’s AutoCAD Electrical Forums. Share your knowledge, ask questions, and explore popular AutoCAD Electrical topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Next Sheet Number

31 REPLIES 31
Reply
Message 1 of 32
DBrohm
3293 Views, 31 Replies

Next Sheet Number

Good Morning;

The majority of my customers require their title blocks show the current sheet number, for which I utilize the %S variable. Additionally, they want the maximum number of sheets indicated, which is a standard “title block update” function, as we all know. So far easily done.

Where my challenge comes is the odd customer prefers the next sheet number to be displayed in the title block as opposed to the maximum number of sheets. Up to this point in time we have been editing that information manually. Is there a means by which to automatically “calculate” that value based upon the current sheet number or to read the next sheet number from the project database? If there is I am unable to determine what that method would be.

Any suggestions, help would be appreciated.


Doug
31 REPLIES 31
Message 2 of 32
dougmcalexander
in reply to: DBrohm

There is a way to do this. It requires a lisp file be installed into the AcadE main program folder under program files and a special text string to be entered at the end of the WD_TB mapping attribute in your border template. You will need attributes called NEXTSHT and PREVSHT located as desired on the drawing border. I have attached the lisp file. Change the .zip extension to .lsp. Put this under Program Files\Autodesk\Acade 2008 or 2009 or whatever you are running.

Below is the text string you need to add to the end of the WD_TB attribute's value:

;PREVSHT = (if (setq x (findfile "tbnp.lsp" ))(progn(load x)(c:prevsheet)) " ");NEXTSHT = (if (setq x (findfile "tbnp.lsp" ))(progn(load x)(c:nextsheet)) " ")

Note: When I create borders for European customers, I usually place the PREVSHT and NEXTSHT attributes inside arrows so language is not a barrier. I have an arrow pointing left on the left side of the page near the bottom to indicate previous sheet and one facing right on the right side of the page indicating next sheet.


Doug McAlexander


Design Engineer/Consultant/Instructor/Mentor specializing in AutoCAD Electrical training and implementation support

Phone and Web-based Support Plans Available

Phone: (770) 841-8009

www.linkedin.com/in/doug-mcalexander-1a77623




Please Accept as Solution if I helped you. Likes are also much appreciated.
Message 3 of 32
DBrohm
in reply to: DBrohm

First of all thank you very much for your help, the lsp file and attributes work like a charm, this will save not only myself, but my entire group of hardware designers an immense amount of time as we move forward. It has been a large number of years since I was involved in any amount of lsp programming, and even then it was minimal at best. For me to have figured that out on my own would have taken a great deal of time that I do not have. I do not wish to impose on your generosity; however, I do have one question further. What would I need to alter if I needed to have a specific character(s) shown in the “nextsht” attribute as opposed to a black on the final page of a project?

Again many thanks for your help.
Message 4 of 32
mako68
in reply to: DBrohm

Hi,

 

I couldn't get this "previous/nextsheet" lisp work with ACADE2011. Is it so that WD_TB allows max is 256 characters? In that case there is not much space left for other attributes...

 

Regards

Mako

Message 5 of 32
DBrohm
in reply to: mako68

You might want to consider using the “wdt” file method of title block updating that is what we use and thus far no issues that I have found.

Message 6 of 32
dougmcalexander
in reply to: mako68

It works..  Edit WD_TB with Propetties, not Attribute Editor.  Attribute Editor is limited to 256 characters but Properties is not.



Doug McAlexander


Design Engineer/Consultant/Instructor/Mentor specializing in AutoCAD Electrical training and implementation support

Phone and Web-based Support Plans Available

Phone: (770) 841-8009

www.linkedin.com/in/doug-mcalexander-1a77623




Please Accept as Solution if I helped you. Likes are also much appreciated.
Message 7 of 32
chintan0910
in reply to: DBrohm

Hello Dear,

 

My client required Next Sheet number in the title block.

 

I had past tbnp.lsp file on specific location. & I had also update *.wdt file with your specified text string for NEXT SHEET. But while I am using Project-Title block setup-WD_TB att. Method- I can not get NEXTSHT in Drawing properties. So please guide me what can I do ?

 

Please send me the step for the process.

Message 8 of 32
chintan0910
in reply to: DBrohm

Hello Dear,

 

My client required Next Sheet number in the title block.

 

I had past tbnp.lsp file on specific location. & I had also update *.wdt file with your specified text string for NEXT SHEET. But while I am using Project-Title block setup-WD_TB att. Method- I can not get NEXTSHT in Drawing properties. So please guide me what can I do ?

 

Please send me the step for the process.

Message 9 of 32
druida78
in reply to: DBrohm

Hi.

 

What is the way to create a WD_TB mapping attribute?

 

Thanks.

 

Ernesto Fraga

 

I title block update without it and it works but I would like to improve.

 

Ernesto Fraga

Montevideo - Uruguay

Arq. Ernesto Fraga
Montevideo - Uruguay
Message 10 of 32
KevinLi-Autodesk
in reply to: druida78

Hi,

 

Does the way defined in the help document help you to create it ? I capture the screenshot and attach it.

 

 

Regards,

 

Kevin Li

Kevin-Hongyuan Li
Software Quality Assurance Engineer
Design, Lifecycle and Simulation Product Group
Direct: +86 21 2039 6025
Email: Hongyuan.Li@autodesk.com
Autodesk, Inc.
NO. 130, Lane 91, E Shan Rd
Building 12, Floor 6,
Shanghai 200127, PRC
www.autodesk.com
Message 11 of 32
chintan0910
in reply to: DBrohm

Hello Dear,

 

I want next sheet number instead of total sheet number. & there is no topic in help file.

Message 12 of 32

Hi chintan0910,

 

I am sorry to make it confused and unclear for you, i just give my suggestion to druida78's question of how to create WD_TB mapping attribute :).

 

For your question i will take a look at it.

 

Regards,

 

Kevin Li

Kevin-Hongyuan Li
Software Quality Assurance Engineer
Design, Lifecycle and Simulation Product Group
Direct: +86 21 2039 6025
Email: Hongyuan.Li@autodesk.com
Autodesk, Inc.
NO. 130, Lane 91, E Shan Rd
Building 12, Floor 6,
Shanghai 200127, PRC
www.autodesk.com
Message 13 of 32
mako68
in reply to: dougmcalexander

Hi Doug,

 

I'm using WD_TB title block method with PREVSHEET/NEXTSHEET. When I change the SHEETvalue for certain drawing in Drawing attributes and run the title block update it updates the  PREVSHEET/NEXTSHEET but when I change it again and run TB update it will not work anymore..? So for me it works only once in current session. When I close/open ACADE again it works again (...once only).

 

I'm using ACADE2012 (64bit) and the tbnp.lsp you attached to your post

 

Regards

Mako

Message 14 of 32
mako68
in reply to: chintan0910

Has anyone tested this with ACADE2012?

For me it's only works once per currect session...

 

Mako

Message 15 of 32
dougmcalexander
in reply to: mako68

I'm not having any trouble.  It works fine with version 2012 for me.



Doug McAlexander


Design Engineer/Consultant/Instructor/Mentor specializing in AutoCAD Electrical training and implementation support

Phone and Web-based Support Plans Available

Phone: (770) 841-8009

www.linkedin.com/in/doug-mcalexander-1a77623




Please Accept as Solution if I helped you. Likes are also much appreciated.
Message 16 of 32
gak19043
in reply to: dougmcalexander

Hi. I'm just researching ways to have my title block automatically update the sheet number and total numbe of sheets and came across this thread.

 

So far, it seems that even in 2011 AutoCAd has not addressed this issue that seems manu people need. Because everything I've come across so far involves programming and lisp routines and sheet sets and or fileds and attributes and so on and on and on.

 

After reading all of this I still haven't come up with an answer to this probelsm. What is  WD_TB?? Can someone explain that to me? Is that one possible method?

 

I've tried the sheet set and field method but can't seem to get the currentSheetnumber variable to change for me-I got that method by reading that article called "Sheets Happen" (I don't know the author) it is a godd article if you want to know about Sheet sets.

Message 17 of 32
dougmcalexander
in reply to: gak19043

I've been using the method I explained earlier in this thread for the past four releases and it works perfectly.  It also works with the sub-projects I create with Super Project Manager.

 

The WD_TB is a hidden attribute that is inserted into your drawing template when you choose Method 2 under Title Block Setup, while creating the base drawing for your Electrical drawing template.  Follow the 11-step guide on the Tips and Tricks page of www.ECADconsultant.com and add the special string of text that triggers the tbnp.lsp routine to the end of the WD_TB attribute using the Properties command to edit the WD_TB.  The Properties command can handle more than 256 characters of attribute value text.  Add the text string that calls the tbnp.lsp routine to the end of the WD_TB after you have performed step 5 but before step 6.

 

Note: The WD_TB method of title block attribute mapping was added by VIA Development in the last years before Autodesk purchased Wiring Diagram and renamed it AutoCAD Electrical.  So the WD_TB method has existed for quite a long time.  Autodesk added the Title Block Setup Wizard, which makes it easier to setup the WD_TB.  The WD_TB is an improvement over the original .WDT file method because the mapping is contained within the border drawing itself, not a separate file.



Doug McAlexander


Design Engineer/Consultant/Instructor/Mentor specializing in AutoCAD Electrical training and implementation support

Phone and Web-based Support Plans Available

Phone: (770) 841-8009

www.linkedin.com/in/doug-mcalexander-1a77623




Please Accept as Solution if I helped you. Likes are also much appreciated.
Message 18 of 32

Correction:  There does seem to be a problem with new pages that get added to a project..  I have to run AEREBUILDDB prior to executing the Title Block Update in order for the previous and next sheet attributes to get updated.  It seems that 2012 isn't maintaining the database the same as 2011 and previous did.  So if you are using the tbnp.lsp to update previous and next sheet attributes, run the Rebuild Database command before Title Block Update.  You can choose to Freshen Only and that will be enough.  There used to be an icon for Rebuild/Freshen.  Now you have to type AEREBUILDDB at the command line and press enter.  I used the CUI editor to add the Rebuild/Freshen back to my Project panel.  It also comes in handy when you replace drawings in a project from a backup and you want to force the database to update.  I wish Autodesk had not removed the icon.  I have to put it back with each release.



Doug McAlexander


Design Engineer/Consultant/Instructor/Mentor specializing in AutoCAD Electrical training and implementation support

Phone and Web-based Support Plans Available

Phone: (770) 841-8009

www.linkedin.com/in/doug-mcalexander-1a77623




Please Accept as Solution if I helped you. Likes are also much appreciated.
Message 19 of 32

Does anyone else have a copy of this LISP ZIP file?  I try to download it but it says that it is corrupted.

 

Thanks!!

Message 20 of 32
robbm2k
in reply to: eric.powell

one quesiton regarding this, or LISP routines in general.

 

I received a LISP routine to call through the WD_TB attribute similar to what's mentioned here. The LISP file is put in the c:\program files\autodesk\acade 2013 folder but when i run a titleblock update, i get this:

 

Interpreting as AutoLisp: (IF (SETQ X (FINDFILE "TITLEBLOCK UPDATE.LSP"))PROGN(LOAD X)(C:NEXTSHEET)) " ")
Error: syntax error

 

Googling 'syntax error' regarding autocad is pretty vague, anyone have thoughts on what syntax problem is with what i have above?

 

Thanks.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost