Thanks for the answer Joshua.

But I haven't been able to relate the UUID of the terminal with the Id in the instance of the element. Do you have any directions on how can I do it?

Thank you Joshua,

I'll change the way I'm processing the conductors so it works with both syntaxis.


I have a script that number de conductors in my project using the color of the conductor and the order of the elements by folio, X-position and Y-position. I extract the group of conductors that are suppose to have the same number using the id of the terminals in the element.

But with the v0.9 I'm having a problem, some conductors don't have the terminal as is in the element but the UUID of the terminal as in the collection and the UUID of the element it belongs to:

<conductor horizontal-alignment="AlignBottom" displaytext="1" formula="" text_color="#000000" conductor_section="" num="_" cable="" tension_protocol="" bus="" numsize="7" y="0" horizrotatetext="0" type="multi" dash-size="2" color2="#000000" x="0" onetextperfolio="0" element2="{d9b0ea30-87a5-4a55-9fb8-56e6d9d03bab}" condsize="1" vertirotatetext="270" conductor_color="" freezeLabel="false" function="" bicolor="false" terminal1="0" terminal2="{05fdba7b-6122-47ce-9e68-fe7ebc9c3df3}" vertical-alignment="AlignRight">

This is happening with the elements I've done with version 0.9.

I'm trying to change my script, so it finds the id terminal using the element uuid and the terminal uuid in the condcutor. How do I do it? it seems that I might have to do it with the orientation of the terminal, cause there is no relation between the terminal in the element of the diagram and the terminal of the element in the collection:

In the diagram

<terminal x="0" number="_" id="48" name="_" y="-11" orientation="0" nameHidden="0"/>
<terminal x="0" number="_" id="49" name="_" y="11" orientation="2" nameHidden="0"/>

In the collection

<terminal x="0" name="" y="15" orientation="s" uuid="{05fdba7b-6122-47ce-9e68-fe7ebc9c3df3}"/>
<terminal x="0" name="" y="-15" orientation="n" uuid="{67931c05-57c6-40dd-8607-3e2bb47feaa8}"/>



(20 replies, posted in Scripts)

Hi Paulius,

From what I saw your old elements don´t have the same prefix as the new elements (KM1, KM2, KM3). The script posted previously won't renumber those old elements as they do not have the same prefix. I have been working on the script, adding some functionalities, I will post about this later, but for the time this might help you.

I made an example emulating what you posted. I relabeled the elements (OLD, VERYOLD). The element's name is:embed://import/10_electric/fabricantes/controladores_visualizadores/pixsys/atr142-abc.elmt and the prefix I want to use is KM.


python -i TEST.qet -o TEST_vr.qet -s8 -e atr142-abc.elmt -p KM

This will number the elements with the name 'atr142-abc.elmt' with a prefix different to KM. This only works with the formaula text+number.

Notice they won´t be numbered with the elements in the order of position x,y. If you want to organize them, then use: python -i TEST_vr.qet -o TEST_vr.qet -s4

You might need to install lxml to run the script

Hope this helps.


(20 replies, posted in Scripts)

Hi Paulius,

Do the old elements have any labels already? or are they without label?


(20 replies, posted in Scripts)


Thank you for your script Jan, it was definitely useful for me. I modified it a little bit according to my needs, I have numbering configurations with text with more than 1 letter, and the prefix was different (only the first letter of the label). This script renumbers all the elements in the project that have a label in the element information, overlooking the prefix. So the elements are organized according to the label, also is only for units, but I think it can be easily modified for tens and hundreds. Also, it changes the sequential number, the element information, and the dynamic text, so when you export the components list the label and the formula are the same (if it had a formula in the beginning).


python -i xmltest.qet -o xmltest_renumbered.qet

I hope somebody finds this useful as well.