1 (edited by Morganol 2016-12-02 03:27:56)

Topic: How can I update/replace elments in schema?

Recently i decided style change on some of my elements (thicker lines on containers like tanks etc)
And now i used a script to change text size on all QET elements in collection.

In both these examples and other style changes there is no change in location nor number of connections.

So theoretically it would be trivial to replace the ones in the drawing with the new elements in collection and they should change style to the new one.

Can that be simply done?

I mean: i wish to not spend time redrawing all conductors to them.

Re: How can I update/replace elments in schema?

Hum, when you want to update element in drawing, you need to edit this with Qet element editor, it create new UUID when you saving element.
After when you drag and drop this element on your drawing it detect your element UUID as changed and ask if you want to replace etc.


You can adapt my small command nomicons/grin  to add UUID for all element in directory that do not contain this tag.
I make this bash script when we add UUID tag and for patch all elements collection.

#!/bin/bash
# Add attribut "uuid" in all .elmt files.
# need packages : sed, uuid-runtime, find

find . -type f -name "*.elmt" -exec sh -c 'UUID="$(uuidgen | awk '"'"'{print toupper($0)}'"'"')" ; sed -i '"'"'s#\(\).*\(<names>\)#\1'"'"'"<uuid uuid=\"{$UUID}\"/>"'"'"'\2#'"'"' "{}"' \;

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."

Re: How can I update/replace elments in schema?

Or try your script for change all element description in your project file, make backup before !

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."

Re: How can I update/replace elments in schema?

Thank you for the prompt replies nomicons/smile

I will continue thinking on this next week.  There are implications when updating QET and default elements are reinstalled.

Right now it seem easier to get used to text size 9 labels, and run my command modified on my own collection to have all element labels in size 9.  I size 9 got selected as default becuase most people at least in this community like that best so i better be democratic nomicons/wink

Re: How can I update/replace elments in schema?

About replacing custom elements after i have edited them (in custom collection):   I thought the replace did not work as the old elements in shema did not change visually, but it seem the case is that it do not redraw (even if I switch folios) until I reopen the file. (should i file bug?)  Or is there some method to make it redraw using the replaced element(s)

Re: How can I update/replace elments in schema?

Only save and re open project for see this change.

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."

Re: How can I update/replace elments in schema?

I caught a crash.  Unfortunately i do not remember what i did before; i fooled around with it this morning, and then i have been in workshop, now i just closed it saving, and it crashed.  As always, i run it in debug mode.

Post's attachments

Attachment icon SsegfaultClosing.png 337.05 kb, 181 downloads since 2016-12-02