← Back to team overview

kicad-developers team mailing list archive

Re: KICAD_PLUGIN for libraries/components (pcbnew)


2012/4/13 Dick Hollenbeck <dick@xxxxxxxxxxx>:
>>>     c)  There is the case of opening/saving single componente files (.cmp?), that would
>>> be almost the same plugin.
>> I don't want to support that, unless it can be done with the plugin with special status,
>> which is the "KICAD" plugin, and I think this is simply
>> SaveModule() on the KICAD plugin.  It comes out in s-expression format, ALWAYS.  And
>> because the "library" argument is actually only a directory for that plugin, you have your
>> CMP file, but it is always s-expresion.
> KICAD plugin is special in a number ways.  It will never be external, always internal.
> It is the native format.  It is our future clipboard format.
> Many more ways will reveal themselves in the next couple of weeks.  :)
> So we can trick out this PLUGIN to write the "CMP" file to the clipboard if the library
> name is NULL.

Why not using "CLIPBOARD" :-) or something equivalent (that couldn't
be a library name), this way the code using this will be much more

Or just add a second function "SaveModuleToClipboard",  or even better
(to reduce coupling to user interface): SaveModuleToString() and
return an string, that later the UI code will put into the clipboard.

> Then a person could use a text editor and paste that footprint into a text editor and look
> at it.
> Or we could paste it into another copy of PCBNEW in the future.

That's an important feature.  For distributed library handling may be
the SaveModuleToString or LoadModuleFromString variants could make a
lot of sense too.


Miguel Angel Ajo Pelayo
+34 636 52 25 69
skype: ajoajoajo