← Back to team overview

kicad-developers team mailing list archive

Re: More default fields in schematic

 

That was from a commit I made on 5/24. It looks like I was using a build derived from your commit of 5/20:
    3a8a718 A pesky bug, this one is.  (Said in best Yoda impression.)


On 05/29/18 10:12, Jeff Young wrote:
Hi Reece,

Was that generated with a recent build?  Earlier versions of 5.0 certainly had that bug, but I’m pretty sure it’s been fixed.

Cheers,
Jeff.


On 29 May 2018, at 13:54, Reece R. Pollack <reece@xxxxxxx <mailto:reece@xxxxxxx>> wrote:

On 05/29/18 08:27, Jeff Young wrote:
Comments inline:

On 28 May 2018, at 17:28, Reece R. Pollack <reece@xxxxxxx <mailto:reece@xxxxxxx>> wrote:

I believe you owe me 2c. We can discuss 2c in which currency later. :-)

I have five custom default fields defined:
 - Mfgr
 - Mfgr P/N
 - Dist
 - Dist P/N
 - Specifications

None of these have any default values that make any sense, so I assume they’re all just names with empty values, right?

Yes, all of these are empty by default, though I typically order from DigiKey so I could have set that one. I added them as "Default Fields" so that all components would have the same fields, and I wouldn't have to depend on adding the field names by hand.



The first two give the manufacturer's name and part number; the second two give the distributor's name and part number; the third is a catch-all for specs that are important for ordering but aren't worth cluttering the schematic with.

My biggest issue with the current Default Fields is that I didn't start my current project with them, so using the field edit spreadsheet-like thingie often results in lots of noise in my commits as the empty default fields get added to components.

If it’s adding empty default fields then it’s a bug.  It should only add them if they have non-empty values.

Then you have a bug. Here's a small excerpt from a Git diff where a lot of components had empty fields added. None of these components were added in this revision; I was simply setting part numbers for /other/ components using the field editor spreadsheet thingie:

diff --git a/Recreation/P170-DH/pcb/P170-DH Replacement/ExternalInterface.sch b/Recreation/P170-DH/pcb/P170-DH Replacement/ExternalInterface.sch
index 37482ee..e2aea43 100644
--- a/Recreation/P170-DH/pcb/P170-DH Replacement/ExternalInterface.sch
+++ b/Recreation/P170-DH/pcb/P170-DH Replacement/ExternalInterface.sch
@@ -22,6 +22,11 @@ F 0 "U12" H 3900 2215 50  0000 C CNN
 F 1 "74LVC1T45" H 3900 2124 50  0000 C CNN
 F 2 "Package_TO_SOT_SMD:SOT-23-6" H 3900 1850 50  0001 C CNN
 F 3 "http://www.ti.com/lit/ds/symlink/sn74lvc1t45.pdf"; H 3900 1850 50  0001 C CNN
+F 4 "" H 0   0   50  0001 C CNN "Distr"
+F 5 "" H 0   0   50  0001 C CNN "Distr P/N"
+F 6 "" H 0   0   50  0001 C CNN "Mfgr"
+F 7 "" H 0   0   50  0001 C CNN "Mfgr P/N"
+F 8 "" H 0   0   50  0001 C CNN "Specifications"
        1    3900 1850
        1    0    0    -1
 $EndComp
@@ -33,6 +38,11 @@ F 0 "U13" H 3900 3415 50  0000 C CNN
 F 1 "74LVC1T45" H 3900 3324 50  0000 C CNN
 F 2 "Package_TO_SOT_SMD:SOT-23-6" H 3900 3050 50  0001 C CNN
 F 3 "http://www.ti.com/lit/ds/symlink/sn74lvc1t45.pdf"; H 3900 3050 50  0001 C CNN
+F 4 "" H 0   0   50  0001 C CNN "Distr"
+F 5 "" H 0   0   50  0001 C CNN "Distr P/N"
+F 6 "" H 0   0   50  0001 C CNN "Mfgr"
+F 7 "" H 0   0   50  0001 C CNN "Mfgr P/N"
+F 8 "" H 0   0   50  0001 C CNN "Specifications"
        1    3900 3050
        1    0    0    -1
 $EndComp
@@ -66,6 +86,11 @@ F 0 "J5" H 7719 1375 50  0000 C CNN
 F 1 "Conn_01x06" H 7719 1466 50  0000 C CNN
 F 2 "Connector_PinHeader_2.54mm:PinHeader_1x06_P2.54mm_Vertical" H 7800 1900 50  0001 C CNN
 F 3 "~" H 7800 1900 50  0001 C CNN
+F 4 "" H 0   0   50  0001 C CNN "Distr"
+F 5 "" H 0   0   50  0001 C CNN "Distr P/N"
+F 6 "" H 0   0   50  0001 C CNN "Mfgr"
+F 7 "" H 0   0   50  0001 C CNN "Mfgr P/N"
+F 8 "" H 0   0   50  0001 C CNN "Specifications"
        1    7800 1900
        1    0    0    -1
 $EndComp
@@ -209,6 +234,7 @@ F 4 "CTS" H 3900 7100 50  0001 C CNN "Mfgr"
 F 5 "218-4LPST" H 3900 7100 50  0001 C CNN "Mfgr P/N"
 F 6 "DigiKey" H 3900 7100 50  0001 C CNN "Distr"
 F 7 "CT2184LPST-ND" H 3900 7100 50  0001 C CNN "Distr P/N"
+F 8 "" H 0   0   50  0001 C CNN "Specifications"
        1    3900 7100
        1    0    0    -1
 $EndComp
@@ -321,6 +347,11 @@ F 0 "R127" H 4509 5746 50  0000 L CNN
 F 1 "100K" H 4509 5655 50  0000 L CNN
 F 2 "Resistor_SMD:R_0603_1608Metric" H 4450 5700 50 0001 C CNN
 F 3 "~" H 4450 5700 50  0001 C CNN
+F 4 "" H 0   0   50  0001 C CNN "Distr"
+F 5 "" H 0   0   50  0001 C CNN "Distr P/N"
+F 6 "" H 0   0   50  0001 C CNN "Mfgr"
+F 7 "" H 0   0   50  0001 C CNN "Mfgr P/N"
+F 8 "" H 0   0   50  0001 C CNN "Specifications"
        1    4450 5700
        1    0    0    -1
 $EndComp





Cheers,
Jeff.


References