Comment 4 for bug 1308986

Revision history for this message
su_v (suv-lp) wrote : Re: DXF 2D - non editable Symbol

On 2014-04-18 13:32 +0100, Neon22 wrote:> Thanks for the info - I did not realise it was a clone.
> I kept looking for the "Object -> Symbol to Group" tool as mentioned here:
> http://wiki.inkscape.org/wiki/index.php/SymbolsDialog

Please note that the wiki page is not a documentation of a feature in a stable released package - those are devel notes, of a feature new in trunk, still in parts 'work-in-progress'. The dialog was later partially refactored by Martin Owens: AFAIU he had to remove the menu entries because he changed logic of how symbols can be edited now: by selecting the preview image in the Symbols dialog instead of an instance inserted on the canvas, and then clicking on the button with the tooltip 'Remove symbol from current document' below the icon view holding the preview images of the symbols.

> It does work exactly as you report.
> But I still can't get it to be DragnDrop'd into the doc - like other
> symbols - from the Symbol dialog.
(…)
> if I select the "Current document" in Symbols dialog
> - select the visible symbol (loaded from the DXF)
> - and DnD it across to doc
> - on release there is no symbol added.
> I see warning on my console
>> **(inkscape.exe:5588): WARNING **: Malformed URI

Confirmed - likely that's due to the spaces in the id of the symbol generated by the dxf importer script. IIRC those are not allowed in SVG id attributes (but this needs to be verified). Or the parser fails to handle the spaces correctly (the symbol is inserted, but it does not find the referenced original -> the message in the status bar says 'Orphaned clone').

Possibly the DXF importer needs to be adjusted to support the Symbol dialog better (no spaces in id's for <symbol> elements (?).

> I also note that when I try to transform selected shape (from DXF) I get
> an error on my console:
>> **(inkscape.exe:5588): WARNING **: Invalid state when picking: STATE_BOX = 0, STATE_PICK = 4

Unrelated to the specific problem reported here. These warnings occur in various situations and are tracked in bug #1256597.

> and the only thing I can find different is:
> - there is no group under the DXF loaded symbol holding all the paths.
> - there is a group under the AIGA symbol holding all the paths.

IIRC this was recently changed to no longer be a requirement (a group as container element inside the <symbol> definition):

> Rewrite of symbol creation code. Partial fix for 1201325.
>
> Symbols cannot have 'tranform' attribute. The old code copied the group
> 'transform' attribute to the symbol. The new code creates an intermediate
> group with the required 'transform' if it is not a simple translation. A
> simple translation is removed and applied instead to the new <use> element.
>
> Multiple objects can now be turned into a symbol without first grouping the
> objects. (At the cost that multiple groups can no longer be turned into
> multiple symbols at one go.) This better matches marker and pattern creation.

Source: <http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/revision/13057>

On 2014-04-17 17:51 +0100, ~suv wrote:
> The symbol btw is present in the Symbols dialog, but not visible
> rendered (no style information)

Seems that it's not about missing style information, but about size/scaling of thin strokes, or the supported preview sizes of symbols: if the DXF file is imported 1:1 (without scaling to page size A4), the symbol preview renders visibly, though the issues with the malformed URI remain.