AnsweredAssumed Answered

Can the wire formula include incrementing (A, B, C...) when multiple wires are on the same row?

Question asked by Justin Arseneault on Jul 29, 2016
Latest reply on Oct 5, 2016 by Justin Arseneault

Hello all,

 

I need to have my wires named by page #, row #, and then increment letters if multiple wires are on the same row. For example, wires on page 5 and row 12 would be numbered 0512A, 0512B, and so on. I have tried using variations of the formula given in this discussion: https://forum.solidworks.com/thread/100871

 

I am currently using SW Electrical 2014, so I started with:

ALLTRIM(STR( ( VAL(FIL_TAG)*100 + VAL(SYM_LIN) ), 5, 0)) + COM_ROOT + IIF( COM_NO="1", "", "-" + switch (VAL(COM_NO)-1, "0", "1", "2", "3", "4", "5", "6" ) )

 

With some changes, it works perfectly for my component marks (which are numbered the same way). This is my component formula:

COM_ROOT + STRZ(VAL(FIL_TAG),2,0) + STRZ(VAL(SYM_LIN),2,0) + "-" + switch (VAL(COM_NO)-1, "A", "B", "C", "D", "E", "F", "G" )

 

This is what I am trying to use for my wire formula:

STRZ(VAL(FIL_TAG),2,0) + STRZ(VAL(LIN_LIN),2,0) + "-" + switch (VAL(WIR_NO)-1, "A", "B", "C", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z" )

 

With this wire formula, the letters are incrementing continually instead of restarting on each row. Some wires are also being skipped entirely, though I don't think this is a formula problem.

Anyone know why the formula works for components, but not wires? Is there another formula that would work? Formulas for 2014 are preferred, but if it's harder or just not possible to do this in 2014, I would like to know how it would be done in newer versions.

 

Thank you!

Outcomes