scorpio810 wrote:Aleksandr wrote:I also faced this problem. It turned out that when creating elements, you cannot copy outputs. Each output gets its own ID. And when copying, all pins have the same ID. I found out about this when I opened the element in a text editor.
Thanks for feedback Aleksandr.
UUID for terminals output was added recently by Martin for new feature and yes is a bug, thanks.
https://qelectrotech.org/forum/viewtopi … 055#p12055
When pasting terminals on editor, editor need to create a new random UUID and not copy the parent UUID property.
Maybe a workaround is to remove UUID on XML <terminal orientation= > attributes chain.
Editing an element linked to wires is risky if you move the terminals a little too much in editor.
Who will try to solve this?
And how, the copy paste is not designed to handle this.
copy() {
// delegue cette action a la scene
m_scene -> copy();
offset_paste_count_ = 0;
}
paste(const QDomDocument &xml_document, const QPointF &pos) {
// objet pour recuperer le contenu ajoute au schema par le coller
ElementContent content_pasted;
m_scene -> fromXml(xml_document, pos, false, &content_pasted);
// si quelque chose a effectivement ete ajoute au schema, on cree un objet d'annulation
if (content_pasted.count()) {
m_scene -> clearSelection();
PastePartsCommand *undo_object = new PastePartsCommand(this, content_pasted);
m_scene -> undoStack().push(undo_object);
}
return(content_pasted);
}
maybe one should explaining me the utility / purpose for UUID terminals,
what was wrong with 1 UUID for the element,
and numbers for the terminals?
02going_arrow.elmt (version=0.3)
<definition width="40" version="0.3" hotspot_x="18" hotspot_y="15" height="30" type="element" ic="true" orientation="dyyy"
link_type="next_report">
<uuid uuid="{717352A1-F3C7-49C7-9A06-51620AB5CA00}"/><names>
<name lang="ru">Следующая страница</name>
<name lang="ar">الصفحة التالية</name>
<name lang="de">Nächste Folie</name>
<name lang="el">Επόμενη σελίδα</name>
<name lang="en">Going arrow</name>
<name lang="it">Foglio successivo</name>
<name lang="fr">Folio suivant</name>
<name lang="pl">Wyjście adresowe</name>
<name lang="es">Folio siguiente</name>
<name lang="cs">Další list</name>
<name lang="nl">Referentie volgend</name>
</names>
<informations>Author: The QElectroTech team
License: see http://qelectrotech.org/wiki/doc/elements_license</informations>
<description>
<polygon x4="-9" antialias="true" style="line-style:normal;line-weight:normal;filling:black;color:black" closed="false" y1="-4" x1="-9" y2="4" x2="-9" y3="0" x3="2" y4="-4"/>
<line length1="1.5" length2="1.5" antialias="false" end1="none" end2="none" style="line-style:normal;line-weight:normal;filling:none;color:black" y1="0" x1="-9" y2="0" x2="-12"/>
<input x="6" y="0" size="9" rotate="true" text="/"/>
<terminal x="-13" y="0" nameHidden="0" number="" name="" orientation="w"/>
</description>
</definition>
version="0.80"
<definition link_type="previous_report" hotspot_x="8" type="element" width="30" hotspot_y="10" height="20" version="0.80" orientation="dyyy">
<uuid uuid="{d9d5ac46-d734-49f6-9027-ed5a50e4547d}"/>
<names>
<name lang="es">folio anterior</name>
<name lang="nl">Referentie Vorig</name>
<name lang="it">Foglio precedente</name>
<name lang="de">Vorherige Folie</name>
<name lang="ru">Предыдущая страница</name>
<name lang="ar">الصفحة السابقة</name>
<name lang="el">Προηγούμενη σελίδα</name>
<name lang="pl">Wejście adresowe</name>
<name lang="en">Coming arrow</name>
<name lang="fr">Folio précédent</name>
<name lang="cs">Předchozí list</name>
</names>
<informations>Author: The QElectroTech team
License: see http://qelectrotech.org/wiki/doc/elements_license</informations>
<description>
<polygon x1="-1" y2="4" x4="-1" x2="-1" style="line-style:normal;line-weight:normal;filling:black;color:black" y4="-4" y1="-4" antialias="true" x3="9" y3="0" closed="false"/>
<line x1="9" y2="0" end1="none" length2="1.5" x2="12" end2="none" style="line-style:normal;line-weight:normal;filling:none;color:black" length1="1.5" y1="0" antialias="false"/>
<dynamic_text text_from="UserText" Valignment="AlignTop" z="3" text_width="-1" font="Sans Serif,9,-1,5,50,0,0,0,0,0" x="-44" uuid="{8b32ab87-b8ec-4564-bdec-c3ea4036a492}" y="-11.5" Halignment="AlignLeft" frame="false" rotation="0">
<text>/</text>
</dynamic_text>
<terminal name="" x="13" uuid="{6db93440-be5c-4e83-bae3-34a68cb24127}" y="0" orientation="e"/>
</description>
</definition>
for KiCAD;
connector.lib
(terminal = X) no UUID id's not even for the element
#
# 4P2C
#
DEF 4P2C J 0 40 Y Y 1 F N
F0 "J" -200 350 50 H V R CNN
F1 "4P2C" 100 350 50 H V L CNN
F2 "" 0 50 50 V I C CNN
F3 "" 0 50 50 V I C CNN
$FPLIST
4P2C*
$ENDFPLIST
DRAW
S 300 300 -300 -200 0 1 10 f
P 3 0 1 0 -250 -25 -200 -25 -200 -25 N
P 3 0 1 0 -250 25 -200 25 -200 25 N
P 3 0 1 0 -250 75 -200 75 -200 75 N
P 3 0 1 0 -250 125 -200 125 -200 125 N
P 15 0 1 0 -250 -125 -250 225 -50 225 150 225 150 175 200 175 200 125 250 125 250 -25 200 -25 200 -75 150 -75 150 -125 -250 -125 -250 -125 N
X ~ 1 400 0 100 L 50 50 1 1 P
X ~ 2 400 100 100 L 50 50 1 1 P
ENDDRAW
ENDDEF
connector.dcm
#
$CMP 4P2C
D RJ connector, 4P2C (4 positions 2 connected)
K 4P2C RJ female connector
F ~
$ENDCMP