← Back to team overview

kicad-developers team mailing list archive

Re: Standard symbol field names initiative

 

Hello, Kaspar!

On 2017-01-13 12:50, Kaspar Emanuel wrote:
> Hi all,
> 
> I have started an initiative for external tools to agree on a few default field names in schematics. Full details in the forum where you can also propose amendments and register your preference.
> 
> https://forum.kicad.info/t/standard-symbol-field-names-initiative/4870

I am not sure how far you would go with KiCAD here and it's libraries.
I would keep things simple and _not_ add manufacturer information to the KiCAD libraries - divide and conquer!
Better split it up and link to all necessary information with a key/index in a database. (In my case it's 'partname', but it can become more complex: a combination of 'partname'+'value'+'instance')

I'll attach the Create code of my (still far away from perfect) database to give you an idea what maintainability hell you might run into if you keep everything inside of KiCAD, while KiCAD doesn't have a fully capable database frontend (yet ;-):

CREATE TABLE `main` (
	`mfg` VARCHAR(45) NULL DEFAULT '' COMMENT 'mfg name',
	`mfgname` VARCHAR(45) NULL DEFAULT '' COMMENT 'mfg partname',
	`description` VARCHAR(255) NULL DEFAULT '' COMMENT 'functional specification',
	`lycomment` VARCHAR(255) NULL DEFAULT '' COMMENT 'comment regarding part usage',
	`partname` VARCHAR(45) NULL DEFAULT '' COMMENT 'KEY: partname_metric',
	`partname_old` VARCHAR(45) NULL DEFAULT '' COMMENT 'KEY: partname_imperial (obsolete)',
	`caedecal` VARCHAR(45) NULL DEFAULT '' COMMENT 'cae decal name',
	`pincount` SMALLINT(5) UNSIGNED NULL DEFAULT '0' COMMENT 'no of package pins including e-pad, excluding drills',
	`value` VARCHAR(20) NULL DEFAULT '' COMMENT 'ATTRIBUTE: primary component value',
	`pcbdecal` VARCHAR(45) NULL DEFAULT '' COMMENT 'pcb decal name ',
	`mfgpkg` VARCHAR(45) NULL DEFAULT '' COMMENT 'mfg package specification',
	`mfgpkg_iec` VARCHAR(45) NULL DEFAULT '' COMMENT 'mfg package specification IEC',
	`mfgpkg_jeita` VARCHAR(45) NULL DEFAULT '' COMMENT 'mfg package specification JEITA',
	`mfgpkg_jedec` VARCHAR(45) NULL DEFAULT '' COMMENT 'mfg package specification JEDEC',
	`power` DECIMAL(7,3) UNSIGNED NULL DEFAULT '0.000' COMMENT 'power rating',
	`voltage` DECIMAL(7,3) UNSIGNED NULL DEFAULT '0.000' COMMENT 'voltage rating',
	`current` DECIMAL(7,3) UNSIGNED NULL DEFAULT '0.000' COMMENT 'current rating',
	`temp_min` SMALLINT(5) NULL DEFAULT '0' COMMENT 'min operating temperature',
	`temp_max` SMALLINT(5) NULL DEFAULT '0' COMMENT 'max operating temperature',
	`pitch` DECIMAL(7,3) UNSIGNED NULL DEFAULT '0.000' COMMENT 'footprint minimum pitch',
	`length` DECIMAL(7,3) UNSIGNED NULL DEFAULT '0.000' COMMENT 'length of part',
	`width` DECIMAL(7,3) UNSIGNED NULL DEFAULT '0.000' COMMENT 'width of part',
	`height` DECIMAL(7,3) UNSIGNED NULL DEFAULT '0.000' COMMENT 'height of part',
	`rohs` VARCHAR(10) NULL DEFAULT '' COMMENT 'rohs conformity',
	`dista` VARCHAR(255) NULL DEFAULT '' COMMENT 'primary distributor',
	`ordernoa` VARCHAR(255) NULL DEFAULT '' COMMENT 'orderno of primary distributor',
	`minordera` INT(10) UNSIGNED NULL DEFAULT '0' COMMENT 'minimum order qty of primary distributor',
	`currency` ENUM('EUR','USD','CAD') NOT NULL DEFAULT 'EUR' COMMENT 'currency for all prices in this row',
	`pricea1` DECIMAL(10,5) NULL DEFAULT '0.00000' COMMENT 'price at one',
	`pricea2` DECIMAL(10,5) NULL DEFAULT '0.00000' COMMENT 'price at many',
	`qtya2` INT(10) UNSIGNED NULL DEFAULT '0' COMMENT 'package size many',
	`status` VARCHAR(10) NULL DEFAULT '' COMMENT 'general status if part is usable',
	`available` VARCHAR(10) NULL DEFAULT '' COMMENT 'general status about part availability',
	`stockqty` INT(10) NOT NULL DEFAULT '0' COMMENT 'in-house stock qty',
	`extqty` INT(10) NOT NULL DEFAULT '0' COMMENT 'ext mfg stock qty',
	`stockplace` VARCHAR(10) NULL DEFAULT '' COMMENT 'stock place',
	`stockcomment` VARCHAR(100) NULL DEFAULT '' COMMENT 'stock comment',
	`mfgcomment` VARCHAR(100) NULL DEFAULT '' COMMENT 'assembly house comment',
	`tstamp` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'timestamp of last update',
	`grp` VARCHAR(45) NULL DEFAULT '' COMMENT 'part group',
	`tqsap0` VARCHAR(45) NULL DEFAULT '' COMMENT 'mfg sap number 1',
	`tqmat0` VARCHAR(100) NULL DEFAULT '' COMMENT 'mfg mat name 1',
	`tqsap1` VARCHAR(45) NULL DEFAULT '' COMMENT 'mfg sap number 2',
	`tqmat1` VARCHAR(100) NULL DEFAULT '' COMMENT 'mfg mat name 2',
	`tqsap2` VARCHAR(45) NULL DEFAULT '' COMMENT 'mfg sap number 3',
	`tqmat2` VARCHAR(100) NULL DEFAULT '' COMMENT 'mfg mat name 3',
	`idx` INT(10) NOT NULL AUTO_INCREMENT COMMENT 'unique index',
	UNIQUE INDEX `idx` (`idx`)
)
COLLATE='utf8_general_ci'
ENGINE=InnoDB
AUTO_INCREMENT=2222
;


Just funny, that the index is on 2222 today :-) Let's have a schnaps!

Regards,

Clemens




References