How to draw organization chart (general tree)

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
toralf
Posts: 868
Joined: 27 Apr 2014, 21:08
Location: Germany

How to draw organization chart (general tree)

Post by toralf » 01 Jul 2022, 14:40

Hi there,

I want to draw an organization chart (general tree) as an interactive entity ("control") in an AHK Gui.
I assume i have to use GDI to draw the line and nodes. For the nodes I might even use picture controls instead.
But before I start exploring this, I need to know where exactly the nodes will be positioned in the xy plane.
I have found 3 articles on the web
Tidier Drawings of Trees (by Reingold and Tilford, 1981)
A Node-Positioning Algorithm for General Trees (by Walker, 1989)
Improving Walker’s Algorithm to Run in Linear Time (by Buchheim, Jünger and Leipert, 2002)
But they are very abstract. I guess I could try to create AHK code from them. But before i dive into this endeavor, I wanted to ask for your advice:

Are there any hints/ideas/directions you could give me?
Has someone done this before? Are there other tools/methods that could be used for this?

Thanks a lot in advance.
ciao
toralf


toralf
Posts: 868
Joined: 27 Apr 2014, 21:08
Location: Germany

Re: How to draw organization chart (general tree)

Post by toralf » 01 Jul 2022, 15:28

And several python implementations
https://github.com/llimllib/pymag-trees/
of which BuchHeim.py would be the most interesting one
ciao
toralf

BoBo
Posts: 6564
Joined: 13 May 2014, 17:15

Re: How to draw organization chart (general tree)

Post by BoBo » 01 Jul 2022, 16:57

Hallo toralf, :thumbup:
I'd assume that @bichlepa's AutoHotflow contains a similar feature?
Probably worth a look :arrow: viewtopic.php?f=6&t=6399

Good luck
8-)

...von @nnnik: https://github.com/nnnik/AutoHotkey-Tree/blob/master/TreeOf.ahk
Free & Open Source: https://graphviz.org/Gallery/directed/Genetic_Programming.html

toralf
Posts: 868
Joined: 27 Apr 2014, 21:08
Location: Germany

Re: How to draw organization chart (general tree)

Post by toralf » 02 Jul 2022, 05:04

Thanks a lot BoBo.
I looked at them, but didn't find what I think i need.

I found a great article that describes how to Draw Presentable Trees by explaining the principles step by step. But the python code is not complete. But it helped me to understand the buchheim.py.

Hence, I'll start to translate the python code to AHK.
ciao
toralf

Post Reply

Return to “Ask for Help (v1)”