Skip to main content

Hi,

this topic is not new for this Forum. Nevertheless I need your support.

I have understood that svg has got a XML-structure. I have also understood, I think, that i don't have to bother about crating the tags since this is accomplished by the svg-writer itself.

The svg-file, viewed with an editor, I have created so far looks like this:

I need to manipulate the stroke-width parameter (higklighted in the screenshot) by means of FME. Unfortunately I cant find the respective parameter among the various svg-writer parameters.

Do you have an idea?

Have a look here:

https://knowledge.safe.com/questions/2055/how-do-i-convert-dwg-to-svg-while-maintaining-styl.html


You could read the xml as text and use a regex to extract the stroke-width value for manipulation.


@femo

You can directly wite these attribute to your svg writer just like they look in the xml editor of the likes of iInkscape:

This is from a attribute creator in a svg creating workbench of mine.

(this is how Inkscape consumes it)

svg_style

=

fill:@Value(ColorHtml);fill-opacity:1;stroke:#000000;stroke-width:2;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:0.96744187000000004;stroke-dasharray:none


You could read the xml as text and use a regex to extract the stroke-width value for manipulation.

@itay sounds smart to me. Especially because I want to Keep the Parameter variable in order to manipulate them in QGIS. I forgot to mention that.

 

 

 

The following snippet:

 

<svg xmlns="http://www.w3.org/2000/svg" viewBox="-0.9375 -0.9375 76.875 93.5"><g fill="param(fill) #fff" stroke="param(outline) #000" stroke-width="param(outline-width) 3" transform="translate(0,91.625) scale(1, -1)">

 

 

enables the user to key in the desired Parameters in QGIS.

 

 

@david_r and @gio: thank you to!

 

 


Reply