AutoCAD Electrical General Discussion

AutoCAD Electrical General Discussion

Reply
*Expert Elite*
dougmcalexander
Posts: 3,216
Registered: ‎10-18-2003
Message 21 of 32 (600 Views)

Re: Next Sheet Number

02-07-2013 11:46 AM in reply to: iomaxx

That looks very similar to mine but my lisp routine is named tbnp.lsp and mine handles previous sheet and next sheet.  It adds the previous sheet value to the PREVSHEET attribute in the titleblock and the next sheet value goes to the NEXTSHEET attribute in the titleblock.

 

The following is added to the end of the WD_TB attribute.  Must have the semicolon as a delimiter.

 

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

 

Be sure your lisp file is named the same as the call from your WD_TB.

 

If there is a smiley face in the code string above that is caused by this forum.  The smiley face should be a colon followed by the letter p.

Doug McAlexander
Independent Consultant/Instructor/Mentor specializing in AutoCAD Electrical, ecscad, and promis-e implementation

Web site: www.ECADConsultant.com
Phone: (770) 841-8009

Please Accept as Solution if I helped you. Kudos are also much appreciated.
Distinguished Contributor
iomaxx
Posts: 178
Registered: ‎03-03-2006
Message 22 of 32 (597 Views)

Re: Next Sheet Number

02-07-2013 11:47 AM in reply to: dougmcalexander

after looking closer, i found it.

what's listed is missing a ( before the PROGN. it should show as

 

(IF (SETQ X (FINDFILE "TITLEBLOCK UPDATE.LSP"))(PROGN(LOAD X)(C:NEXTSHEET)) " ")

 

then it works.

 

thanks for the look Doug.

 

Active Contributor
kani_mca
Posts: 43
Registered: ‎02-07-2013
Message 23 of 32 (587 Views)

Re: Next Sheet Number

02-07-2013 10:26 PM in reply to: mako68

how to get sheet number of currently opened drawing from autocad electrical using vb.net?

How can i get it?

Valued Mentor
drathak
Posts: 490
Registered: ‎05-21-2008
Message 24 of 32 (459 Views)

Re: Next Sheet Number

10-28-2013 10:54 AM in reply to: eric.powell

eric.powell wrote:

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

 

Thanks!!


Same here.

--------------
Joe Weaver
Principle Associate Engineer - Nashville Electric Service
P&C Committee Chair – SDS Industry Consortium
*Expert Elite*
rhesusminus
Posts: 949
Registered: ‎09-21-2007
Message 25 of 32 (445 Views)

Re: Next Sheet Number

10-29-2013 01:51 AM in reply to: iomaxx

Here it is.

 

 


Trond Hasse Lie

ECAD Consultant, CtrlAltEl

Please select "Accept As Solution" if this post answers your question. Kudos don't hurt either. ;-)
Valued Mentor
drathak
Posts: 490
Registered: ‎05-21-2008
Message 26 of 32 (407 Views)

Re: Next Sheet Number

11-04-2013 01:38 PM in reply to: rhesusminus

Many thanks!  Very handy and was a quick fix to something someone asked for.

 

That's ALWAYS a good thing.

--------------
Joe Weaver
Principle Associate Engineer - Nashville Electric Service
P&C Committee Chair – SDS Industry Consortium
Valued Mentor
drathak
Posts: 490
Registered: ‎05-21-2008
Message 27 of 32 (311 Views)

Re: Next Sheet Number

01-16-2014 01:34 PM in reply to: drathak

Well this has been working just fine until today.  I've added two new drawings and neither of them will update the Next/Prev attributes.

 

I've checked and they are the same title block as others that do still work.  Even exploded it to check that the code is indeed in the WD_TB attribute.  Nothing else I know of has changed.  Any ideas what might cause this to not work on a particular drawing(s)?

--------------
Joe Weaver
Principle Associate Engineer - Nashville Electric Service
P&C Committee Chair – SDS Industry Consortium
*Expert Elite*
rhesusminus
Posts: 949
Registered: ‎09-21-2007
Message 28 of 32 (304 Views)

Re: Next Sheet Number

01-16-2014 04:27 PM in reply to: DBrohm
Check the contents of the WD_TB attribute before you explode the block.
You might have hit the roof on the length of the attribute text...

Trond Hasse Lie

ECAD Consultant, CtrlAltEl

Please select "Accept As Solution" if this post answers your question. Kudos don't hurt either. ;-)
*Expert Elite*
dougmcalexander
Posts: 3,216
Registered: ‎10-18-2003
Message 29 of 32 (300 Views)

Re: Next Sheet Number

01-16-2014 04:35 PM in reply to: DBrohm
Good point Bob. I thought he had said he checked that but if he used Enhanced Attribute Editor there is a limit. Try using Properties when entering a long string of mapping data.
Doug McAlexander
Independent Consultant/Instructor/Mentor specializing in AutoCAD Electrical, ecscad, and promis-e implementation

Web site: www.ECADConsultant.com
Phone: (770) 841-8009

Please Accept as Solution if I helped you. Kudos are also much appreciated.
Valued Contributor
pjfontes
Posts: 98
Registered: ‎03-17-2008
Message 30 of 32 (276 Views)

Re: Next Sheet Number

01-18-2014 10:45 AM in reply to: kani_mca
What the heck is LISP? :smileyhappy:

To get the current sheet In VB.Net:
On the active drawing look in the (hidden) WD_M block. The SHEET attribute of the WD_M block is the value for the currently opened sheet.

'Next/Prev Sheet' Ids can then be found by looking in the .WDP file.
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Need installation help?

Start with some of our most frequented solutions to get help installing your software.

New AutoCAD Electrical Category!

The AutoCAD Electrical forum has moved into it's very own category page, and can no longer be found within the Additional Product Forums.

Announcements
Manufacturing Community
The Manufacturing Community provides additional access to tips, tutorials, blogs and networking with peers.