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 ?
Convert to .DXF
Moderator: andrew
Forum rules
Always indicate your operating system and QCAD version.
Attach drawing files and screenshots.
Post one question per topic.
Always indicate your operating system and QCAD version.
Attach drawing files and screenshots.
Post one question per topic.
Re: Convert to .DXF
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
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
Re: Convert to .DXF
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.
Ps: dwg2csv was added to QCAD Professional and QCAD/CAM in version 3.25.2.9.