Hi,

the problem is that if a page has some terminals, must have a minimum of one cable.

The next version will fix it, but for now there are 2 solutions:

1. Draw some cable (see the image as an example)
2. For reserve terminals, there are a field in the plug-in that allows it without drawing one-by-one at the schema. The field is different for every terminal block.

Hi Nicogrim, I've checked your QET schema and the problem is the logo at the title block.

The QET schema files are a XML type file, and the library I use in the Terminal Block plug-in requires that the XML file is well-formed.
If you get a error likes this : "xml.etree.ElementTree.ParseError: unbound prefix: line 8, column 20", open the qet schema file in a text editor and you will see this (line 8)

    <ns0:svg ns1:version="0.46+devel" id="Livello_1" ns1:output_extension="org.inkscape.output.svgz.inkscape" viewBox="0 0 116 116" width="128" ns1:export-filename="/home/pinheiro/pics/oxygen-icons/scalable/apps/QElectroTech.png" overflow="visible" ns1:export-ydpi="67.5" xml:space="preserve" ns2:version="0.32" height="128" ns2:docname=" QElectroTech.svgz" enable-background="new 0 0 116 116" ns1:export-xdpi="67.5" version="1.0">

The "ns0" of the "ns0:svg" is a XML namespace ( https://www.w3schools.com/XML/xml_namespaces.asp ), and must be defined berefe the first use.
The easy wey to solve this is adding de namesapce definition in the first line:

Original first line:

<project folioSheetQuantity="1" title="CTA SBO 39CZ450" version="0.70">

Modified first line with the namespace definition:

<project folioSheetQuantity="1" title="CTA SBO 39CZ450" version="0.70" xmlns:ns0="ns0">

Specifically in your XML file there are 7 different namespaces used but not defined. So the solution is change the first line like this:

<project folioSheetQuantity="1" title="CTA SBO 39CZ450" version="0.70" xmlns:ns0="ns0" xmlns:ns1="ns1"  xmlns:ns2="ns2" xmlns:rdf="rdf" xmlns:ns4="ns4" xmlns:dc="dc"  xmlns:ns6="ns6">

The easy way to find all namespaces is fix one editing the first line, save it, and try again the plugin from the console. A new unbound error will say you where are a next namespace.

PD: I've checked the possibility that the ElementTree library I use in the plugin omits the namespaces, but didn't find the possibility.

The new version 1.1.6 solves the problem: https://qelectrotech.org/forum/viewtopi … 995#p12995

Hi. A new version is launched: 1.1.6

This version solves:
- the problem if the 'folioSheetQuantity' attribute doesn't exist (last dev versions of QET don't use it).
- mouse right click did not work in MacOS.


There are 2 options to install the plugin:

A. Using python pip

Requires python 3.5 or above.

>> First install on Linux (Debian based distros)
1. In a terminalm install python3 and GUI library:
    sudo apt-get install python3 python3-tk python3-pip
2. Install the program: 
    sudo pip3 install qet_tb_generator
3. Launch the plugin from the 'Project' menu of QElectrotech.

>> Update on Linux
sudo python3 -m pip install --upgrade qet_tb_generator

>> First install on Windows
1. Install, if required, python 3.5 or above
2. pip3 install qet_tb_generator

>> Update on Windows
python -m pip install --upgrade qet_tb_generator


B. Using the portable versions. Available at:

Windows: https://download.qelectrotech.org/qet/builds/nightly/
Rename to qet_tb_generator.exe and put it on your C:\Users\[username]\AppData\qet\

Linux: https://download.qelectrotech.org/qet/builds/AppImage/
Rename to qet_tb_generator, mark "qet_tb_generator" as executable and put it Put it  to ~/.qet/

Ok, will fix it 2 weeks.

I used http://www.pyinstaller.org/ to generate the portable versions for Linux & Windows. It would work in macOS also.

Perfect !! Thanks.  Now it's easy to install.
You could even change the description to install the plugin when you click on the menu in QET if the plugin is not installed.

To create the portable versions I've used http://www.pyinstaller.org/ . Works also on Mac OS.

