Thanks you for your commit
276 2024-10-06 16:47:16
Re: New .dxf to .elmt Conversion Program (193 replies, posted in Import DXF)
277 2024-10-06 15:49:05
Re: New .dxf to .elmt Conversion Program (193 replies, posted in Import DXF)
Hallo plc-user
great
278 2024-10-06 15:07:04
Re: New .dxf to .elmt Conversion Program (193 replies, posted in Import DXF)
I have this patch, show the real error but also an empty widget when convert is ok... humm what do you think?
--- sources/dxf/dxftoelmt.cpp
+++ sources/dxf/dxftoelmt.cpp
@@ -23,6 +23,8 @@
#include <QMessageBox>
#include <QDir>
#include <QDebug>
+#include <QTextBrowser>
+#include <QProcess>
/**
* @brief dxftoElmt
@@ -39,28 +41,31 @@ QByteArray dxfToElmt(const QString &file_path)
return QByteArray();
}
- QProcess process_;
+ auto process = new QProcess;
+ auto view = new QTextBrowser;
+
+
+ QObject::connect(process, &QProcess::readyReadStandardError, [process,view]() {
+ auto output=process->readAllStandardError().data();
+ view->append(output);
+ });
+
const QString program{dxf2ElmtBinaryPath()};
const QStringList arguments{file_path, QStringLiteral("-v")};
- process_.start(program, arguments);
- // qInfo()<<"\n Start converting DXF file..........\n"<< file_path;
- //qInfo()<< process_.readAllStandardError().data(); //Print standard error to log file
+ process->start(program, arguments);
- if (process_.waitForFinished())
- {
- bool dxf2elmterr = process_.readAllStandardError().isEmpty();
- QString message=QObject::tr(
- "Error: Make sure the file is a valid .dxf file");
-
- if (!dxf2elmterr){
- QMessageBox::warning(nullptr,
- QObject::tr("Error: to convert this dxf file."),
- message);
- }
+ process->setProcessChannelMode(QProcess::MergedChannels);
+
+ process->waitForStarted();
+ qDebug() << process->error();
+ view->show();
- const auto byte_array{process_.readAll()};
- process_.close();
+
+ if (process->waitForFinished())
+ {
+ const auto byte_array{process->readAll()};
+ process->close();
return byte_array;
}
else
279 2024-10-06 13:36:18
Re: New .dxf to .elmt Conversion Program (193 replies, posted in Import DXF)
Hello Vadoola!
Hallo plc-user!
Now the program return a messageBox to inform users if dxf2elmt can't convert DXF files, but I loose QInfo() information about the errors in logs files... which is a bit of a shame, unless you do run dxf2elmt in a CLI terminal to read the convertion error!
if someone can help?
--- sources/dxf/dxftoelmt.cpp
+++ sources/dxf/dxftoelmt.cpp
@@ -22,7 +22,6 @@
#include <QProcess>
#include <QMessageBox>
#include <QDir>
-#include <iostream>
#include <QDebug>
/**
@@ -45,11 +44,20 @@ QByteArray dxfToElmt(const QString &file_path)
const QStringList arguments{file_path, QStringLiteral("-v")};
process_.start(program, arguments);
+ // qInfo()<<"\n Start converting DXF file..........\n"<< file_path;
+ // qInfo()<< process_.readAllStandardError(); //Print standard error to log file
if (process_.waitForFinished())
{
- qInfo()<<"\n Start converting DXF file..........\n"<< file_path;
- qInfo()<< process_.readAllStandardError().data(); //Print standard error to log file
+ bool dxf2elmterr = process_.readAllStandardError().isEmpty();
+ QString message=QObject::tr(
+ "Error: Make sure the file is a valid .dxf file");
+
+ if (!dxf2elmterr){
+ QMessageBox::warning(nullptr,
+ QObject::tr("Error: to convert this dxf file."),
+ message);
+ }
const auto byte_array{process_.readAll()};
process_.close();
280 2024-10-04 19:18:19
Re: Connections in display bar (8 replies, posted in EN : Help, suggestions, discussions, ...)
FYI, these elements isn't used in electric diagram on France!
281 2024-10-04 18:36:32
Re: Text colour (2 replies, posted in EN : Help, suggestions, discussions, ...)
Yes, you can lock the text colour for newly created conductors in the project properties, but bear in mind that if you connect another connector to it that has another wire of a different colour you'll have to make a choice!
Laurent
282 2024-10-04 08:50:55
Re: Wire colours after a splice (4 replies, posted in EN : Help, suggestions, discussions, ...)
Hallo plc-user
FYI, the joedavenportjd25 message contained a hidden URL, so I deleted the spammer..
283 2024-10-04 08:44:55
Re: Qt 6.0 development and qelectrotech (117 replies, posted in Code)
284 2024-10-03 09:26:38
Re: Utilisation des {} dans les variables (3 replies, posted in FR : Aide, suggestions, discussions, ...)
285 2024-10-03 09:23:35
Re: Utilisation des {} dans les variables (3 replies, posted in FR : Aide, suggestions, discussions, ...)
286 2024-10-03 09:20:54
Re: Utilisation des {} dans les variables (3 replies, posted in FR : Aide, suggestions, discussions, ...)
287 2024-09-29 13:24:02
Re: New .dxf to .elmt Conversion Program (193 replies, posted in Import DXF)
Hello Vadoola!
Hallo plc-user!
dxftoelmt: add Print standard error and filepath name to the log files when launching program on QET element editor.
users shouldn't wait an hour in front of his element editor screen, but just look at the QET logs a minute later if nothing happens...
288 2024-09-28 12:24:22
Re: New .dxf to .elmt Conversion Program (193 replies, posted in Import DXF)
macOS Apple silicon arm64 binary
289 2024-09-27 12:25:25
Re: New .dxf to .elmt Conversion Program (193 replies, posted in Import DXF)
macOS INTEL X86_64 binary
290 2024-09-27 09:09:04
Re: French videos (17 replies, posted in Videos howto)
291 2024-09-27 08:52:53
Re: New .dxf to .elmt Conversion Program (193 replies, posted in Import DXF)
Windows 64 binary.
292 2024-09-27 07:48:38
Re: New .dxf to .elmt Conversion Program (193 replies, posted in Import DXF)
Linux Debian sid 64 bits binary.
293 2024-09-27 07:36:15
Re: New .dxf to .elmt Conversion Program (193 replies, posted in Import DXF)
Hello Vadoola,
Hallo plc-user
./dxf2elmt 05DI-AD16DIX-10.dxf
Error: Failed to load 05DI-AD16DIX-10...
Make sure the file is a valid .dxf file.
Caused by:
the code pair '[@110865]340/962' was not expected at this time: expected 0/ENDSEC at line/offset 110865
294 2024-09-25 17:50:32
Re: Creating new element and importing dxr file (4 replies, posted in EN : Help, suggestions, discussions, ...)
1. I have designed the schematic with your tool. However in printout, the elements and letters are coming very much small size and can't able to read also. Is there away to increase the size of elements?
Increase or decrease number or the size of rows and columns change element the scale and other text on folio.
What you see on the screen is what will be printed, whatever the print size, A4, A5, etc.
295 2024-09-19 08:03:42
Re: Saisi automatique dans un champ de texte (4 replies, posted in FR : Aide, suggestions, discussions, ...)
Voir cette vidéo:
https://youtu.be/vfiqBDESbBU
296 2024-09-19 08:00:12
Re: Problème de cablage après déplacement éléments (1 replies, posted in FR : Aide, suggestions, discussions, ...)
Bonjour,
4) je n'ai pas non plus trouvé de grille de position pour que sur chaque folio on puisse placer les objets à la même hauteur pour que visuellement ça soit moins brouillon. Une grille non imprimable mais configurable.
Pour cela on utilise les outils trait couleur du trait blanc, ensuite il y a une icone pour changer la couleur de fond en gris et tes repères en blanc apparaîtront pour mieux positionner tes éléments, et seront invisible avec la couleur de fond blanc.
297 2024-09-16 16:21:42
Re: Nouveautés de la version de développement 0.9 (224 replies, posted in News)
BTW, I updated my MXE cross compiler toolchain to Qt 5.15.15 for windows cross build package .exe.
https://github.com/mxe/mxe/commits/master/
Updated my KVM/Qemu macOS VM to last DigiKam scripts to build QET Intel X86_64 with last Qt version aka 5.15.15 and last Kf5 version.
298 2024-09-14 10:29:14
Re: Auto numbering: number format 1-Folio resets every time I switch folio (6 replies, posted in EN : Help, suggestions, discussions, ...)
Hey Cristo_87,
thanks for your review, maybe also see
https://github.com/qelectrotech/qelectr … .cpp#L1582
https://github.com/qelectrotech/qelectr … .cpp#L1492
https://github.com/qelectrotech/qelectr … .cpp#L1782