[solved] problem with dwg2svg -- "ReferenceError: Can't find variable: fileName"

If you are having problems with QCAD, post here. Please report bugs through our Bug Tracker instead.

Always attach your original DXF or DWG file and mentions your QCAD version and the platform you are on.

Moderator: andrew

Forum rules

Always indicate your operating system and QCAD version.

Attach drawing files and screenshots.

Post one question per topic.

Post Reply
morsanimi
Registered Member
Posts: 2
Joined: Mon Sep 05, 2022 8:02 am

[solved] problem with dwg2svg -- "ReferenceError: Can't find variable: fileName"

Post by morsanimi » Mon Sep 05, 2022 8:18 am

Hi everyone,

I am a newbit to QCAD.
I am interested in testing the dwg2svg routine. However, I get an error. I was wondering if I am making a mistake or if there's a bug.

I am using the trial version of QCAD version 3.27.6 on Win10.

I am in the directory Program files/QCAD. There, there is the dwg2svg.bat file and the dwg file that I want to convert.
Then I run the following command.

.\dwg2svg -o out.svg .\infile.DWG

Which gives me the error:

Code: Select all

Warning:  RScriptHandlerEcma::eval: script engine exception:  "ReferenceError: Can't find variable: fileName"
Warning:  "<anonymous>() at :scripts/Pro/ImportExport/SvgExporter/SvgExporter.js:125\n<anonymous>(fileName = 'C:/Program Files/QCAD\\out.svg') at :scripts/Pro/ImportExport/SvgExporter/SvgExporter.js:146\nmain() at :scripts\\Pro\\Tools\\Dwg2Svg\\Dwg2Svg.js:174\n<global>() at :scripts\\Pro\\Tools\\Dwg2Svg\\Dwg2Svg.js:304"
Warning:  At least one uncaught exception:
Warning:  "<anonymous>() at :scripts/Pro/ImportExport/SvgExporter/SvgExporter.js:125\n<anonymous>(fileName = 'C:/Program Files/QCAD\\out.svg') at :scripts/Pro/ImportExport/SvgExporter/SvgExporter.js:146\nmain() at :scripts\\Pro\\Tools\\Dwg2Svg\\Dwg2Svg.js:174\n<global>() at :scripts\\Pro\\Tools\\Dwg2Svg\\Dwg2Svg.js:304"
09:13:39: Debug:    "<global>() at 125"

I have noticed that there is no

Code: Select all

scripts/Pro/ImportExport/SvgExporter/
directory. At the download page I chose to download the Professional trial version.

Could anyone, please, provide some hints, on the error?

Thanks

CVH
Premier Member
Posts: 3416
Joined: Wed Sep 27, 2017 4:17 pm

Re: problem with dwg2svg -- "ReferenceError: Can't find variable: fileName"

Post by CVH » Mon Sep 05, 2022 8:28 am

Hi,
C:/Program Files/QCAD/...

is a protected area by the Windows OS.
The tool can't create a file there without special permissions.

Try to output it to a non-protected folder.

Regards,
CVH

CVH
Premier Member
Posts: 3416
Joined: Wed Sep 27, 2017 4:17 pm

Re: problem with dwg2svg -- "ReferenceError: Can't find variable: fileName"

Post by CVH » Mon Sep 05, 2022 8:31 am

Hi,
C:/Program Files/QCAD/...

is a protected area by the Windows OS.
The tool can't create a file there without special permissions.

Try to output it to a non-protected folder.
morsanimi wrote:
Mon Sep 05, 2022 8:18 am
I have noticed that there is no ...
Correct, most tools are present in compiled form.

Regards,
CVH

morsanimi
Registered Member
Posts: 2
Joined: Mon Sep 05, 2022 8:02 am

Re: problem with dwg2svg -- "ReferenceError: Can't find variable: fileName"

Post by morsanimi » Mon Sep 05, 2022 8:51 am

Thank you so much for the very fast and correct answer :D

Post Reply

Return to “QCAD Troubleshooting and Problems”