LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to color an svg ?

Solved!
Go to solution

Hello everyone, I want to color an svg image through Labview. The picture  is a Taiwan map. SVG. Can I color each area individually through Labview?

In Microsoft's WPF development software, I can dynamically modify the color of the area through the style of XAML. Can labview also do it?
thank

 

0 Kudos
Message 1 of 5
(1,439 Views)
Solution
Accepted by topic author koukileo

Hi kuokileo,

 

as SVG files are basically XML files you can easily edit them by using stirng functions!

Search the color tag and change its value…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 5
(1,434 Views)

I got it
What a clever way. Thank you!!

But I will use it in NXG5.1, which does not seem to support XML

0 Kudos
Message 3 of 5
(1,423 Views)

@koukileo wrote:

I got it
What a clever way. Thank you!!

But I will use it in NXG5.1, which does not seem to support XML


Which is ironic because a gvi is just an xml document!

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 4 of 5
(1,377 Views)

From a more basic viewpoint, an XML-file is just a text-file.

 

In order to learn what is necessary to color a  region in your svg I recommend to download an svg-programm like inkscape, edit the svg and see the changes.

 

Regards, Jens

Kudos are welcome...
0 Kudos
Message 5 of 5
(1,368 Views)