eechema search & replace

Bug #1747037 reported by Franck78
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
High
Jeff Young
Ubuntu
Fix Committed
Undecided
Unassigned

Bug Description

Hello,

The search&replace ignores the field LIBRARY NAME shown on left when you edit a component.

$Comp
L IRF540N Q18 <==== need text editor to search&replace this field "IRF540N"
U 1 1 57D95DEA
P 24650 20050
F 0 "Q18" H 24300 19900 50 0000 L CNN
F 1 "IRL540N" H 24300 19800 50 0000 L CNN
F 2 "TO_SOT_Packages_THT:TO-220_Neutral123_Vertical_LargePads" H 24250 20150 50 0001 L CIN
F 3 "" H 24650 20050 50 0000 L CNN
 1 24650 20050
 1 0 0 -1
$EndComp

The dialog box clearly says : "search all fields' component"

Kicad version 4.0.7

Tags: editing mass
Franck78 (fbourdonnec)
description: updated
Revision history for this message
Wayne Stambaugh (stambaughw) wrote : Re: [Bug 1747037] [NEW] eechema search & replace

This is not a field. Fields begin with F. You are pointing to the name
of the symbol in the library. Change that to a name that doesn't exist
in any library and you will break your schematic.

On 02/02/2018 11:30 AM, Franck78 wrote:
> Public bug reported:
>
> Hello,
>
> The search&replace ignores the field LIBRARY NAME shown on left when you
> edit a component.
>
> $Comp
> L IRF540N Q18 <==== need text editor to search&replace this field "IRF540N"
> U 1 1 57D95DEA
> P 24650 20050
> F 0 "Q18" H 24300 19900 50 0000 L CNN
> F 1 "IRL540N" H 24300 19800 50 0000 L CNN
> F 2 "TO_SOT_Packages_THT:TO-220_Neutral123_Vertical_LargePads" H 24250 20150 50 0001 L CIN
> F 3 "" H 24650 20050 50 0000 L CNN
>  1 24650 20050
>  1 0 0 -1
> $EndComp
>
> The dialog box clearly says : "search all fields' component"
>
> Kicad version 4.0.7
>
> ** Affects: kicad
> Importance: Undecided
> Status: New
>
>
> ** Tags: editing mass
>
> ** Description changed:
>
> Hello,
>
> The search&replace ignores the field LIBRARY NAME shown on left when you
> edit a component.
>
> $Comp
> L IRF540N Q18 <==== need text editor to search&replace this field "IRF540N"
> U 1 1 57D95DEA
> P 24650 20050
> F 0 "Q18" H 24300 19900 50 0000 L CNN
> F 1 "IRL540N" H 24300 19800 50 0000 L CNN
> F 2 "TO_SOT_Packages_THT:TO-220_Neutral123_Vertical_LargePads" H 24250 20150 50 0001 L CIN
> F 3 "" H 24650 20050 50 0000 L CNN
> - 1 24650 20050
> - 1 0 0 -1
> +  1 24650 20050
> +  1 0 0 -1
> $EndComp
>
> The dialog box clearly says : "search all fields' component"
> +
> + Kicad version 4.0.7
>

Changed in kicad:
status: New → Invalid
Revision history for this message
Franck78 (fbourdonnec) wrote :

For god's sake, can you adopt the users's viewpoint ???

It IS a field from the component, that is a fact.

Anything embedded inside $Comp $Endcomp is.

Now why would I want that ?

Simply because during for example an upgrade of the libraries, some changes are made.

xyz_RESCUE_from_abc ? Ring a bell (project_rescue.cpp) ?

And what happens if I decide to replace say all 74LS240 by 74LS241.....
Nothing good. LS241 on the screen , LS240 from the lib.
Half the job done.

Revision history for this message
jean-pierre charras (jp-charras) wrote :

It IS *not* a field from the component, this is also a fact.