I found the solution because of the rigth click no works on Mac. For historical reasons the rigth click is Button-2 on Win & Linux, but is Button-3 on Mac.
I attach the main.py file fixed to overwrite yours if you were able to create the bundle on Mac.

Thanks again.

Hi, I checked that there are a lot of posts and problems about the installation of the plugin.

Now are available portable versions for Linux and Windows (if somebody uses Mac OS and could create also the Mac version will be perfect).

This portable versions don't require installation and works well with the portable versions of QET.


LINUX
Copy the plugin portable file to the same folder that the AppImage version of Qelectrotech:
  1. Download the desired QET portable version from https://download.qelectrotech.org/qet/builds/AppImage/
  2. Mark as executable (help here:  https://discourse.appimage.org/t/how-to … -appimage/).
  3. Download the plugin portable file from https://download.qelectrotech.org/qet/b … tor_linux/
  4. Rename to "qet_tb_generator" if it has another file name.
  5. Mark "qet_tb_generator" as executable too.
  6. Copy to the same folder that the QET appimage is.
  7. Launch the plugin from the "Project" menu of QET

If you have some problem launche the plugin from QET, add the directory where the AppImage is to the PATH. Example if the directory is "/home/<your_user_name>/bin", edit the "~/.bashrc" file adding:
     export PATH="/home/$USER/bin:$PATH"



WINDOWS
Copy the plugin portable file to the same readytouse folder of QET
  1. Download the desired QET portable version from https://download.qelectrotech.org/qet/builds/nightly/
  2. Uncompress
  3. Download the plugin portable file from https://download.qelectrotech.org/qet/b … rator_win/
  4. Rename to "qet_tb_generator.exe" if it has another file name.
  5. Copy "qet_tb_generator.exe" inside the descompressed folder of QET (point 2)
  6. Launch the plugin from the "Project" menu of QET


If you are not using the portable version of QET, copy the plugin portable file inside the folder where the executable QET file are. Remember mark as exexutable on Linux's.

(Thanks @scorpio810 for uploading files)

scorpio810 wrote:

I Raul, could you probide samples projects with run of qet-tb-generator?
Connectors like this run?
https://qelectrotech.org/forum/misc.php?action=pun_attachment&amp;item=476

This was a functionality of a old version.

S.DEFFAUX wrote:
unalcalde wrote:

Hi. Sorry for my absence. During the next week I will be able to fix plugin's errors.

Are there some priority to fix them?  ;-)

you are Raul?

Yes I am.

I'm going to check the posts, collecting errors and try to fix them.

Hi. Sorry for my absence. During the next week I will be able to fix plugin's errors.

Are there some priority to fix them?  ;-)

Hi Matt.

I don't use mac, so I can't verify your issue. However, you can write any of the 3 options directly in the TYPE field: STANDAR, GROUND or FUSE . The right click is to alternate between them quickly.

Hi. A new version is available.

Changes:
* If the terminal name has spaces, are trimmed (avoid mistakes).
* Now the terminal name could start by '-' or any other character. Before only letters were allowed.
* Changed the text in help's tab.

Installation:
- To update in Linux: sudo python3 -m pip install --upgrade qet_tb_generator
- To update in windows: python -m pip install --upgrade qet_tb_generator

#4
Hi scorpio810.

At the bottom of the plug-in, in red, appears "Remember to SAVE the QET project before usgin this plug-in".  So, if you save th e diagram before, when you close Qelectrotech to reload the diagram, the save warning doesn't appears.

Any way, I'll update the help text in  the next release.

Hi. After a long period of absence, I took advantage of this Christmas holiday and I launched a new version. The improvements are:
- Now for sort terminals, just left-click and right-click on the corresponding cell of POS. column
- Before each terminal block had a fixed length of 30 terminals. Now is confirable for each terminal block
- Now it is possible to set the number of reservation terminals for each terminal block.
- When pressing  CREATE TERMINAL BLOCKS buttonm a window pop-up to select which terminals to create/update.
- Regarding the aspect of the terminal block:
     - All the text are dynamics: allows edition.
     - The cables connected at the bottom of the terminals have the same id that the top.
     - The conductors of a hose are identified at the two sides with a small mark.

Remember, to update in Linux: sudo python3 -m pip install --upgrade qet_tb_generator
To update in windows: python -m pip install --upgrade qet_tb_generator

