The sourcecode
101 2025-07-10 21:24:41
Re: Python script for generate cross-references in .pdf file (46 replies, posted in Scripts)
102 2025-07-10 21:23:39
Re: Python script for generate cross-references in .pdf file (46 replies, posted in Scripts)
Ich habe meine Funktion erweitert und habe den ersten Erfolg erzielt, dass die passenden Seiten verlinkt werden, auch wenn im Schaltplan Lücken sind.
Dies ist jetzt allerdings noch nicht zu 100% getestet.
Das Problem, dass auftreten kann ist, dass das Programm jetzt gerade absucht, ob es den Text "Seite: XY" findet. Ob dies in einer anderen Sprache oder wenn dort eine Abkürzung z.b. S. steht klappt, weiß ich nicht. Hier sind evtl eigene Anpassungen nötig.
Das Vorgehen ist, das eine Mapping erstellt wird, so das das Programm z.B. weiß, dass PDF S.35 Schaltplan S.55 entspricht. Demnach werden, wenn im Querverweis steht, dass die Verlinkung auf S.55 die PDF S.35 geöffnet.
Translation:
I have extended my function and have achieved the first success that the appropriate pages are linked, even if there are gaps in the circuit diagram.
However, this has not yet been 100% tested.
The problem that can occur is that the program is now searching whether it finds the text “Page: XY”. I do not know whether this works in another language or if there is an abbreviation, e.g. S.. You may need to make your own adjustments here.
The procedure is that a mapping is created so that the program knows, for example, that PDF p.35 corresponds to circuit diagram p.55. Accordingly, if the cross-reference says that the link is to p.55, the PDF p.35 is opened.
Translated with DeepL.com (free version)
103 2025-07-08 22:25:04
Topic: Templates Import (4 replies, posted in Scripts)
Guten Tag zusammen
Ich habe mir eine neue Funktion gebaut, die euch evtl auch hilfreich sein kann.
Es geht darum seine eigenen Vorlagen zu erstellen, welche man dann in eine .qet Datei integrieren kann.
Oben gibt es 3 Schaltflächen. qet Datei auswählen, Bauteile importieren, Seitenbibliothek laden
Zuerst muss man die .qet Datei auswählen. Danach müssen alle Bauteile die genutzt werden (selbst erstellte und, wenn man sie nutzt, die von QElectrotech bereitgestellten) zur .qet Datei hinzufügen, damit die Templates diese auch finden können.
Danach muss die Seitenbibliothek geladen werden.
Hier müssen die datein als .txt abgespeichert werden. In der Bibliothek sind Unterordner möglich, wodurch in der GUI Reiter entstehen.
In diesen Reitern werden nun die jeweiligen .txt Datein aufgelistet. Diese kann man jetzt nach Eingabe der Seitentitels importieren und diese werden an die nächst höhere Seite geschrieben.
Die .txt Datei kann man sich selbst erstellen, indem man die .qet Datei mit einem Texteditor öffnet und sich dann die ganze Seite rauskopiert und abspeichert.
Die Datei ist zu groß zum hochladen im Forum und auf Github. Nur der Quellcode liegt unter:
https://github.com/Kellermorph/qet-seiten-editor
Der ganze Ordner inkl. der virtuellen Umgebung und das Appimage können 3 Tage lange über folgenden Link heruntergeladen werden:
Die Datei ist ein Erst-Entwurf. Über Feedback würde ich mich freuen.
Hello everyone
I have built a new function that may also be helpful to you.
It's about creating your own templates, which you can then integrate into a .qet file.
There are 3 buttons at the top. Select qet file, import components, load page library
First you have to select the .qet file. Then you have to add all the components you want to use (your own and, if you use them, those provided by QElectrotech) to the .qet file so that the templates can find them.
The page library must then be loaded.
Here the files must be saved as .txt. Subfolders are possible in the library, creating tabs in the GUI.
The respective .txt files are now listed in these tabs. These can now be imported after entering the page title and these are written to the next higher page.
You can create the .txt file yourself by opening the .qet file with a text editor and then copying and saving the entire page.
The file is too large to upload to the forum and Github. Only the source code can be found at:
https://github.com/Kellermorph/qet-seiten-editor
The whole folder including the virtual environment and the app image can be downloaded for 3 days via the following link:
The file is a first draft. I would be pleased to receive feedback.
104 2025-07-02 20:33:42
Re: Bug in Version 0.100, oder so gewollt? (2 replies, posted in DE : Hilfe, Vorschläge, Unterhaltungen...)
Wenn du den Text mit Shift markiert hast, kannst du den dann mit den Pfeiltasten verschieben. So bleibt der im Raster.
Ich persönlich finde es so auch viel besser gelöst, dass man das ganze Bauteil auch über die Texte verschieben kann. Aber hier ist es nur persönliche Meinung / Gewöhnung.
105 2025-07-02 15:19:48
Re: Python script for generate cross-references in .pdf file (46 replies, posted in Scripts)
yes, that could be a damn good idea.
The problem I'm seeing right now is that it might be hard/problematic to tell from the PDF which cross-reference is supposed to be in the .qet file.
I think the x and y coordinates would be the only way to tell which cross-reference from the PDF file would be the cross-reference in the QET file. However, I don't know to what extent the x and y coordinates in the documents match.
106 2025-07-02 07:07:33
Re: Python script for generate cross-references in .pdf file (46 replies, posted in Scripts)
yes, that was the same problem I had when I created my program.
The PDF is missing the background information that you would have in the .qet file to enter the connection.
That's why I wrote in the description I included in my post that the PDF page must be the same as the page in the schematic.
This reads out, for example. "22.1" and then extracts the 22 and creates the reference to p. 22.
I would have preferred it differently, but I couldn't think of a way to create the actual connection.
Translated with DeepL.com (free version)
107 2025-06-30 21:34:58
Re: Auswertung: Klemmenplan automatisch erstellen (51 replies, posted in DE : Hilfe, Vorschläge, Unterhaltungen...)
Wäre es zu viel verlangt, den Quellcode auf GitHub oder ähnlich bereitzustellen?
PLC-User oder ich?
108 2025-06-30 21:34:34
Re: Python script for generate cross-references in .pdf file (46 replies, posted in Scripts)
I have tried the tool from Alfonso.
I have adapted my cross-reference type for this.
It did not work for me that the program recognizes gaps in the circuit diagram. In other words, if page 12 was in the 10th position, the Alfonso program would jump to page 12. The direct connections are not recognized. In this respect, I can achieve the same with my tool and will not go to the trouble of trying to include the X.Y format.
Translated with DeepL.com (free version)
109 2025-06-29 18:25:59
Re: Python script for generate cross-references in .pdf file (46 replies, posted in Scripts)
You are welcome.
I don't know why it doesn't run on Ubuntu.
Oh, I don't know exactly whether it's row or column. I guess it is column.
My cross-references are numerical. For page 17 column 9 the cross-reference would be 17.9, for example. So it must be column?
I think I will try to integrate this format into the program. I don't know if I can do it.
But I also don't know to what extent Alfonso is still online here.
110 2025-06-29 08:37:32
Re: Python script for generate cross-references in .pdf file (46 replies, posted in Scripts)
The app image is attached. I could not upload the folder structure and the .sh file to create an appimage because it is too big (262MB)
Unfortunately I could not test the function because my format of cross-references is not supported.
I am using Y.X. (page.column)
Alfonso could you add this function?
111 2025-06-28 18:47:08
Re: Python script for generate cross-references in .pdf file (46 replies, posted in Scripts)
I will take a look if i can make an appimage. but it will take a some time before i have time to do that.
112 2025-06-28 07:45:15
Re: Python script for generate cross-references in .pdf file (46 replies, posted in Scripts)
Maybe take a look at my update
https://qelectrotech.org/forum/viewtopic.php?id=2938
there is the complete Code with the .sh and maybe its easyer to see how it works.
113 2025-06-28 07:41:21
Re: Auswertung: Klemmenplan automatisch erstellen (51 replies, posted in DE : Hilfe, Vorschläge, Unterhaltungen...)
Moin Stefan,
ich habe meine neue Version hochgeladen.
https://qelectrotech.org/forum/viewtopic.php?id=2938
Evtl hilft dir das jetzt weiter.
114 2025-06-28 07:40:05
Re: Zusatzfunktionen (5 replies, posted in Scripts)
Ich habe die Zusatzfunktionen geupdated.
Die Änderungen sind:
Eine verbesserte Erkennung der Klemmen in der Zeichnung.
Kabelliste und Klemmenplan können direkt in die .qet Datei integriert werden.
Man kann Seiten löschen. Sehr von Vorteil, wenn man viele Seiten auf einmal löschen will z.B. um ein bereits erstellte Klemmenplan zu löschen um diesen nach Änderungen dann über die Funktion in meinem Tool zu zu aktualisieren.
Translate:
I have updated the additional functions.
The changes are:
Improved recognition of the terminals in the drawing.
Cable list and terminal diagram can be integrated directly into the .qet file.
You can delete pages. This is very useful if you want to delete many pages at once, e.g. to delete an already created terminal diagram and then update it after changes using the function in my tool.
The source code and my components are attached.
115 2025-06-28 07:35:16
Re: Python script for generate cross-references in .pdf file (46 replies, posted in Scripts)
i didnt know the Modul. It seems its not integrated.
if u look into my .sh file.
at point 4 he copy the venv. thats where the python moduls are. That has to be copyed too.
maybe the problem is because u did:
pip uninstall fitz
pip install --upgrade --force-reinstall pymupdf
and its not integrated it the venv.
116 2025-06-27 20:13:56
Re: Auswertung: Klemmenplan automatisch erstellen (51 replies, posted in DE : Hilfe, Vorschläge, Unterhaltungen...)
Kellermorph wrote:Die Vorgehensweise ist nur so ziemlich die selbe, (...).
... im Vergleich zu welcher anderen Vorgehensweise?
Kellermorph wrote:Irgendetwas scheint da halt noch im argen zu sein.
Ja: Deine Vorgehensweise!
Man muss Regeln befolgen, damit etwas wie geplant funktioniert!
Konsole aufmachen, cd zu wechseln des Ordners, das tool händisch reinschreiben etc.
Ja ich habe es jetzt herausgefunden. Danke für die Spitzenerklärung, wo der Fehler war!
Es war einfach nur der Punkt vor dem/
Und genau aus diesem Grund verabscheue ich so n Konsolenzeug.
117 2025-06-27 19:19:36
Re: Auswertung: Klemmenplan automatisch erstellen (51 replies, posted in DE : Hilfe, Vorschläge, Unterhaltungen...)
Kellermorph wrote:Ich mache das etwas anders.
Du merkst selber, daß das so wie Du es machst, NICHT funktioniert?!?
Kellermorph wrote:Ich bin absolut kein Freund vom Terminal.
Dann ist Dir mit Kommandozeilen-Tools nicht zu helfen...!
Die Vorgehensweise ist nur so ziemlich die selbe, nur das hier dann einiges noch grafisch abgenommen wird und man nicht alles tippen muss.
Absolut richtig! Deshalb meide ich die auch immer.
Wollte dir nur den Gefallen tun und es testen.
Irgendetwas scheint da halt noch im argen zu sein.
118 2025-06-27 19:03:37
Re: Auswertung: Klemmenplan automatisch erstellen (51 replies, posted in DE : Hilfe, Vorschläge, Unterhaltungen...)
Ich mache das etwas anders. Ich bin absolut kein Freund vom Terminal.
Ich habe über die Eigenschaften kontrolliert, ob es ausführbar ist. War es schon.
Dann zieh ich dein Programm ins Terminal, welches ich extra zu der .qet Datei gelegt habe. Dadurch passt der Pfad.
Dann kopiere ich deinen Befehl rein und passe den Datei Namen an.
Wenn ich dann Enter drücke kommt nur das größer als Zeichen und es passiert nichts weiter.
und jetzt hängt der ca ein paar min so fest:
/QElectrotech/Projekte/QET_Klemmenplan -l Vorlage_MSR.qet > Klemmen.txt
>
Ich habe sogar extra das Leerzeichen in dem Namen der QET-Datei durch einen _ ersetzt aber auch da kommt keine Besserung.
In dem Ordner kommt keine .txt Datei.
119 2025-06-27 18:12:52
Re: Auswertung: Klemmenplan automatisch erstellen (51 replies, posted in DE : Hilfe, Vorschläge, Unterhaltungen...)
Welche Ausgabe erwartest Du, wenn die Ausgabe in die Datei "Klemmen.txt" umgeleitet wurde?
Bei demselben Aufruf erhalte ich eine "Klemmen.txt" mit etwa 57kB Inhalt. (vgl Anhang)
Es erfolgt KEINE unnötige Ausgabe auf der Konsole!
Wenn das Programm bei dem gezeigten Aufruf erfolgreich durchläuft, kommt einfach nur das Prompt wieder und die Datei ist mit dem gewünschten Inhalt gefüllt!
Das sich der Konsolenaufruf beendet und ich dann eine .txt Datei in dem Ordner erscheint. beides nicht geschehen.
120 2025-06-27 16:48:10
Re: Python script for generate cross-references in .pdf file (46 replies, posted in Scripts)
u can do it with appimagetool.
I build an .sh with all.
you have to adjust the paths etc. in there.
121 2025-06-27 16:43:18
Re: Auswertung: Klemmenplan automatisch erstellen (51 replies, posted in DE : Hilfe, Vorschläge, Unterhaltungen...)
oh damn. copy mistake.
/QET_Klemmenplan -l Vorlage_MSR.qet >Klemmen.txt
>
I got this result.
122 2025-06-27 15:26:25
Re: Python script for generate cross-references in .pdf file (46 replies, posted in Scripts)
did u build an appimage?
123 2025-06-27 15:25:24
Re: Auswertung: Klemmenplan automatisch erstellen (51 replies, posted in DE : Hilfe, Vorschläge, Unterhaltungen...)
...QElectrotech/Projekte/QET_Klemmenplan -l Vorlage_MSR.qet Klemmen.txt
>
Bei mir kommt nur das und gibt keine Ausgabe.
124 2025-06-26 12:57:11
Re: Auswertung: Klemmenplan automatisch erstellen (51 replies, posted in DE : Hilfe, Vorschläge, Unterhaltungen...)
Beim händischen Eintragen bin ich raus, sorry. Das ist viel zu aufwändig. Dann bleibe ich eher bei meinem Tool.
Das steht auch so weit. Ich muss gerade nur noch eine Lösung für eine gebrückte Klemmleiste finden. Aber ich denke, dass ich hier in QET passend zeichnen werde, damit die Funktion sauber klappt.
125 2025-06-26 12:55:32
Re: Python script for generate cross-references in .pdf file (46 replies, posted in Scripts)
The Program from Alfonos? No i didnt? Why are u asking?
