1
\$\begingroup\$

When my schematic has several copies of the same circuit, it is a huge pain to go through them all and write C14, C3, C11, C467, etc.

What I would really like is for LTSpice to take the largest number that hasn't been used yet and increase from there.

Does LTSpice offer that feature?

\$\endgroup\$
2
  • 1
    \$\begingroup\$ No it doesn't. It tries to fill in the gaps e.g. if there are C16 and C45 then the newly-added will be C17. \$\endgroup\$ Commented Mar 27, 2023 at 14:05
  • \$\begingroup\$ You can make your duplicated circuit a sub-circuit. Then you will have X1.C14, X1.C15, X2.C14, X2.C15, etc \$\endgroup\$
    – The Photon
    Commented Mar 27, 2023 at 16:09

1 Answer 1

2
\$\begingroup\$

The number identifying a component is known as the Reference Designator, or Instance Name, which you will see as InstName if you Ctrl-right click a component or open the .asc file in a text editor.

The default Reference Designators consist of a letter to denote the component type (R for resistor, C for capacitor, etc.) and a number. The numbers are assigned sequentially starting with 1, but if a component is deleted or its designator is edited manually it's number becomes available and is used for the next component of that type that is added to the schematic. So if you have resistors R1, R2, R3 and R4 and you delete R3 or edit it to something like Rx then the next resistor added will become R3.

One thing I've found helpful when renumbering a schematic is to use the copy feature. Suppose I've got a schematic with R1, R2, R6, R7 and R8 because I've deleted R3, R4 and R5. I want R6 to R8 to now be R3 to R5 so I just copy R6, the copy will be named R3, I delete the original and put the copy in its place, then do the same for R7 and R8. This lets you easily get the next available numbers without having to worry about missing or duplicating one.

Another thing you can do is to edit the .asc file in a text editor (work on a copy to be safe) and search for 'InstName', this will find all of the reference designators which you can then rename to your liking. You just have to be careful not to use duplicate designators.

\$\endgroup\$

Not the answer you're looking for? Browse other questions tagged or ask your own question.