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: 

Modifying SHEETMAX to use multiple digits - AutoCAD Electrcial 2014

3 REPLIES 3
Reply
Message 1 of 4
JCard
528 Views, 3 Replies

Modifying SHEETMAX to use multiple digits - AutoCAD Electrcial 2014

I have different title blocks for differing clients, some use "SHEET of SHEETMAX" in them.

I want to be able to have my SHEET (%S) values as 2, 3 or 4 digits (ie; 01, 02, 03, etc; or 001, 002, 003, etc.), and my SHEETMAX values also be 2, 3 or even 4 digits if needed to match the SHEET leading zero configuration used in the SHEET value.

Also, is this something that can be set by global variables in the env files for different customers/standards?

SHEETMAX appears to only count the number of DWG files in a project and return that value as a single digit for projects with 1-9 drawings.

 

If I have 9 drawing sheets in my project with SHEET values of 001, 002, etc. then I want my SHEETMAX value to return 009 as it's value and not simply as 9.

 

I know about how to resequence the drawing set using the Title Block Update Utility dialog and having the checkbox checked for updating the SHEETMAX and can manually set that value there. But I was wondering if this value can be returned to match the %S number of digits with the correct number of leading zeros.

 

 

In the "default.wdt" file (lines 30-32) it explains how these preconfigured attributes are used.

 

;;   = SHEET for AE CONFIG's sheet value (the %S value)
;;   = SHEETMAX for count of dwgs in the current project (ex: the "N"
;;       value in title block "SHEET x of N")

 

 

Any insight to if this can be accessed and modified with LISP or other tools is appreciated for conversation.

 

 

 

JCard
Electrical Designer
Logical Systems, LLC
3 REPLIES 3
Message 2 of 4
rhesusminus
in reply to: JCard

Hi.

Not a solution, but a simple workaround....
When you run the Titleblock Update function, you can always just typ "009" into the sheetmax textbox...

I'll take a look into automating the process...

Trond Hasse Lie
AutoCAD Electrical and EPLAN expert
Ctrl Alt El
Please select "Accept Solution" if this post answers your question. 'Likes' won't hurt either. 😉
Message 3 of 4
JCard
in reply to: JCard

Already thought of that solution...Smiley Happy

 

I was thinking that you could use LISP to maybe get the length of the project drawing total returned and then compare it to the SHEET (%S) string length value and then provide some calcs and concatenate the number of leading "0" values to the drawing total......thinking, just don't have much time right now to devote to trying....

 

let me know if you do come up with something though....

 

Thank you,

JCard
Electrical Designer
Logical Systems, LLC
Message 4 of 4
rhesusminus
in reply to: JCard

 

Lisp isn't my favorite programming language, but here's something that works.

 

My WD_TB attribute contains this (You may need to use the property palette to add this long string to the WD_TB attribute):

 

3 = SHEET;4 = SHEETMAX;4 = "(setq SelectionSet (ssget "_X" '((0 . "INSERT")(2 . "TitleBlock"))))(setq Entity (ssname SelectionSet 0))(setq SheetNo(c:wd_getattrval Entity "3"))(setq SheetMax(c:wd_getattrval Entity "4"))(setq NewSheetMax "")(setq NumberOfZeros (- (strlen SheetNo)(strlen SheetMax)))(if (> NumberOfZeros 0)(repeat NumberOfZeros (setq NewSheetMax (strcat NewSheetMax "0"))))(setq NewSheetMax (strcat NewSheetMax SheetMax))"

 

3 is the attrbiute tag for my SheetNo attribute

4 is the attribute tag for my SheetMax attribute

TitleBlock is the block name for my title block

 

Just change these to whatever you use in your title blocks.

 

This program gets the length of the Sheet-attribute and the length of the MaxSheet attbiute, and just add the appropriate number og preceding zeroes. (Well... If the Sheet number is LONGER than the SheetMax number that is).

 

Hope you get it to work.

 

 


Trond Hasse Lie
AutoCAD Electrical and EPLAN expert
Ctrl Alt El
Please select "Accept Solution" if this post answers your question. 'Likes' won't hurt either. 😉

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

Post to forums  

Autodesk Design & Make Report

”Boost