
Hi,
in the past, I created flow diagrams (e.g. https://xkcd.com/627/) using Dia. While Dia is a marvellous program for such kind of diagrams, it is quite limited in its design and layout capabilities.
Now I'm looking into Inkscape, but I encountered some problems:
I draw a create a rectangle and place a text object inside and align the text object horizontally and vertically with the square:
+‾‾‾‾‾‾‾‾‾‾‾‾‾+ | Ask someone | | for help | +_____________+
Later on, I change the text:
+-------------+ | Ask someone | | for help | | or give up. | +-------------+
Unfortunately, now I have to re-align again. Is there any way to do this automatically like in Dia?
Also, I would like to adjust the height of the box accordingly.
If this is not possible out of the box, but would it be possible to write a Python script/plugin to do it? Can Inkscape run a plugin automatically e.g. on every text change?
TIA & Cheers

On Thu, 02 Jul 2015 13:51:38 +0200 "W. Martin Borgert" <debacle@...61...> wrote:
Hi,
in the past, I created flow diagrams (e.g. https://xkcd.com/627/) using Dia. While Dia is a marvellous program for such kind of diagrams, it is quite limited in its design and layout capabilities.
Now I'm looking into Inkscape, but I encountered some problems:
I draw a create a rectangle and place a text object inside and align the text object horizontally and vertically with the square:
+‾‾‾‾‾‾‾‾‾‾‾‾‾+ | Ask someone | | for help | +_____________+
Later on, I change the text:
+-------------+ | Ask someone | | for help | | or give up. | +-------------+
Unfortunately, now I have to re-align again. Is there any way to do this automatically like in Dia?
Not that I know. The fact that lines stay connected regardless of movement is what makes Dia great. The only thing I've found lacking in Dia is the ability to make realistic icons for computers, monitors, switches and the like, the way Visio can. But for drawing a block diagram, I think Dia will always be quicker and easier than Inkscape.
SteveT
Steve Litt June 2015 featured book: The Key to Everyday Excellence http://www.troubleshooters.com/key

On 2015-07-02 13:51 (+0200), W. Martin Borgert wrote:
Now I'm looking into Inkscape, but I encountered some problems:
I draw a create a rectangle and place a text object inside and align the text object horizontally and vertically with the square:
+‾‾‾‾‾‾‾‾‾‾‾‾‾+ | Ask someone | | for help | +_____________+
Later on, I change the text:
+-------------+ | Ask someone | | for help | | or give up. | +-------------+
Unfortunately, now I have to re-align again. Is there any way to do this automatically like in Dia?
No, current Inkscape has no such built-in feature.
Also, I would like to adjust the height of the box accordingly.
If this is not possible out of the box, but would it be possible to write a Python script/plugin to do it?
Someone already did - see this earlier thread: http://thread.gmane.org/gmane.comp.graphics.inkscape.user/15133
Source: https://gist.github.com/tbnorth/7420972
Can Inkscape run a plugin automatically e.g. on every text change?
No, not supported in the current extension system for script-based extensions.
Regards, V

On 2015-07-03 10:44 (+0200), su_v wrote:
On 2015-07-02 13:51 (+0200), W. Martin Borgert wrote:
Now I'm looking into Inkscape, but I encountered some problems:
I draw a create a rectangle and place a text object inside and align the text object horizontally and vertically with the square:
+‾‾‾‾‾‾‾‾‾‾‾‾‾+ | Ask someone | | for help | +_____________+
Later on, I change the text:
+-------------+ | Ask someone | | for help | | or give up. | +-------------+
Unfortunately, now I have to re-align again. Is there any way to do this automatically like in Dia?
No, current Inkscape has no such built-in feature.
Also, I would like to adjust the height of the box accordingly.
If this is not possible out of the box, but would it be possible to write a Python script/plugin to do it?
Someone already did - see this earlier thread: http://thread.gmane.org/gmane.comp.graphics.inkscape.user/15133
Gmane seems to be unreliable these days - here's the link to the same thread (from Nov 2013) in the list's archive at sf.net:
http://sourceforge.net/p/inkscape/mailman/message/31626535/
Source: https://gist.github.com/tbnorth/7420972
Can Inkscape run a plugin automatically e.g. on every text change?
No, not supported in the current extension system for script-based extensions.
Regards, V

On 2015-07-03 10:44, su_v wrote:
Someone already did - see this earlier thread: http://thread.gmane.org/gmane.comp.graphics.inkscape.user/15133
This is nice, indeed. Many thanks! Unfortunately, it does not work with squares, that are turned (rhomb or diamond shape, very important in flow diagrams), nor with circles nor ellipses.
Maybe with --verb=AlignHorizontalCenter and --verb=AlignVerticalCenter it would be possible?
No, not supported in the current extension system for script-based extensions.
Too bad, that all the "verbs" are not available in the Python scripting. Is this planned for the future?
Cheers
participants (3)
-
Steve Litt
-
su_v
-
W. Martin Borgert