Skip to main content
Question

creating svg file fom dxf


femo
Contributor
Forum|alt.badge.img+6
  • Contributor

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?

4 replies

david_r
Evangelist
  • March 24, 2017

itay
Supporter
Forum|alt.badge.img+16
  • Supporter
  • March 24, 2017

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


gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • March 24, 2017

@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


femo
Contributor
Forum|alt.badge.img+6
  • Author
  • Contributor
  • March 31, 2017
itay wrote:

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!

 

 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings