Skip to main content
Question

creating svg file fom dxf

  • March 24, 2017
  • 4 replies
  • 87 views

femo
Contributor
Forum|alt.badge.img+6

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?

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

4 replies

david_r
Celebrity
  • March 24, 2017

itay
Supporter
Forum|alt.badge.img+18
  • 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

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!