I attach an image showing the changes.

Hi.
I introduce the version 1.0.15

Changes:
  * When the last terminal of a terminal block had defined a cable with a single conductor, it was not drawn. (thanks Jarosław)
  * Relocate the position of different labels because when they were long they left the area.
  * Show a red message at bottom remembering save the QET diagram before use the plug-in.
  * Add a text in the message box that appears after pressing "CREATE TERMINAL BLOCKS",
    remmembering the reopen the project to see the terminal blocks generated.

Please, check post #157 to install/upgrade instructions.

Hi, I checked and don't work for me too.

The error is like this "xml.etree.ElementTree.ParseError: unbound prefix: line 7, column 20".
Opening the QET file, I checked that there are a logo defined in the line 7:

<logo name="Qet.svg" storage="xml" type="svg">
  <ns0:svg height="600.000000pt" preserveAspectRatio="xMidYMid meet" version="1.0" viewBox="0 0 600.000000 600.000000" width="600.000000pt">
    <ns0:metadata>
Created by potrace 1.10, written by Peter Selinger 2001-2011
    </ns0:metadata>
    
    <ns0:g fill="#000000" stroke="none" transform="translate(0.000000,600.000000) scale(0.100000,-0.100000)">
       {{ a long text ommited }}
    </ns0:g>
  </ns0:svg>
</logo>

At the second line, the label "ns0:svg" means: SVG tag belonging to NS0. And NS0 is a namespace name (it's the XML standar).

The plug-in when opens then QET file says that the name space is not defined.

To fix, open your project with a text editor and add the text: xmlns:ns0="namespace1". Like this:

<ns0:svg xmlns:ns0="namespace1" width="600.000000pt" version="1.0" viewBox="0 0 600.000000 600.000000" preserveAspectRatio="xMidYMid meet" height="600.000000pt">

Save and now you can use as normally.

Maybe que QET program should include the namespace definition if needed.

Hi DMH78,

Did you try to execute the plugin from the command line?

If not, try executing qet_tb_generator from the command line.

Anyway, since the version 1.0.12, is not mandatory to delete the elements and  clean up the drawing. Check you version at the caption of the window in the plug-in..

@184: I understand, but now  the cable name (i.e. -W1, W2A,...) appears several times in the table (one time for every one of its conductors). In which entry could we define the "cable type" and the "section"? In the first row in that the cable appears, for example?

Every extra info defined in the plug-in is saved in the FUNCTION field of the terminal element in the XML, where I could save the extra info you say?

Hi, I introduce the version 1.0.14. This version:


- Shows a new column called 'Bridge'. Right clicking on a cell of this column writes a '|'. This symbol means that this terminal will be 'bridged' with the next one.


- The cross references (xref) catches the Location and Plant values of the current (folio properties). The previous versions took this information from the project properties.

Check the image for more info:
https://image.ibb.co/k2bdPy/v1_0_14.png

To install/update check post #157

On the table is a good idea. By default the terminals with same conductor name are marked as bridged, but you can easy mark and unmark any terminal as you desired.

Hi,
the plug-in of the QET version 0.6 allowed it, but the current version no.

For now, you can draw a line join the bridged terminals, but  I could add this functionality.
For that, what criteria should I follow?
  - Automatic draw a line I the terminals have the same name/number?
  - Or maybe draw the bridge line if the cable numbers of adjoining terminals are the same...

What is the best way?

Hi. 

Jarosław Krysa wrote suggering me to fix a xref problem. The labels %M and  %LM were read its values from the NEW PAGE configuration in QElectrotech. The next version will read this values from every diagram page.


Are there some bug o something else to fix in the next version?
Thanks

Hi, version 1.0.13 launched.

When creating a terminal block that previously exists, appears several times under the collection tree (see the screenshot). Fixed.

To install/update, please read the post #15

https://image.ibb.co/ke4ULJ/1.png

Hi, I checked calling the plugin from the last version of QET and works well.  Thanks.

I created the version 1.0.11, adding a new tab called 'HELP'.  A guideline helps to use the plugin. Any mistake, please say me.

To install/update, please read the post #157.