<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[QElectroTech — Scripts]]></title>
		<link>https://qelectrotech.org/forum/index.php</link>
		<atom:link href="https://qelectrotech.org/forum/extern.php?action=feed&amp;fid=14&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent topics at QElectroTech.]]></description>
		<lastBuildDate>Mon, 09 Feb 2026 10:48:46 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[script auto numerotation des bornes]]></title>
			<link>https://qelectrotech.org/forum/viewtopic.php?id=3108&amp;action=new</link>
			<description><![CDATA[<p> Script pour l&#039;auto numérotation des bornes </p>]]></description>
			<author><![CDATA[null@example.com (javdenech)]]></author>
			<pubDate>Mon, 09 Feb 2026 10:48:46 +0000</pubDate>
			<guid>https://qelectrotech.org/forum/viewtopic.php?id=3108&amp;action=new</guid>
		</item>
		<item>
			<title><![CDATA[SPS Manager / PLC Manager]]></title>
			<link>https://qelectrotech.org/forum/viewtopic.php?id=3107&amp;action=new</link>
			<description><![CDATA[<p> Da es mir zu aufwändig war alle Datenpunkte händisch einzeln in die Elemente zu schreiben, habe ich mir dafür ein Skript geschrieben. <br />Das Vorgehen ist wie folgt:<br />Zuerst werden alle IO-Module angelegt.<br />Hierbei muss direkt die Seitennummern vergeben werden.<br />Dann kann man das Skript starten und die qet Datei auswählen. Danach werden die entsprechenden Seiten eingegeben und geladen.<br />Hierbei müssen meine Bauteile verwendet werden bzw. die Variablen die ich in meinen Bauteilen nutze.<br />Danach kann man die Informationen wie Funktion, Adresse etc direkt aus der xlsx Datei in den Manager kopieren. Diese werden mit einem klick auf Übernehmen in die QET datei geschrieben.</p><p>Since it was too time-consuming for me to write all the data points into the elements manually, I wrote a script for this purpose. <br />The procedure is as follows:<br />First, all IO modules are created.<br />The page numbers must be assigned directly.<br />Then you can start the script and select the qet file. After that, the corresponding pages are entered and loaded.<br />My components must be used here, or rather the variables that I use in my components.<br />Then you can copy information such as function, address, etc. directly from the xlsx file into the manager. These are written to the QET file by clicking on Apply.</p><p>Translated with DeepL.com (free version) </p>]]></description>
			<author><![CDATA[null@example.com (Kellermorph)]]></author>
			<pubDate>Sat, 07 Feb 2026 14:47:20 +0000</pubDate>
			<guid>https://qelectrotech.org/forum/viewtopic.php?id=3107&amp;action=new</guid>
		</item>
		<item>
			<title><![CDATA[script auto numérotation des fils par folio]]></title>
			<link>https://qelectrotech.org/forum/viewtopic.php?id=3106&amp;action=new</link>
			<description><![CDATA[<p> Voici un script que j&#039;ai créer pour numéroter les fils par folio avec préfixe qui exclu les fils déjà numérotés, pratique pour les io.<br />la numérotation s&#039;effectue de bas en haut gauche droite en sélectionnant folio par folio.</p><p>ne prend en charge qui si les borne ont un nom en francais &quot;continuité&quot; </p>]]></description>
			<author><![CDATA[null@example.com (javdenech)]]></author>
			<pubDate>Sat, 07 Feb 2026 12:00:38 +0000</pubDate>
			<guid>https://qelectrotech.org/forum/viewtopic.php?id=3106&amp;action=new</guid>
		</item>
		<item>
			<title><![CDATA[script edition nomemclature]]></title>
			<link>https://qelectrotech.org/forum/viewtopic.php?id=3105&amp;action=new</link>
			<description><![CDATA[<p> Voici un script python que j&#039;ai creer pour éditer les propriétés des éléments dans un schema afin de pouvoir saisir directement le fabricant article description commentaire etc...</p><p><a href="https://drive.google.com/drive/folders/1gE0x8sLaZ0xIycHCxtgrd95E2zsUl-1L">https://drive.google.com/drive/folders/ … 5E2zsUl-1L</a> </p>]]></description>
			<author><![CDATA[null@example.com (javdenech)]]></author>
			<pubDate>Sat, 07 Feb 2026 11:53:34 +0000</pubDate>
			<guid>https://qelectrotech.org/forum/viewtopic.php?id=3105&amp;action=new</guid>
		</item>
		<item>
			<title><![CDATA[Verdrahtungsplan / wiring diagram]]></title>
			<link>https://qelectrotech.org/forum/viewtopic.php?id=3096&amp;action=new</link>
			<description><![CDATA[<p> Ich habe ein Python-Skript geschrieben, welches aus der .qet Datei die Verbindung, den Anschluss und deren Eigenschaften extrahiert.<br />Dies funktioniert auch Seiten übergreifend. <br />Man muss hier nur darauf achten, dass die Verbindungen so gezogen sind, wie sie nachher im Schaltschrank angeschlossen werden.<br />Als Beispiel:<br />Man kommt von einem Querverweis. Dieser geht auf das erste Bauteil. Von dem ersten Bauteil geht man dann zum zweiten Bauteil. Vom zweiten Bauteil geht man dann zum dritten Bauteil und vom dritten Bauteil zum Querverweis zur nächsten Seite. Dies ist nötig, damit die Verbindungen in die .qet Datei richtig geschrieben werden.</p><p>Optional kann man aktivieren, dass man eine CSV als Debugausgabe sowie eine CSV bekommt, die angibt, welche Verbindungen rausgefiltert wurden, da diese als doppelt erkannt wurden.</p><p>Die ausgegebene Datei wird an dem Ort, an dem die QET Datei liegt gespeichert.</p><p> Sollte der Wunsch bestehen, diese Funktion direkt in QET zu implementieren, kann ich versuchen hieraus eine C++ Datei zu erstellen.</p><p>English:<br />I wrote a Python script that extracts the connection, port, and their properties from the .qet file.<br />This also works across pages. <br />You just have to make sure that the connections are drawn the way they will be connected in the control cabinet.<br />For example:<br />You come from a cross-reference. This goes to the first component. From the first component, you then go to the second component. From the second component, you then go to the third component and from the third component to the cross-reference to the next page. This is necessary so that the connections are written correctly in the .qet file.</p><p>Optionally, you can enable the option to receive a CSV as debug output and a CSV that specifies which connections have been filtered out because they were recognized as duplicates.</p><p>The output file is saved in the location where the QET file is located.</p><p> If you would like to implement this function directly in QET, I can try to create a C++ file from this.</p><p>Translated with DeepL.com (free version) </p>]]></description>
			<author><![CDATA[null@example.com (Kellermorph)]]></author>
			<pubDate>Thu, 15 Jan 2026 19:13:30 +0000</pubDate>
			<guid>https://qelectrotech.org/forum/viewtopic.php?id=3096&amp;action=new</guid>
		</item>
		<item>
			<title><![CDATA[From diagram to 3D model: QElectroTech > QET Import > FreeCAD + Cables]]></title>
			<link>https://qelectrotech.org/forum/viewtopic.php?id=3093&amp;action=new</link>
			<description><![CDATA[<p> Hello,<br />I am the developer of <a href="https://github.com/sargo-devel/Cables">Cables Worbench</a> for FreeCAD. I do it mainly for myself, but made it available for the public.<br />At the same time, I use QElectroTech to create electrical diagrams (the more I get to know it, the more I like it).<br />In order to automate the model creation process to some extent, I decided to write a script that generates ready-made 3D models based on diagrams. Most of the work is performed automatically. Cable routing in FreeCAD is the main manual task in this process.</p><p>I work on such a workflow (to make a model of electrical installation in a house/apartment):<br />1. Prepare model of a house/apartment in FreeCAD<br />2. Make diagram of home electrical installation in QElectroTech as detailed as possible<br />3. Run an import script which will be able to create complete model of all elements, cables and connections in FreeCAD based on diagram from QElectroTech. Location of elements should be as close as possible to their final positions in the 3D space. At this stage, wires are just straight lines connecting elements.<br />4. Manually place all elements on their final positions in the 3D model of house (sockets, switches, light points, distribution boxes etc.)<br />5. Manually route base cable wires created in previous step on walls, ceillings etc. What helps in this step is that the starting and ending points of each cable are already attached to a specific element.<br />6. Run import script again to create all missing details: full cable shapes with all single wires and all interiors of distribution boxes with all connections inside<br />7. Final manual adjustment of cable routes and element placements</p><p>The result is a complete 3D model of electrical installation identical to the electrical diagram. The model can be exported as IFC file for further processing e.g. in a BIM workflow (e.g. create BOM list, rule checks, post-construction archiving etc.)<br />I know that there is commercial software doing all the above things pretty well, but I prefer FOSS solution and I didn&#039;t find any.</p><p>The core software component here is the import script I&#039;m working on (working name: QET Import). It is not public yet, it still needs a lot of work to be usable for others.</p><p><strong>Here come my questions to you professionals.</strong> Is it worth the effort?<br />I find it very useful for my own needs, but I would like to see your opinion about it.<br />E.g. Is it useless for electricians because they have to anyway route cables on real walls?<br />Is the electrical diagram itself sufficient in practice?<br />Are there other areas where such modelling would be useful?</p><p><strong>Another question:</strong><br />I had to use some tricks in QElectroTech diagram to achieve my goal (see apartment_example.qet below). Do you think it is practical to make such a diagram?<br />Does it break any established rules?</p><p>Here are some details about an example project of simple electrical installation in an apartment. This should help to clarify the whole idea.</p><p>The starting point:</p><p>1. Prepare model of a house/apartment in FreeCAD<br />The FreeCAD example apartment file (empty walls, before import): <a href="https://qelectrotech.org/forum/misc.php?action=pun_attachment&amp;item=3594&amp;download=1">apartment_example_empty.FCStd</a></p><p>2. Make diagram of home electrical installation in QElectroTech as detailed as possible<br />The QElectroTech example project file: <a href="https://qelectrotech.org/forum/misc.php?action=pun_attachment&amp;item=3595&amp;download=1">apartment_example.qet</a><br />Folio 1 image from above document: <a href="https://qelectrotech.org/forum/misc.php?action=pun_attachment&amp;item=3596&amp;preview">apartment folio 1</a></p><p>3. Run an import script which imports folios 1,2,3 from <a href="https://qelectrotech.org/forum/misc.php?action=pun_attachment&amp;item=3595&amp;download=1">apartment_example.qet</a>. At this stage, wires are just straight lines connecting elements.<br />The image from FreeCAD example apartment file after importing folios 1,2,3: <a href="https://qelectrotech.org/forum/misc.php?action=pun_attachment&amp;item=3597&amp;preview">base_wires.png</a></p><p>4. Manually place all elements on their final positions in the 3D model of house (sockets, switches, light points, distribution boxes etc.)<br />5. Manually route base cable wires created in previous step on walls, ceillings etc.<br />6. Run import script again to create all missing details: full cable shapes with all single wires and all interiors of distribution boxes with all connections inside</p><p>The image from FreeCAD example apartment file after steps 4,5,6 and after importing folios 4,5,6,7:<br /><a href="https://qelectrotech.org/forum/misc.php?action=pun_attachment&amp;item=3598&amp;preview">final_cables.png</a></p><p>The switchboard after automatic import: <a href="https://qelectrotech.org/forum/misc.php?action=pun_attachment&amp;item=3599&amp;preview">switchboard.png</a></p><p>7. Final manual adjustment of cable routes and element placements</p><p>The switchboard after manual routing: <a href="https://qelectrotech.org/forum/misc.php?action=pun_attachment&amp;item=3600&amp;preview">switchboard_final.png</a></p><br /><p>NOTE: In order to correctly open the <a href="https://qelectrotech.org/forum/misc.php?action=pun_attachment&amp;item=3601&amp;download=1">apartment_example_cables_final.FCStd</a> file, the following are needed:<br />- FreeCAD version 1.0.0 or newer<br />- Cable Workbench Addon installed by AddonManager from within FreeCAD. </p>]]></description>
			<author><![CDATA[null@example.com (SargoDevel)]]></author>
			<pubDate>Mon, 12 Jan 2026 19:16:35 +0000</pubDate>
			<guid>https://qelectrotech.org/forum/viewtopic.php?id=3093&amp;action=new</guid>
		</item>
		<item>
			<title><![CDATA[Klemmenplan 2. Versuch]]></title>
			<link>https://qelectrotech.org/forum/viewtopic.php?id=3091&amp;action=new</link>
			<description><![CDATA[<p> Hallo Miteinander,</p><p>es ist schon ein Weilchen her, dass ich einen Versuch unternommen habe eine App zu programmieren, die einen Klemmenplan erstellt.<br />Ich war sehr frustriert, nachdem ich sie hier hochgeladen hatte, hat sie bei mir selber auch nicht mehr funktioniert…</p><p>Heute ein neuer Versuch.</p><p>Nur als AppImmage, sie ist noch nicht ausgereift:</p><p>- Jegliche Formeln werden nicht akzeptiert: AutoFoliennummern, AutoBauteilnummern…<br />- Die App gibt keine Fehlermeldungen aus.<br />- Nur in deutscher Sprache<br />- Keine Brücke über eine Seite hinweg möglich.</p><p>Ganz wichtig: Werden neue Bauteile, Klemmen oder Betriebsmittel erstellt immer neue Terminals einfügen, sonst wird keine neue Terminal-uuid vergeben.<br />QET verträgt das, die KlemmenplanApp wird einfach keinen Klemmenplan erstellen.</p><p>Voraussetzungen für einen Klemmenplan:</p><p>- Die Terminals an einer Klemme an die ein Betriebsmittel angeschlossen wird müssen benannt sein (a,b,c,….) und als intern oder extern gekennzeichnet.<br />- die Terminals an einer Klemme für Brücken sind generisch und ohne Namen.</p><p>-die Verbindungen die eine Brücke darstellen müssen im Diagram als solche bezeichnet werden:<br />Der Text des Leiters muss „Brücke i1“ sein. i1 steht dabei für Intern 1.<br />Der Klemmenplan kann jeweils 3 Brücken intern und extern darstellen z.B. „Brücke e3“</p><p>- Die Terminals der Betriebsmittel müssen einen Namen erhalten. Betriebsmittelkennzeichen, Anlage und Ort müssen ausgefüllt sein.</p><p>Zum Ausprobieren am besten die Elemente/Bauteile, vor allem Klemmen, aus meinen Diagrammen verwenden.</p><p>Anwendung: App starten, QET-Datei auswählen, Klemmenplan erstellen.<br />Die Originaldatei bleibt erhalten, eine neue Datei mit „-terminals.qet“ wird erstellt.</p><p>Viel Spaß beim Probieren.<br />Ich freue mich auf Rückmeldungen und Verbesserungsvorschläge/Tipps. </p>]]></description>
			<author><![CDATA[null@example.com (Xander)]]></author>
			<pubDate>Wed, 07 Jan 2026 20:39:26 +0000</pubDate>
			<guid>https://qelectrotech.org/forum/viewtopic.php?id=3091&amp;action=new</guid>
		</item>
		<item>
			<title><![CDATA[Point to point wire/cable list generator]]></title>
			<link>https://qelectrotech.org/forum/viewtopic.php?id=3021&amp;action=new</link>
			<description><![CDATA[<p> This python script takes a qet project file and produces a point to point wiring list as a CSV file. It includes Foilo referencing of coming and going arrows but it will not work well with crosses, splices and other wire joins which were not of interest to my end use case anyway</p><p>An example of the CSV loaded in to excel is provided.</p><p>The propose was to provide a list of wires for wiring a machine/panel so the correct size an color of wire can be selected and correctly labeled and it is very obvious which terminals it connects to </p><p>and thus the list contains,</p><p>Start location, part, designator, terminal ID<br />End location, part designator, terminal ID<br />conductor_section, conductor_function, conductor color, and conductor number</p><p>Clearly the more you fill in for conductor details, and if you edit the symbols to actually use the terminal names you will get more out but it works for my purpose and may be it is of use to others?</p><br /><div class="codebox"><pre><code>import zipfile
import xml.etree.ElementTree as ET
import os
import tempfile
import csv

def extract_content_qet(file_path):
    &quot;&quot;&quot;Unzip .qetz or return .qet path&quot;&quot;&quot;
    if zipfile.is_zipfile(file_path):
        with zipfile.ZipFile(file_path, &#039;r&#039;) as zip_ref:
            temp_dir = tempfile.mkdtemp()
            zip_ref.extract(&#039;content.qet&#039;, temp_dir)
            return os.path.join(temp_dir, &#039;content.qet&#039;)
    return file_path

def build_terminal_uuid_map(root):
    &quot;&quot;&quot;Builds a dict mapping terminal UUIDs to their names&quot;&quot;&quot;
    terminal_map = {}
    for terminal in root.iter(&#039;terminal&#039;):
        uuid = terminal.get(&#039;uuid&#039;)
        name = terminal.get(&#039;name&#039;)
        if uuid and name:
            terminal_map[uuid] = name
    return terminal_map

def build_link_uuid_map(root):
    &quot;&quot;&quot;Builds a dict mapping link UUIDs to their associated element UUIDs&quot;&quot;&quot;
    link_map = {}

    for element in root.iter(&#039;element&#039;):
        element_uuid = element.get(&#039;uuid&#039;)
        links_node = element.find(&#039;links_uuids&#039;)
        if links_node is not None:
            for link in links_node.findall(&#039;link_uuid&#039;):
                link_uuid = link.get(&#039;uuid&#039;)
                if link_uuid:
                    print(f&quot;{element_uuid} -&gt; {link_uuid}&quot;)
                    link_map[link_uuid] = element_uuid  # You can also store the full element if needed
    return link_map


def find_element_by_uuid(root, target_uuid):
    &quot;&quot;&quot;Finds the &lt;element&gt; with the given UUID&quot;&quot;&quot;
    for element in root.iter(&#039;element&#039;):
        if element.get(&#039;uuid&#039;) == target_uuid:
            return element
    return None


def find_parent_by_uuid(root, target_uuid):
    &quot;&quot;&quot;Finds the parent of the &lt;element&gt; with the given UUID&quot;&quot;&quot;
    for parent in root.iter(&#039;diagram&#039;):
        
        for child in parent.iter(&#039;element&#039;):
            if child.get(&quot;uuid&quot;) == target_uuid:
                return parent
    return None

def extract_conductors_with_terminal_names(root, terminal_map,link_map):
    &quot;&quot;&quot;Extracts conductor data and resolves terminal UUIDs to names&quot;&quot;&quot;
    conductors = []

    seenlinks = []
    
    for conductor in root.iter(&#039;conductor&#039;):
        start_uuid = conductor.get(&#039;terminal1&#039;)
        end_uuid = conductor.get(&#039;terminal2&#039;)


        element1_name = conductor.get(&#039;element1_name&#039;)
        element1_label = conductor.get(&#039;element1_label&#039;)
        element1_uuid =conductor.get(&#039;element1&#039;)
        
        element2_name = conductor.get(&#039;element2_name&#039;)
        element2_label = conductor.get(&#039;element2_label&#039;)
        element2_uuid =conductor.get(&#039;element2&#039;)

        seen = False

        
        if(conductor.get(&#039;element1_name&#039;) == &quot;Going arrow&quot; or conductor.get(&#039;element1_name&#039;) == &quot;Coming arrow&quot;):
            element1_name = &quot;*****&quot;;
            print(&quot;Element 1 is a reference&quot;)
            print(f&quot;Element 1 uuid = {element1_uuid}&quot;)
            ele = find_element_by_uuid(root,element1_uuid )
            if ele is not None:
                links_node = ele.find(&#039;links_uuids&#039;)
                if links_node is not None:
                    for link in links_node.findall(&#039;link_uuid&#039;):
                        link_uuid = link.get(&#039;uuid&#039;)
                        if link_uuid:

                            if link_uuid in seenlinks:
                                print(f&quot;link uuuid {link_uuid} already seen&quot;)
                                seen=True
                            else:
                                print(f&quot;Element 1 link uuuid {link_uuid}&quot;)
                                for conductor2 in root.iter(&#039;conductor&#039;):
                                    if conductor2.get(&#039;element2&#039;) == link_uuid:
                                        print(f&quot;adding {element1_uuid}&quot;)
                                        seenlinks.append(element1_uuid)
                                        element1_name = conductor2.get(&#039;element1_name&#039;)
                                        element1_label = conductor2.get(&#039;element1_label&#039;)
                                        element1_uuid = conductor2.get(&#039;element1&#039;)
                                        start_uuid = conductor2.get(&#039;terminal1&#039;)
                                    if conductor2.get(&#039;element1&#039;) == link_uuid:
                                        print(f&quot;adding {element2_uuid}&quot;)
                                        seenlinks.append(element2_uuid)
                                        element1_name = conductor2.get(&#039;element2_name&#039;)
                                        element1_label = conductor2.get(&#039;element2_label&#039;)
                                        element1_uuid = conductor2.get(&#039;element2&#039;)
                                        start_uuid = conductor2.get(&#039;terminal2&#039;)
                                      
             
        if(conductor.get(&#039;element2_name&#039;) == &quot;Going arrow&quot; or conductor.get(&#039;element2_name&#039;) == &quot;Coming arrow&quot;):
            print(&quot;Element 2 is a reference&quot;)
            print(f&quot;Element 2 uuid = {element2_uuid}&quot;)
            ele = find_element_by_uuid(root,element2_uuid )
            if ele is not None:
                links_node = ele.find(&#039;links_uuids&#039;)
                if links_node is not None:
                    for link in links_node.findall(&#039;link_uuid&#039;):
                        link_uuid = link.get(&#039;uuid&#039;)
                        if link_uuid:
                            if link_uuid in seenlinks:
                                print(f&quot;link uuuid {link_uuid} already seen&quot;)
                                seen=True
                            else: 
                                print(f&quot;Element 2 link uuuid {link_uuid}&quot;)
                                for conductor2 in root.iter(&#039;conductor&#039;):
                                    if conductor2.get(&#039;element1&#039;) == link_uuid:
                                        print(f&quot;adding {element2_uuid}&quot;)
                                        seenlinks.append(element2_uuid)
                                        element2_name = conductor2.get(&#039;element2_name&#039;)
                                        element2_label = conductor2.get(&#039;element2_label&#039;)
                                        element2_uuid = conductor2.get(&#039;element2&#039;)
                                        end_uuid = conductor2.get(&#039;terminal2&#039;)
                                    if conductor2.get(&#039;element2&#039;) == link_uuid:
                                        print(f&quot;adding {element1_uuid}&quot;)
                                        seenlinks.append(element1_uuid)
                                        element2_name = conductor2.get(&#039;element1_name&#039;)
                                        element2_label = conductor2.get(&#039;element1_label&#039;)
                                        element2_uuid = conductor2.get(&#039;element1&#039;)
                                        end_uuid = conductor2.get(&#039;terminal1&#039;)
                                       
            

        ele1 = find_element_by_uuid(root,element1_uuid )
        ele2 = find_element_by_uuid(root,element2_uuid )

        element1_loc = &quot;&quot;
        element2_loc = &quot;&quot;
        
        info_container = ele1.find(&#039;elementInformations&#039;)
        if info_container is not None:
            for elem in info_container.findall(&#039;elementInformation&#039;):
                if elem.attrib.get(&#039;name&#039;) == &#039;location&#039;:
                    element1_loc = elem.text

        info_container = ele2.find(&#039;elementInformations&#039;)
        if info_container is not None:
            for elem in info_container.findall(&#039;elementInformation&#039;):
                if elem.attrib.get(&#039;name&#039;) == &#039;location&#039;:
                    element2_loc = elem.text

        
        if seen == False :


            if not element1_loc:
                print(f&quot;Element1 loc is empty&quot;)
                parent = find_parent_by_uuid(root,element1_uuid)
                if parent:
                    element1_loc = &quot;+&quot;+parent.get(&#039;locmach&#039;)

            if not element2_loc:
                print(f&quot;Element2 loc is empty&quot;)
                parent = find_parent_by_uuid(root,element2_uuid)
                if parent:
                    element2_loc = &quot;+&quot;+parent.get(&#039;locmach&#039;)
                
                
            conductors.append({
                &#039;S LOC&#039;: element1_loc,
                &#039;S PART&#039;: element1_name,
                &#039;S DESIGNATOR&#039;: element1_label,
                &#039;S TERMINAL&#039;: terminal_map.get(start_uuid),
                &#039;E LOC&#039;: element2_loc,
                &#039;E PART&#039;: element2_name,
                &#039;E DESIGNATOR&#039;: element2_label,
                &#039;E TERMINAL&#039;: terminal_map.get(end_uuid),
                &#039;Conductor Section&#039;: conductor.get(&#039;conductor_section&#039;),
                &#039;Conductor Function&#039;: conductor.get(&#039;function&#039;),
                &#039;Color&#039;: conductor.get(&#039;conductor_color&#039;),
                &#039;Designator&#039;: conductor.get(&#039;num&#039;)
        })
    return conductors

def process_qet_file(file_path, output_csv=&#039;conductors_named.csv&#039;):
    qet_path = extract_content_qet(file_path)
    tree = ET.parse(qet_path)
    root = tree.getroot()

    terminal_map = build_terminal_uuid_map(root)
    link_map = build_link_uuid_map(root)
    conductors = extract_conductors_with_terminal_names(root, terminal_map,link_map)

    # Output to CSV
    if conductors:
        with open(output_csv, &#039;w&#039;, newline=&#039;&#039;) as f:
            writer = csv.DictWriter(f, fieldnames=conductors[0].keys())
            writer.writeheader()
            writer.writerows(conductors)
        print(f&quot;Exported {len(conductors)} conductors to {output_csv}&quot;)
    else:
        print(&quot;No conductors found.&quot;)

# Example usage
if __name__ == &quot;__main__&quot;:
    process_qet_file(&quot;c:\\yourfile.qet&quot;)
        </code></pre></div><p> </p>]]></description>
			<author><![CDATA[null@example.com (robin.cornelius)]]></author>
			<pubDate>Tue, 02 Sep 2025 15:34:49 +0000</pubDate>
			<guid>https://qelectrotech.org/forum/viewtopic.php?id=3021&amp;action=new</guid>
		</item>
		<item>
			<title><![CDATA[Python script to generate vertical line numbers for ladder style]]></title>
			<link>https://qelectrotech.org/forum/viewtopic.php?id=2995&amp;action=new</link>
			<description><![CDATA[<p> I have been bending QElectroTech to do my bidding which right now is ladder style diagrams. I still see a huge number of these style diagrams even on new equipment here in the USA.</p><p>Input: Starting number, Increment, Y increment in pixels, Max height in pixels. It will generate code to copy to the clipboard which you can then paste into your folio in QElectroTech. </p>]]></description>
			<author><![CDATA[null@example.com (lonnie.headley)]]></author>
			<pubDate>Sun, 13 Jul 2025 12:29:26 +0000</pubDate>
			<guid>https://qelectrotech.org/forum/viewtopic.php?id=2995&amp;action=new</guid>
		</item>
		<item>
			<title><![CDATA[Templates Import]]></title>
			<link>https://qelectrotech.org/forum/viewtopic.php?id=2990&amp;action=new</link>
			<description><![CDATA[<p> Guten Tag zusammen<br />Ich habe mir eine neue Funktion gebaut, die euch evtl auch hilfreich sein kann.<br />Es geht darum seine eigenen Vorlagen zu erstellen, welche man dann in eine .qet Datei integrieren kann. <br />Oben gibt es 3 Schaltflächen. qet Datei auswählen, Bauteile importieren, Seitenbibliothek laden<br />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.<br />Danach muss die Seitenbibliothek geladen werden.<br />Hier müssen die datein als .txt abgespeichert werden. In der Bibliothek sind Unterordner möglich, wodurch in der GUI Reiter entstehen.<br />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.<br />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.</p><p>Die Datei ist zu groß zum hochladen im Forum und auf Github. Nur der Quellcode liegt unter:<br /><a href="https://github.com/Kellermorph/qet-seiten-editor">https://github.com/Kellermorph/qet-seiten-editor</a><br />Der ganze Ordner inkl. der virtuellen Umgebung und das Appimage können 3 Tage lange über folgenden Link heruntergeladen werden:</p><p><a href="https://we.tl/t-W9rk4KDexC">https://we.tl/t-W9rk4KDexC</a></p><p>Die Datei ist ein Erst-Entwurf. Über Feedback würde ich mich freuen.</p><p>Hello everyone<br />I have built a new function that may also be helpful to you.<br />It&#039;s about creating your own templates, which you can then integrate into a .qet file. <br />There are 3 buttons at the top. Select qet file, import components, load page library<br />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.<br />The page library must then be loaded.<br />Here the files must be saved as .txt. Subfolders are possible in the library, creating tabs in the GUI.<br />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.<br />You can create the .txt file yourself by opening the .qet file with a text editor and then copying and saving the entire page.</p><p>The file is too large to upload to the forum and Github. Only the source code can be found at:<br /><a href="https://github.com/Kellermorph/qet-seiten-editor">https://github.com/Kellermorph/qet-seiten-editor</a><br />The whole folder including the virtual environment and the app image can be downloaded for 3 days via the following link:</p><p><a href="https://we.tl/t-W9rk4KDexC">https://we.tl/t-W9rk4KDexC</a></p><p>The file is a first draft. I would be pleased to receive feedback. </p>]]></description>
			<author><![CDATA[null@example.com (Kellermorph)]]></author>
			<pubDate>Tue, 08 Jul 2025 20:25:04 +0000</pubDate>
			<guid>https://qelectrotech.org/forum/viewtopic.php?id=2990&amp;action=new</guid>
		</item>
		<item>
			<title><![CDATA[Python script for generate cross-references in .pdf file]]></title>
			<link>https://qelectrotech.org/forum/viewtopic.php?id=2982&amp;action=new</link>
			<description><![CDATA[<p> Hello everybody!</p><p>In the company where I work, Faramax, we have created (with the help of AI, because we are not code programmers), this program in Phyton to create links between references in a .pdf file<br />This is a stopgap while the integrated function in QET is being developed, which would be great. Wish we could help with this, but as I said we are not programmers.<br />We have based it on this, but I prefer to create a new topic so we don&#039;t mix up the posts: <a href="https://qelectrotech.org/forum/viewtopic.php?id=2915">https://qelectrotech.org/forum/viewtopic.php?id=2915</a></p><p>This program have calibration and adjustment options. It does not acquire the positions of the QET elements, but creates a virtual grid that must be adjusted with the row, column and px values that it adjusts in the QET sheets.<br />Alse, the program have additional offset settings for fine tuning.</p><p>When the program finds a relation to the selected structure, it creates a link to the target page and grid position, with the selected settings and zoom.</p><p>Attached you can find the programme in .py and in a ready for windows .exe inside the .rar</p><p>Hopefully this tool will be useful to many people, until QET integrates the function to include the links in the exported pdf.</p><p>I would also like to thank the developers of this fantastic tool that helps a lot of people.</p><p>BR,<br />Alfonso. </p>]]></description>
			<author><![CDATA[null@example.com (Alfonso)]]></author>
			<pubDate>Mon, 16 Jun 2025 11:00:36 +0000</pubDate>
			<guid>https://qelectrotech.org/forum/viewtopic.php?id=2982&amp;action=new</guid>
		</item>
		<item>
			<title><![CDATA[Zusatzfunktionen]]></title>
			<link>https://qelectrotech.org/forum/viewtopic.php?id=2938&amp;action=new</link>
			<description><![CDATA[<p> Guten Tag zusammen,</p><p>ich habe mir 3 extra Funktionen per externen Programm geschrieben.<br />Die erste Funktion ist die Klemmen aus der .qet Datei auszulesen und neu durch zu nummerieren.<br />Hierbei werden die Klemmen nach BMK sortiert. Also alles vor dem Doppelpunkt. Dort wird die Sortierung / Nummerierung von vorne Seitenweise vorgenommen und dann erst entlang der X-Achse. Sollten 2 Klemmen die gleiche X-Achse haben, wird die höhere (niedriger Y-Wert) zuerst genommen. Daraus wird dann im Verzeichnis eine neue .qet Datei erstellt.</p><p>Die 2. Funktion ist eine Kabelliste erstellen. Hierbei müssen Kabel wie in meiner mit hochgeladenen Datei definiert sein. Hier wird nun jedes Einzelbauteil (simple) mit einem BMK das W drin hat gesucht. Dann werden die Conductor Einträge abgesucht und dort wird nach Y-Wert der Startpunkt und der Zielpunkt festgelegt. Die Ausgabe erfolgt per .csv</p><p>Die 3. Funktion ist eine Klemmenliste. Die Vorgehensweise ist ähnlich wie die der Kabelliste, nur dass die Funktionen der Leitungen überprüft werden und wenn es die gleiche ist, wird in einer Spalte bei Brücken ein Punkt gesetzt. Die nächste Funktion wird dementsprechend in die nächste Spalte gesetzt. Auch hier erfolgt die Ausgabe per CSV.</p><p>Ich habe 2 Tabellen angehangen, in die man die .csv dann einfach reinkopieren kann. Dann kann man eine PDF erstellen und diese zu einer PNG umwandeln um die in QElectrotech zu integrieren. Die Optik ist nahe der Tabelle von QElectrotech. Eine Beispiel .qet Datei ist auch dabei</p><p>Translation:<br />Hello everyone,</p><p>I have written 3 extra functions using an external program.<br />The first function is to read the terminals from the .qet file and renumber them.<br />The terminals are sorted according to BMK. So everything before the colon. There the sorting / numbering is done page by page from the front and then along the X-axis. If 2 terminals have the same X-axis, the higher one (lower Y-value) is taken first. A new .qet file is then created from this in the directory.</p><p>The 2nd function is to create a cable list. Cables must be defined as in my uploaded file. Each individual component (simple) with a BMK that has W in it is now searched for here. Then the conductor entries are searched and the start point and the target point are defined according to the Y value. The output is via .csv</p><p>The 3rd function is a terminal list. The procedure is similar to that of the cable list, except that the functions of the lines are checked and if it is the same, a point is set in a column for bridges. The next function is placed in the next column accordingly. Here too, the output is via CSV.</p><p>I have attached 2 tables into which you can simply copy the .csv. Then you can create a PDF and convert it to a PNG to integrate it into QElectrotech. The look is similar to the QElectrotech table. An example .qet file is also included</p><p>Translated with DeepL.com (free version) </p>]]></description>
			<author><![CDATA[null@example.com (Kellermorph)]]></author>
			<pubDate>Fri, 04 Apr 2025 13:16:44 +0000</pubDate>
			<guid>https://qelectrotech.org/forum/viewtopic.php?id=2938&amp;action=new</guid>
		</item>
		<item>
			<title><![CDATA[Functional Cross-Reference in PDF]]></title>
			<link>https://qelectrotech.org/forum/viewtopic.php?id=2933&amp;action=new</link>
			<description><![CDATA[<p> I created an app image.<br />The program searches the cross-references in the PDF and then links to the page it finds. For example, at 22.7 the program links to p. 22. The drawback here is that you can&#039;t have any jumps in the circuit diagram. You can select the cross-reference type at the top. For page.column use X.X and for page.row.column use X.X.X. However, I have only tested X.X, as my cross-references look like this. I hope the program can be useful for some people, as the question about cross-references in the PDF has often been asked in the forum.<br />I have attached the app image + the source code in a .zip. </p>]]></description>
			<author><![CDATA[null@example.com (Kellermorph)]]></author>
			<pubDate>Sat, 22 Mar 2025 20:25:42 +0000</pubDate>
			<guid>https://qelectrotech.org/forum/viewtopic.php?id=2933&amp;action=new</guid>
		</item>
		<item>
			<title><![CDATA[.DKlemmenplan Tabelle]]></title>
			<link>https://qelectrotech.org/forum/viewtopic.php?id=2930&amp;action=new</link>
			<description><![CDATA[<p>Hallo Miteinander,</p><p>ich habe mich mal an einem Klemmenplan versucht. Das ist tatsächlich mein erstes Programm. In Python, C++ bin ich nicht durchgestiegen.</p><p>Die angehängten QET-Files können zum Ausprobieren verwendet werden, weil die Klemmentabelle nur mit bestimmtem Klemmenaufbau funktioniert.</p><p>Viele Grüße<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Xander</p><p><span class="postimg"><img src="https://download.qelectrotech.org/qet/forum_img_2/2_stromlaufplan.svg" alt="https://download.qelectrotech.org/qet/forum_img_2/2_stromlaufplan.svg" /></span><br /><span class="postimg"><img src="https://download.qelectrotech.org/qet/forum_img_2/3_klemmleiste_-x1_-_1.svg" alt="https://download.qelectrotech.org/qet/forum_img_2/3_klemmleiste_-x1_-_1.svg" /></span><br /><span class="postimg"><img src="https://download.qelectrotech.org/qet/forum_img_2/4_klemmleiste_-xpr_-_1.svg" alt="https://download.qelectrotech.org/qet/forum_img_2/4_klemmleiste_-xpr_-_1.svg" /></span></p>]]></description>
			<author><![CDATA[null@example.com (Xander)]]></author>
			<pubDate>Fri, 21 Mar 2025 20:30:15 +0000</pubDate>
			<guid>https://qelectrotech.org/forum/viewtopic.php?id=2930&amp;action=new</guid>
		</item>
		<item>
			<title><![CDATA[This Freecad script will allow import wires from Qelectrotech project]]></title>
			<link>https://qelectrotech.org/forum/viewtopic.php?id=2923&amp;action=new</link>
			<description><![CDATA[<p> <strong>QetWireManager</strong><br />I created a script in collaboration with AI <img src="https://qelectrotech.org/forum/img/smilies/nomicons/wink.png" width="20" alt="nomicons/wink" /><br />Freecad script will allow you to import wires(conductors) from Qelectrotech and manage it in 3d space and get wires length <br /><a href="https://github.com/Kliurka/QetWireManager">https://github.com/Kliurka/QetWireManager</a><br />I created the script for my own needs, it satisfies me so far, but comments and requests are welcome. Video with instructions is on github<br />P.S.<br />I am not a programmer, I am a vacuum systems engineer <img src="https://qelectrotech.org/forum/img/smilies/nomicons/wink.png" width="20" alt="nomicons/wink" /> </p>]]></description>
			<author><![CDATA[null@example.com (baruse)]]></author>
			<pubDate>Mon, 17 Mar 2025 12:53:54 +0000</pubDate>
			<guid>https://qelectrotech.org/forum/viewtopic.php?id=2923&amp;action=new</guid>
		</item>
	</channel>
</rss>
