Does anyone know if it’s possible to access a given Layout element’s tag, where that element is part of a SketchupModel placed onto a page and displayed as vectors? I cannot find any such method in the Layout API. The Entity instance method #layer_instance is for the Layout layer, not the Sketchup Tag.
My motivation here is that I want to export a Layout document as an SVG, which is really easy to style using CSS and plays nice with other graphics software. My script would reach into a Layout::SketchupModel object on a given page, get the Layout::Group entity that contains all the 2D vector graphics, and write each Layout::Path entity out as an SVG element. My hope is to style the SVG using classes mapped to the tags assigned within the Sketchup model, so that lineweights and colours can be updated just by typing into a CSS file.
I realize that a flattened 2D representation of a model isn’t the same as the original, but since layout maps tags in the model to specific linetypes and lineweights, the information should be there, at least for purely vectoral, hidden line drawings. If not, then I’ll have to resort to setting line color by material, setting materials to display by tag, and then assigning classes based on color.