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:prevsheet)) " ");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.
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.
how to get sheet number of currently opened drawing from autocad electrical using vb.net?
How can i get it?
@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.
Here it is.
Many thanks! Very handy and was a quick fix to something someone asked for.
That's ALWAYS a good thing.
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)?
@dougmcalexander wrote:
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.
You seem to have missed the fact that the exact same title block drawing is working in all the other drawings in this project. It is just the two I added last week that aren't working. If the WD_TB string was too long none of them would work, right?
And is often the case, a clear head on a Monday (on Tuesday) morning helps. I had failed to update the template file the new drawings were created from. Swapping the block out didn't work, but deleting it and purging before reinserting did. All is fixed now.
Thanks!