Why not use space to center text, no need to use avanced text editor and HTML?

https://download.qelectrotech.org/qet/forum_img_2/text_centering.png

452

(2 replies, posted in FR : Aide, suggestions, discussions, ...)

Bonjour,

il y a ce tres vieux tuto de Nuri qui date de 2016 et qui ne doit plus fonctionner mais peut-être que ça te donneras des idées de workarounds, d'ailleurs c'est pour cette fonction que le mode gris sombre existe dans l’éditeur de schéma pouvoir ajouter des composants dessinés en blanc qui ne seront visible que sur ce mode, et donc invisible a l'impression du projet afin d'enrichir la nomenclature.

Je me rappelle qu'il en avait parlé sur ce forum, de la à retrouver le lien...
https://download.qelectrotech.org/qet/n … dition.pdf



Cordialement,
Laurent

No need to edit element in element editor to add element informations dynamic texts.

Clic on your transformer in propertie of selection in tab information on fucntion field enter your text.
https://download.qelectrotech.org/qet/forum_img_2/stefan123.png

Now go to tab text, add text (1) selectect information of element (2), and select function (3)





https://download.qelectrotech.org/qet/forum_img_2/stefan123_1.png

454

(29 replies, posted in Import DXF)

In the XML of the elmt file produced by dxf2elmt, I was able to easily separate the drawing data from the text data in order to create two QET symbols so that I could try to merge them manually from the editor.   

It is not easy to adjust the text fonts on the drawing, which is why in a symbol of this type with a lot of text and terminals, it is preferable to draw it from the editor from scratch.

Hallo

see https://qelectrotech.org/forum/viewtopi … 476#p19476
https://qelectrotech.org/forum/viewtopi … 076#p20076

https://qelectrotech.org/forum/misc.php?action=pun_attachment&item=2861&download=0

456

(29 replies, posted in Import DXF)

Error: Failed to load deos600...
    Make sure the file is a valid .dxf file.

Caused by:
    an unexpected code '90' was encountered at line/offset 11

/media/backup6/download$ cat -b deos600.dxf
     1      0
     2    SECTION
     3      2
     4    HEADER
     5      9
     6    $ACADVER
     7      1
     8    AC1032
     9      9
    10    $ACADMAINTVER
    11     90
    12           55
    13      9
    14    $DWGCODEPAGE
    15      3
    16    ANSI_1252
    17      9
    18    $LASTSAVEDBY
    19      1
    20    Thomas16
    21      9
    22    $REQUIREDVERSIONS

    10    $ACADMAINTVER
    11     90

See:
https://github.com/ixmilia/dxf-rs/issues/46
https://github.com/ixmilia/dxf-rs/issues/27
https://ezdxf.mozman.at/release-v0-10-1.html

But if I open with libreCad and save the DXF in ‘drawing Exchange 2007’ format (*.dxf)... Vadoola dxf2elmt works but ... the font size was too big, it's a good start. nomicons/wink

Edit: no need to open with LibreCAD just remove these lines (10 to 13):

    10    $ACADMAINTVER
    11     90
    12           55
    13      9

https://download.qelectrotech.org/qet/forum_img_2/dxf2elmt_error8.png

457

(29 replies, posted in Import DXF)

As plc-user says, if you can submit these dxf elements, we may be able to test with Vaddola whether these symbols can help QET and also electrical equipment manufacturers and also QET users. If not no problem, we provide an editor, not perefect ...

Electrical equipment manufacturers sometimes ask me by e-mail how to add their electrical products to the QET collection...

The problem is that they don't have the time or the staff to provide QElectroTech with a specific elmt file, the only thing they can share internally is their DWG/DXF most of the cases in 3D, ....which is useless and impractical with simple drawing software...

Hi Luca,

thanks for the link and the workaround.

Regards,
Laurent

459

(29 replies, posted in Import DXF)

@Kellermorph:

Have you used DWG/DXF element https://www.wscad.com/fr/wscaduniverse/ and converted with new dxf2elmt or created from scrath?

