Wednesday, January 16, 2013

Company Wire Numbering - Advancing Wire Numbers By One

This was posted on the Autodesk's Electrical Discussion Group. <<AutoCAD Electrical's Discussion Group>>

Someone needed to customize the numbering to match their company's standard. I decided to tackle this to show how flexible Electrical can be with a little customizing. Well... that and I love a good challenge.

  • We make our line reference numbers the sheet number with 000 and increment by 10 for each rung ( The first three rungs on sheet two would be 2000, 2010,2020…).
  • Our components are set up like %F%S%N and always end with a zero (i.e FU2010, PB2010, CB2010...) unless there are two components with the same Family prefix on the same line, then the they increment by one (i.e. PB2010, PB2011, PB2012...).
  • The wire numbers never end with a zero and the wire number increment with respect to the Line Reference number. -Ex.So on first rung of sheet two the wire numbers would be 2001,2002, 2003 and rung 3 would be 2031,2032, 2033. (It needs to be something like %S%N but the %N needs to increment.)

ACADE seems to only add prefixes to the the end of Line reference numbers. Is there anyway to increment the wire number?

image   image

The real problem is advancing the wire numbers and components. Electrical will only ADD to the end wires numbers and tag names. I started doing some testing and one thing let to another. Here is my work around to this limitation. As always I welcome comments and suggestions if you see better ways to do anything.

The Ladder

I decided to back off the reference number from say 010 to simply 01. Then I will add my own 0 as simple text. This way my reference number is really 01 and not 010. Then I can add the last number as my suffix. Since we are going to modify the MLR or Main Ladder Reference block I went with User Block in the Drawing Format settings.

WD_MLRHXThe block name is WD_MLRHX. I modified mine to look like this.... Note the "0" behind the N. that is simply text. I should also note that 0,0 is the start point of the first rung. So keep the attributes off to the left a bit or they will end up right over the line.

SHEET is the sheet (%S) value and RUNGFIRST is the first (%N) reference number





Next place a ladder. Note the lack of zeros on the rung numbers below the first one. This is because only the first number is actually a block. The others are only text. I added a zero and then patterned it.

First Ladder     Adding a new zero    array of zeros



Looking back it would have been better to put the zero inside of a block. Then it would have been included in the numbers below. If there are any blocks inside of the MLR block, that block is pushed down automatically to the other rows.




The Properties

The trick is not forgetting all the places you need to add the extra 0 to the reference numbers.

For Components we only need %S%N because the Suffix will pick up the 0.

However for Cross-Reference we need to add the 0 for the rung reference.
Cross Reference

For Wire Numbers we setup the same as Components but advance the Suffix by one.

Set the default ladder wires to a wire type with numbering set to No. Otherwise the first bus line will receive a number and screw up the first rung.
image           And there you have it.image


  1. Thank you very much for this blog. As you said it is quite involved.

    It would be great to have the line references automatically generate that extra '0' using the block. Could you expand on this statement and how to do it? How and where to insert the '0' block.

    "Looking back it would have been better to put the zero inside of a block. Then it would have been included in the numbers below. If there are any blocks inside of the MLR block, that block is pushed down automatically to the other rows."

    Ive tried it and it automatically generates the '0' but it doesnt place it in the right place.

    Thanks again for the post.


  2. I am working on a "How the Ladder's MLR block/script works" post. Until then place place your "0" inside of a block before creating the MLR block. Make sure the insertion point of the "0" block is relative to the insertion point of the MLR's insertion point. The block you create will be pushed over to the left of the MLR's insertion point. You may have to play with the internal blocks insertion point until it lands correctly.
    I'll try to get the ladder post up this week sometime.

  3. Here is the path to the "How the Ladder's MLR block works"