1

Topic: export numeric conductor

hi, i have a question. i make a new project and I numbered the Components. Now i want expot numbered conductor of my project but
I do not know how to do.

I have to manually copy the number of the conductor? It is a very long process with great loss of time. there is no way to read the project and export the conductor numbers?


thank's

2

Re: export numeric conductor

Hi,

you want export all conductors name to a list, or add your conductors, element autonum rules to new project?

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."Questions regarding QET belong in this forum and will NOT be answered via PM! – Les questions concernant QET doivent être posées sur ce forum et ne seront pas traitées par MP !

3

Re: export numeric conductor

hi, i wont export conductor name into list if possible. i need a list of name of conductor.

4

Re: export numeric conductor

@ karlAttrezzi

at the moment, it's not possible to export a wiring list (with conductor numbers, section, length and color) directly from QET.

But... Obvisouly, someone has already managed to do something similar using XSLT filters:
https://qelectrotech.org/forum/viewtopic.php?id=938
Sorry the topic is in french, use google translate.
Unfortunately, the user has not shared further information on how he achieved to do this.

5

Re: export numeric conductor

ok, thanks

6

Re: export numeric conductor

Nuri wrote:

@ karlAttrezzi

at the moment, it's not possible to export a wiring list (with conductor numbers, section, length and color) directly from QET.

Yes, you can, but you need to use XMLStarlet  for extract a list <conductors> key and num="" value.




List of conductor properties :

  • condsize                -> conductor size

  • function

  • tension-protocol

  • formula

  • type                       -> multi/single

  • color                      -> example #ff0000

  • num                      -> conductor name

example :


 <conductor condsize="1" terminal2="15" function="test" numsize="7" horizrotatetext="0" x="0" y="0" num="1" onetextperfolio="1" displaytext="1" formula="" type="multi" tension-protocol="380v" vertirotatetext="270" terminal1="12" freezeLabel="false">
                <sequentialNumbers/>
            </conductor>
 
<conductor condsize="1.8" terminal2="11" function="" numsize="7" horizrotatetext="0" x="0" y="0" num="2" onetextperfolio="1" displaytext="1" formula="" type="multi" color="#ff0000" tension-protocol="" vertirotatetext="270" terminal1="8" freezeLabel="false">
                <sequentialNumbers/>

XMLStarlet in QET examples :



https://qelectrotech.org/forum/viewtopi … 3777#p3777
https://qelectrotech.org/forum/viewtopi … 4579#p4579

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."Questions regarding QET belong in this forum and will NOT be answered via PM! – Les questions concernant QET doivent être posées sur ce forum et ne seront pas traitées par MP !

7

Re: export numeric conductor

Or use grep, sed awk xml_grep, etc

https://download.qelectrotech.org/qet/forum_img/conductor_num.png

laurent@debian:~/Desktop$ grep -oP 'conductor num="\K[^"]*' 3.qet  
conduc text=1
conduc text=2
conduc text=3
conduc text=4

https://download.qelectrotech.org/qet/forum_img/conductor_num1.png

https://download.qelectrotech.org/qet/forum_img/conductor_num3.png

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."Questions regarding QET belong in this forum and will NOT be answered via PM! – Les questions concernant QET doivent être posées sur ce forum et ne seront pas traitées par MP !

8

Re: export numeric conductor

Other example : i want to extract in my project "parc_bois25.qet" all conductors name and export into a spreadsheet.

https://download.qelectrotech.org/qet/forum_img/conductor_num4.png

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."Questions regarding QET belong in this forum and will NOT be answered via PM! – Les questions concernant QET doivent être posées sur ce forum et ne seront pas traitées par MP !

9

Re: export numeric conductor

https://download.qelectrotech.org/qet/forum_img/conductor_num5.png


sed -n -e '/conductor/,/num/p' 3.qet | grep -oP 'num="\K[^"]*'                  
30
20
1

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."Questions regarding QET belong in this forum and will NOT be answered via PM! – Les questions concernant QET doivent être posées sur ce forum et ne seront pas traitées par MP !

10 (edited by scorpio810 2016-12-22 19:00:54)

Re: export numeric conductor

Based on Galexis script :



https://qelectrotech.org/forum/viewtopi … 4579#p4579


<conductors>
            <conductor x="0" type="multi" formula="555222" freezeLabel="false" numsize="7" horizrotatetext="0" function="L1" onetextperfolio="1" y="0" terminal1="14" vertirotatetext="270" terminal2="13" num="555222" displaytext="1" condsize="3" color="#00ffff" tension-protocol="220V">
                <sequentialNumbers/>
            </conductor>
            <conductor x="0" type="multi" formula="" freezeLabel="false" numsize="7" horizrotatetext="0" function="TER" onetextperfolio="1" y="0" terminal1="0" vertirotatetext="270" terminal2="3" num="hhhh" displaytext="1" condsize="1" tension-protocol="48V">
                <sequentialNumbers/>
            </conductor>
            <conductor x="0" type="multi" formula="" freezeLabel="false" numsize="7" horizrotatetext="0" function="L3" onetextperfolio="1" y="0" terminal1="4" vertirotatetext="270" terminal2="7" num="test" displaytext="1" condsize="1" tension-protocol="110V">
                <sequentialNumbers/>
            </conductor>
            <conductor x="0" type="multi" formula="" freezeLabel="false" numsize="7" horizrotatetext="0" function="L2" onetextperfolio="1" y="0" terminal1="8" vertirotatetext="270" terminal2="11" num="25" displaytext="1" condsize="2" color="#0055ff" tension-protocol="380V">
                <sequentialNumbers/>
            </conductor>
        </conductors>


laurent@debian:~/Desktop$ xmlstarlet sel -T -t -m /project/diagram/conductors/conductor -s A:N:- "@num" -v "concat(@num,';',@condsize,';',@function,';',@tension-protocol,';',@type,';',@color,';')" -n 4.qet               
hhhh;1;TER;48V;multi;;
test;1;L3;110V;multi;;
25;2;L2;380V;multi;#0055ff;
555222;3;L1;220V;multi;#00ffff;





https://download.qelectrotech.org/qet/forum_img/conductor_num6.png

https://download.qelectrotech.org/qet/forum_img/conductor_num7.png

Post's attachments

Attachment icon extract_conductors.csv 158 b, 407 downloads since 2016-12-22 

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."Questions regarding QET belong in this forum and will NOT be answered via PM! – Les questions concernant QET doivent être posées sur ce forum et ne seront pas traitées par MP !

11

Re: export numeric conductor

Order by folio :

xmlstarlet sel -T -t -m /project/diagram/conductors/conductor -s A:N:- "@diagram" -v "concat(@num,';',@condsize,';',@function,';',@tension-protocol,';',@type,';',@color,';')" -n 4.qet

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."Questions regarding QET belong in this forum and will NOT be answered via PM! – Les questions concernant QET doivent être posées sur ce forum et ne seront pas traitées par MP !