Hi Luca,

I 'm thinking is maybe a wayland or Qt problem.

https://qelectrotech.org/bugtracker/view.php?id=305

Laurent

461

(29 replies, posted in Import DXF)

Kellermorph wrote:

Hi
Ich habe auch versucht im Terminal ./dxf2elmt deos600.dxf einzugeben aber bekam den Fehler Error: UnexpectedCode(90, 11).

You can share here this file: deos600.dxf?

462

(29 replies, posted in Import DXF)

@Kellermorph:
Linux 64 new dxf2elmt binary
https://qelectrotech.org/forum/viewtopi … 380#p20380

463

(3 replies, posted in FR : Aide, suggestions, discussions, ...)

https://qelectrotech.org/forum/viewtopi … 523#p19523

464

(29 replies, posted in Import DXF)

Why?
1 Download last 0.100-dev
2 If you OS is Windows get the new dxf2elmt binary archive, and extract it on QET binary folder like this vidéo:

https://qelectrotech.org/forum/viewtopi … 381#p20381
3 open your element editor in GUI and chose import an dxf..


C:\Users\"user"\Application Data\qet\binary

scorpio810 wrote:

It 's the same procedure :
1- click button "Download" to get tarball, download your OS version.
2- cick button "Installion folder"
3- paste in this folder your exe (unzip if Windows not extract it automatically)
4- click button "ok" to finish install

Now you can open menu file again and click to "import DXF" to launch new DXF import tool.

Enjoy! nomicons/wink

The folder "Application Data" is for backward compatibility,the real folder is now at a different place.

The fastest way to get to the folder is to enter "%APPDATA%" in explorer.

Else you can manually browse to  C:\Users\{Your User Name}\AppData\Roaming

https://answers.microsoft.com/en-us/win … 5152f067c1

Si c'est le même élément voir la solution proposée ici:
https://qelectrotech.org/forum/viewtopic.php?id=1932

Par contre pour que tu puisse conserver les conducteurs, l'élément doit avoir le même nombre de bornes, et c'elle ci doivent se trouver exactement à la même position. Si ces conditions ne sont pas respecté les "ancien" éléments disparaîtront.
Pour résumer tu peut modifier l'aspect graphique mais ne pas toucher au bornes.
Fait une copie de ton fichier .qet avant de faire la manipulation au cas ou quelque chose tourne mal.

https://qelectrotech.org/forum/viewtopi … 204#p11204

467

(29 replies, posted in Import DXF)

Hallo,

see: https://qelectrotech.org/forum/viewtopi … 280#p20280

468

(3 replies, posted in FR : Aide, suggestions, discussions, ...)

Did you use the Forum-Search before posting here?

Regards Laurent

469

(209 replies, posted in Import DXF)

Hello Vadoola!
Hallo plc-user!


Uniformise MessageBox, add the same type of box popup like plc-user added for QET_ElementScaler, when dxf2elmt can't convert DXF files.
Add QObjet for translate box message.

https://download.qelectrotech.org/qet/forum_img_2/dxf2elmt_error3.png
https://download.qelectrotech.org/qet/forum_img_2/dxf2elmt_error6.png

hairy_kiwi wrote:

I may not be using QET for the kind of wiring diagramming for which it was originally conceived, but I appreciate it - and all the work that goes into developing it - because I enjoy its ability to generate aesthetically pleasing output, even if a few workarounds are still required to achieve that; thanks for everything you've been working on for the QET project. nomicons/smile

Thanks for your compliments hairy_kiwi. nomicons/wink

I saw you used old version, on last 0.100-dev you have also an company collection to put your elements.

472

(209 replies, posted in Import DXF)

Thanks you for your commit nomicons/wink

473

(209 replies, posted in Import DXF)

Hallo plc-user

great nomicons/smile

474

(209 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



https://download.qelectrotech.org/qet/forum_img_2/dxf2elmt_error2.png

475

(209 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?


https://download.qelectrotech.org/qet/forum_img_2/dxf2elmt_error.png


--- 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();