And there is a specific LIBRARY NAME ((LIB_ID) editor in Eeschema especially designed for that, just because it is not a field in the current Eeschema version.
(Edit/Edit Symbol Library Link)

Frank, ne vous comportez pas comme un enfant gaté.

Revision history for this message
Seth Hillbrand (sethh) wrote :

Hi Franck-

Please remember that people are volunteering their time to help you.

It sounds like you would like a new feature in Eeschema where you can globally update one Library Symbol with another.

Right now, you can edit the symbol one at a time, and change the symbol, which will adjust the line you are pointing to. But this is one symbol at a time.

We could change this ticket to a feature request for a global symbol search/replace. But it can't fall under the Find/Replace dialog for the reason Wayne mentioned.

Revision history for this message
Wayne Stambaugh (stambaughw) wrote : Re: [Bug 1747037] Re: eechema search & replace

On 02/02/2018 01:53 PM, Seth Hillbrand wrote:
> Hi Franck-
>
> Please remember that people are volunteering their time to help you.
>
> It sounds like you would like a new feature in Eeschema where you can
> globally update one Library Symbol with another.
>
> Right now, you can edit the symbol one at a time, and change the symbol,
> which will adjust the line you are pointing to. But this is one symbol
> at a time.
>
> We could change this ticket to a feature request for a global symbol
> search/replace. But it can't fall under the Find/Replace dialog for the
> reason Wayne mentioned.
>

It could be done with the search/replace dialog if
SCH_COMPONENT::Matches() is modified to search for it and
SCH_COMPONENT;:Replace() is written. It would also require adding a
checkbox in the search/replace to include/exclude the symbol library
identifiers. In v4 this would be less complicated. With the the fully
qualified library IDs used in v5, the replace may be tricky. You could
potentially break every symbol link in your schematic with a poor search
and replace.

Revision history for this message
Franck78 (fbourdonnec) wrote :

my initial concern was just to get rid of the *RESCUE-* components created after a lib upgrade.

And now, correct me if i misunderstand what you say Wayne, replacing a component by another one is not implemented in eeschema V5 ?

Say you used 2N2222 x times and decides to use a 2N3055 instead, you cannot do that (s&r) without deleting the component (and loosing all particular values) ?
Or replacing a totem-pole TTL by its open collector version ?

If so, well, just extend the S&R dialog with a call to the Add Component dialog to pick an existing component from the lib.

Franck

Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

On 02/02/2018 03:42 PM, Franck78 wrote:
> my initial concern was just to get rid of the *RESCUE-* components
> created after a lib upgrade.

The rescuer does this to prevent symbol name clashes in other libraries.

>
> And now, correct me if i misunderstand what you say Wayne, replacing a
> component by another one is not implemented in eeschema V5 ?

In v5, just using the symbol name is no longer valid. Both the library
nickname and the symbol name are require. In the schematic file you
will see something like LIB_NAME:SYMBOL_NAME instead of just
SYMBOL_NAME. This will complicate the search/replace feature if we
decide to implement this. The problem becomes what do you replace, the
library nickname, the symbol name, or both?

>
> Say you used 2N2222 x times and decides to use a 2N3055 instead, you cannot do that (s&r) without deleting the component (and loosing all particular values) ?
> Or replacing a totem-pole TTL by its open collector version ?

These examples would only require changing the value field name not the
symbol used in the schematic which you can already do. Please keep in
mind that for symbols like transistors and logic gates there is a single
symbol with many aliases so your are not really using a different
symbol, you are using a different alias for that symbol. Aliases are
just a different name and information for the symbol graphical symbol.

>
> If so, well, just extend the S&R dialog with a call to the Add Component
> dialog to pick an existing component from the lib.

The feature request would be "Change library symbol link name using
search and replace dialog."

>
>
> Franck
>

Revision history for this message
Franck78 (fbourdonnec) wrote :

Thank you for the explanation Wayne.

eechema is a schematic editor with the only uniqur main goal to pick component and wire them.

You are telling us than searching and replacing the most central thing in this editor (the component) is just not implemented.

I design something and decide for example that 16 outputs stages would be better with a MOSFET than the initial BJT choice and...... nothing.

Worst than that, editing a gate (unit of one component ) with 'E' will definitively mess up your schematic.
You expect when changing from 74LS08 to 74LS00 the FOUR gates being updated.
V or E commands are useless.

SO
"Change library symbol link name using search and replace dialog."
should be
"Basic replacement of component" first then "S&R component"

Say differently, something is incomplete with the way you handle VALUE & COMPONENT_NAME editions.
Sometimes it's a strong one to one relation eg VALUE is allways a copy of COMPONENT_NAME
Sometimes the component have it's VALUE as independant property (resistor, caps,....)
Sometimes all units are strongly identical (74LS00), maybe not for a FPGA.

Revision history for this message
Jeff Young (jeyjey) wrote :

This is Exchange Footprints for Symbols, right? Why would we want to go to Find/Replace for that?

Seems like we should just implement Exchange Symbols. (Update Symbols is automatic in eeschema, right?)

Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

This is actually changing the symbol library name of the schematic
symbol using S&R rather than the edit schematic symbol dialog which
means they have to be changed one symbol at a time.

On 02/03/2018 12:14 PM, Jeff Young wrote:
> This is Exchange Footprints for Symbols, right? Why would we want to go
> to Find/Replace for that?
>
> Seems like we should just implement Exchange Symbols. (Update Symbols is
> automatic in eeschema, right?)
>

Revision history for this message
Jeff Young (jeyjey) wrote :

Yeah, I probably wasn’t clear enough. Pcbnew now has a Change Footprints on the Edit menu which allows you to say which Footprints you want to change (those matching value, matching footprintID, etc.). If we had a Change Symbols equivalent in Eeschema, then you wouldn’t need to use S&R.

> On 3 Feb 2018, at 17:35, Wayne Stambaugh <email address hidden> wrote:
>
> This is actually changing the symbol library name of the schematic
> symbol using S&R rather than the edit schematic symbol dialog which
> means they have to be changed one symbol at a time.
>
> On 02/03/2018 12:14 PM, Jeff Young wrote:
>> This is Exchange Footprints for Symbols, right? Why would we want to go
>> to Find/Replace for that?
>>
>> Seems like we should just implement Exchange Symbols. (Update Symbols is
>> automatic in eeschema, right?)
>>
>
> --
> You received this bug notification because you are a member of KiCad Bug
> Squad, which is subscribed to KiCad.
> https://bugs.launchpad.net/bugs/1747037
>
> Title:
> eechema search & replace
>
> Status in KiCad:
> Invalid
>
> Bug description:
> Hello,
>
> The search&replace ignores the field LIBRARY NAME shown on left when
> you edit a component.
>
> $Comp
> L IRF540N Q18 <==== need text editor to search&replace this field "IRF540N"
> U 1 1 57D95DEA
> P 24650 20050
> F 0 "Q18" H 24300 19900 50 0000 L CNN
> F 1 "IRL540N" H 24300 19800 50 0000 L CNN
> F 2 "TO_SOT_Packages_THT:TO-220_Neutral123_Vertical_LargePads" H 24250 20150 50 0001 L CIN
> F 3 "" H 24650 20050 50 0000 L CNN
> 1 24650 20050
> 1 0 0 -1
> $EndComp
>
> The dialog box clearly says : "search all fields' component"
>
> Kicad version 4.0.7
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/kicad/+bug/1747037/+subscriptions

Revision history for this message
Jt Whissel (jtwhissel) wrote :

I have the bug that it finds the field with the contents however it does not replace it. Hitting "replace" or "replace all" does nothing.

For example, I have a part with a field name "PN" and with the contents "foo" it finds the part with "foo" as a value but I cant replace it with anything via the "search and replace window"

Changed in kicad:
status: Invalid → New
Jeff Young (jeyjey)
Changed in kicad:
status: New → Confirmed
assignee: nobody → Jeff Young (jeyjey)
Jeff Young (jeyjey)
Changed in kicad:
status: Confirmed → In Progress
importance: Undecided → High
milestone: none → 5.0.0-rc2
Revision history for this message
KiCad Janitor (kicad-janitor) wrote :

Fixed in revision 5ef715f3d3c795327013ec8a9543891d479179c3
https://git.launchpad.net/kicad/patch/?id=5ef715f3d3c795327013ec8a9543891d479179c3

Changed in kicad:
status: In Progress → Fix Committed
Changed in ubuntu:
status: New → Fix Committed
Changed in kicad:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.