Convert to .DXF

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
martblek
Active Member
Posts: 29
Joined: Wed Sep 02, 2020 7:58 am

Convert to .DXF

Post by martblek » Tue Feb 09, 2021 6:41 am

Hello,
I need to rename a few items in several drawings (about 110). I solved the problem with a simple script in python. The problem is that it only works on DXF files. But I have drawings in .DWG. The procedure is such that I search for every "MTEXT" in the file and when it comes across the searched one, it renames it and then saves the whole drawing under a different name.
Unfortunately when converting with "dwg2dwg -f -d -r 24 -o neco.dxf neco.dwg" it reports a font error for each drawing. It saves it correctly but when loading in the old Solidworks 2D editor it then replaces the fonts and the drawing is unreadable :( is it possible to set the conversion so that it does not pay attention to fonts?
Is it not possible to write a script directly in QCad that would not need conversion and change "MTEXT" directly in DWG?
Thanks.

PS: In "MTEXT" searching for "GAxxxx" and renaming to "GAyyyy"
My idea is some skript "DWGEdit --renameto GA1533 sourcedwg renameddwg"
Is that possible in QCad script ?
test.dwg
(91.07 KiB) Downloaded 307 times
result.dxf
(806.53 KiB) Downloaded 299 times

martblek
Active Member
Posts: 29
Joined: Wed Sep 02, 2020 7:58 am

Re: Convert to .DXF

Post by martblek » Tue Feb 09, 2021 6:49 am

There is error.
This is from dwginfo

06:45:15: Debug: RGLES3DPlugin::initScriptExtensions
06:45:15: Debug: Input file: C:/Users/bilekm/Desktop/OTHERS/Pracovni/vykresy\test.dwg
06:45:15: Debug: calling odInitialize
Warning: DirectWrite: CreateFontFaceFromHDC() failed (OznaŔuje chybu ve vstupnÝm souboru, nap°Ýklad v souboru s pÝsmem.) for QFontDef(Family="Fixedsys", pointsize=100, pixelsize=20, styleHint=5, weight=50, stretch=100, hintingPreference=0) LOGFONT("Fixedsys", lfWidth=0, lfHeight=-20) dpi=144
Critical: QWindowsFontDatabase::fontDefToLOGFONT: Family name 'gdt;r}\H3.50;???????????\P5.\H2.27;{\fgdt;r}\H3.50' is too long.
Critical: QWindowsFontDatabase::fontDefToLOGFONT: Family name 'gdt;r}\H4.00;???????????(0??)\P \H2.60;{\fgdt;r}\H4.00' is too long.
2627


PS: Dwg2csv script is not in installation :(

WIN10, QCADCAM Pro 3.25.2.7

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

Re: Convert to .DXF

Post by andrew » Tue Feb 09, 2021 10:42 am

I can confirm that QCAD has troubles decoding some of the texts in this file. I think not all texts are using the same codec / code page. I honestly don't know how this can work, but it's not something that is supported in QCAD, sorry.

Ps: dwg2csv was added to QCAD Professional and QCAD/CAM in version 3.25.2.9.

Post Reply

Return to “QCAD Troubleshooting and Problems”