Titleblock Update - Previous / Next Sheet Numbers - AutoCAD Electrical

  • Oh no! An error has occurred!
  • You need to be logged in to do that.
  • You need to be logged in to do that.
  • You need to be logged in to do that.
  • You need to be logged in to do that.
  • You need to be logged in to do that.
  • You need to be logged in to do that.
  • You need to be logged in to do that.
  • You need to be logged in to do that.
  • You need to be logged in to do that.
  • You need to be logged in to do that.
  • You need to be logged in to do that.
  • You need to be logged in to do that.
  • You need to be logged in to do that.
  • You need to be logged in to do that.
  • You need to be logged in to do that.
  • You need to be logged in to do that.
  • You need to be logged in to do that.
  • You need to be logged in to do that.
  • You need to be logged in to do that.
  • You need to be logged in to do that.
  • You need to be logged in to do that.
  • You need to be logged in to do that.
  • You need to be logged in to do that.
  • You need to be logged in to do that.
  • You need to be logged in to do that.
  • You need to be logged in to do that.
  • You need to be logged in to do that.
  • You need to be logged in to do that.
  • You need to be logged in to do that.
  • You need to be logged in to do that.
  • You need to be logged in to do that.
  • Coinciding with the acquisition of VIA Development, Nate joined Autodesk in March of 2003 after a decade stint as an entrepreneur following a two-decade stint as a controls engineer and software applications developer at Owens-Corning. Nate is now the lead product architect for AutoCAD Electrical. He loves this stuff.

    About Nate

Latest Post

  • Titleblock Update - Previous / Next Sheet Numbers - AutoCAD Electrical
    April 13, 2007, 05:16 AM Nate Holt

    One of the lower-tech tasks that AutoCAD Electrical can do so well is title block update of a project drawing set. You map data like project name, sheet number, drawn by, and so on to various attributes carried on your standard drawing title block. You can set up this mapping either internally on the title block itself (using an invisible WD_TB attribute) or through an external ".wdt" mapping text file. Both methods are outlined in the AutoCAD Electrical on-line help.

    Taking it to the next level

    But here's the rub. Maybe you want to do something a bit more sophisticated than just map project and drawing values to the title block. For example, let's say you not only want to show the drawing's assigned SHEET number, but you also want the title block to include the previous and next drawing's SHEET number assignments.

    This close-up of the title block is for sheet number "14". But you can tell that the drawing immediately preceding this drawing and the next drawing after it have been assigned sheet numbers 8 and 15 respectively. You want the title block update to be "smart enough" to go to the previous and next drawings in the project sequence and pull out some info to put on to the current drawing's title block.

    tbnp01.PNG

    So, how can we get AutoCAD Electrical to figure these out and map the values to attributes on the current drawing's title block? The key is in the mapping. AutoCAD Electrical allows us to embed an AutoLisp expression in our mapping file and link it to a title block attribute. The returned value from this expression gets inserted as a text value on to the target attribute.

    Here's how we can do this

    First we make sure that our title block has the extra target attributes. The exploded title block is shown below. We've set up attribute name "PREV" for the previous drawing's sheet number and "NEXT" for the next drawing's sheet number. Simple enough so far.

    tbnp02.png

    AutoLisp functions called from Title Block mapping

    Here's the fun part. We create a small AutoLisp function to pull out the "previous" drawing's SHEET value and a second lisp routine to pull out the "next" drawing's SHEET value. Here's the "next" sheet number function shown below (the "previous" function is identical except the index is decremented instead of incremented).

    tbnp05.png

    AutoCAD Electrical maintains a global variable GBL_wd_prj_ixlst that carries a "list of lists" of various data for the drawings defined in the active project. One of these lists is a list of SHEET number assignments for all the drawings in the project. This is what each Lisp utility will access to find the "previous" and "next" drawing sheet number assignments.

    Setting this up in your title block attribute mapping
    Here's a little bit of what the ".wdt" file might look like. The left-hand side is the target attribute name, the right-hand side is "what" gets written to that attribute.

    tbnp06.png

    The above in RED is what the set of two entries would look like in a title block ".wdt" attribute mapping file. If you use the self-contained WD_TB attribute method, the encoded strings would look pretty much the same (except semi-colon delimited - see the on-line help).

    Running it

    Download the lisp file here and copy it to a folder that is somewhere in your ACAD search path.

    Select the Project Utilities option from the project manager or from the pull-down menu or project toolbar fly-out.

    tbnp03.png



    Toggle the "Update Title Block" option and make selections on the detailed sub-dialog that appears.

    tbnp04.png


    Select the drawings to process and hit OK. That should do it. Each drawing should get the previous and next sheet number assignments included in the title block.

    1 Comment | Add Comment Controlling the Machine > All

Comments



You must be logged in to post a comment.

Subscribe to Blog

Want to keep up with the latest? Subscribe to the RSS feed today.

RSS

Tags

You must be logged in to add a tag.

Send to a Peer

You must login to share pages.

Feedback

Tell us what you think of the site.

Send Feedback