On Jun 16, 2011, at 11:17 PM, Josh Jordan wrote:

>    The plan is to add a 'Save symbol instance as...' to the right-click
>    menu.  It will open the file chooser in the directory of the original
>    symbol and load file name from device attribute.

I like this, although it's not so terribly difficult to get the same effect 
with a little planning. Sometimes the design drags you away from the plan ;-)

>    Saving a schematic uses f_save in libgeda, I am adding a f_save_symbol.
>     First I loop selected objects stopping at the first complex obj.  Then
>    get the text of the symbol with o_save_objects(toplevel,
>    s_object->complex->prim_objs, 0);
>    This returns almost the text needed to create the symbol file.  The
>    position of all the objects in the symbol are big numbers for the
>    position they had in the schematic.  Is there a reason to make these
>    numbers small near the origin like in the original symbol file?

Yes, for reasons Kai-Martin said. This shouldn't be too difficult to fix, since 
you've already managed to penetrate the obscure code here (good job!). There 
must be somewhere that the offset of the symbol within the schematic is stored 
(it's needed to generate the "C" record in the schematic file). Subtract that 
from the coordinates in the instance to make a proper sym file.

John Doty              Noqsi Aerospace, Ltd.
http://www.noqsi.com/
j...@noqsi.com




_______________________________________________
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user

Reply via email to