Hi Peter,

Ah yes thanks, I tend to forget that an SVG doc is in XML format.

Sometimes the solution winds up being so simple in 4D.

If the SVG doc uses <defs> for displaying various glyphs in the <g> object I 
would assume that I need to also bring those into the doc?

Appreciate,
John…


> Just use a XML commands and copy the node to another SVG files. AS SVG files 
> are XML documents, you can use any XML DOM commands to manipulate SVG files.
> 
> Something like 
> $group:=DOM Find XML element by ID(oldSVGImage;$groupID)
> If (OK=1)
>   $newEl:=DOM Append XML element(newSVGImage;$group)
> end if
> 
> Peter Bozek
> 
> On Fri, Feb 28, 2020 at 5:08 PM John J Foster via 4D_Tech 
> <4d_tech@lists.4d.com <mailto:4d_tech@lists.4d.com>> wrote:
> Hi All,
> 
> I have an SVG Doc which contains many <g> grouped objects. Each group has a 
> unique ID (name).
> 
> Sometimes I’d like to click on a part of the document, corresponding to a 
> grouped object, and have it sent to the clipboard or saved as a png. Just the 
> part of the document clicked on.
> 
> Is there a technique to easily extract a <g> object into it’s own SVG doc so 
> I can save just the selected group as an png?
> 
> Yes, I could redraw each object that was selected but like to save that time 
> if it’s possible.
> 
> Thanks,
> John…

**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**********************************************************************

Reply via email to