[solved] SvgExporterPG loosing colors

Discussion forum for C++ and script developers who are using the QCAD development platform or who are looking to contribute to QCAD (translations, documentation, etc).

Moderator: andrew

Forum rules

Always indicate your operating system and QCAD version.

Attach drawing files, scripts and screenshots.

Post one question per topic.

Post Reply
sperez
Junior Member
Posts: 11
Joined: Thu Apr 25, 2019 4:41 pm

[solved] SvgExporterPG loosing colors

Post by sperez » Wed Mar 23, 2022 11:10 pm

We are devoloping an ecmascript to export with the QCAD Pro (version 3.23.0.0 ) script SvgExporterPG

Code: Select all

   include("scripts/Pro/ImportExport/SvgExporter/SvgExporterPG.js");
...
    var nomsvg = "/tmp/outputfile.svg";
    var exporter = new SvgExporterPG(doc, {});
    exporter.exportFile(nomsvg);
...
All the entities exported has the color with the svg node attribute with a value of fill:#a44646 but in the dxf file thiis not the color asigned. Is it possible to asign the true color in the svg exported file ? Maybe the constructor has options that I don't know

Thanks in advance
Last edited by sperez on Sat Mar 26, 2022 9:00 pm, edited 1 time in total.

User avatar
andrew
Site Admin
Posts: 9036
Joined: Fri Mar 30, 2007 6:07 am

Re: SvgExporterPG loosing colors

Post by andrew » Thu Mar 24, 2022 7:31 am

Please indicate your operating system and attach the drawing files in question.

sperez
Junior Member
Posts: 11
Joined: Thu Apr 25, 2019 4:41 pm

Re: SvgExporterPG loosing colors

Post by sperez » Sat Mar 26, 2022 9:00 pm

Sorry It was my mistake I had developed a script that modify some properties and after somes remove operations finally the initial file was converted with that error.

Thanks and sorry again .

Post Reply

Return to “QCAD Programming, Script Programming and Contributing”