Introduction
QElectroTech is an open-source electrical schematic design software created by Laurent Trinques
First of all, my thanks to Laurent for such an amazing piece of software, and to everyone who has contributed to this project. Here you have the software in case you feel like giving it a try. It’s not more powerful than Eplan, but it rivals it like a true champion!
How to generate an automatic table?
First of all, we need to know how to generate automatic tables in QElectroTech. For this, there are two cases: if we want to add automation based on project data or on elements in the schematic: Project > Add a summary and Project > Add a nomenclature.

Once inside, we will be able to make custom SQL queries:

Page Index
To automate the page index, we will do it from ‘Add a summary,’ and I recommend the following SQL:
SELECT
pos,
title,
author,
date,
indexrev
FROM
project_summary_view
ORDER BY
pos,
title,
author,
date,
indexrev;
With this query, we will automatically obtain the following table:
List of elements
To automate the list of elements, we will do it from ‘Add a nomenclature,’ and I recommend the following SQL:
SELECT
label,
diagram_position,
position,
designation
FROM
element_nomenclature_view
WHERE
(
element_type = 'terminal'
OR element_type = 'thumbnail'
OR element_type = 'simple'
OR element_sub_type = 'commutator'
OR element_sub_type = 'coil'
OR element_sub_type = 'protection'
)
AND designation IS NOT NULL
AND designation <> ''
AND label IS NOT NULL
AND label <> ''
ORDER BY
diagram_position;
With this query, we will automatically obtain the following table:

As an alternative, instead of using position and diagram position, we can use the page so that it’s easier to read.
The SQL query would look like this:
SELECT
label,
title,
diagram_position,
position,
designation
FROM
element_nomenclature_view
WHERE
(
element_type = 'terminal'
OR element_type = 'thumbnail'
OR element_type = 'simple'
OR element_sub_type = 'commutator'
OR element_sub_type = 'coil'
OR element_sub_type = 'protection'
)
AND designation IS NOT NULL
AND designation <> ''
AND label IS NOT NULL
AND label <> ''
ORDER BY
diagram_position;
With this query, we will automatically obtain the following table:
Summary of elements
To automate the summary of elements, we will do it from ‘Add a nomenclature,’ and I recommend the following SQL:
SELECT
designation,
COUNT(*) AS Total
FROM
element_nomenclature_view
WHERE
designation IS NOT NULL
GROUP BY
designation;
With this query, we will obtain an automatic table of all the references we have placed in the elements under the concept ‘Article number.’

With this, we will get a pretty good list to give to our purchasing colleague, saving them a few hours of counting and, most importantly, reducing human error ^^.

I hope I’ve saved you many hours of engineering work, since a good engineer doesn’t charge by the hour but by knowledge.
