@hs2
Thanks a lot for your help! I was able to get the non-destructive fold/unfold to work with the following code. I set up the "IsCollasped" variable as a boolean at the start of my custom macro file.
{
if (IsCollasped) {
expand_all(); IsCollasped=false;
} else {
collapse_all(); IsCollasped=true;
}
}
I could not get the bind_to_key to work without bringing up the UI key assignment form and I wanted the key swapping to occur by just clicking a button. Clark came up with a better solution (see below).
@Clark
Thanks for your reply!
For item 2. 'Unfold line block connectors', do you have an rough ETA, (weeks, months, next year, etc)? This is an important feature for me, and one that an end-user can not code around.
For item 5. 'Dynamically remapping keys/mouse buttons', thanks for your suggestion, I did not know you could use key modifiers on mouse buttons, and this made for a much better solution... Thanks!
@Graeme
Thanks for taking the time with the code example! I have not tested it yet because I went with Clarks suggestion of using a key modifier with the mouse click. However I'm very interested and will test your code out later.
The 'toggle-defs' command brings up the 'defs toolwindow' as you said, but what I wanted was to toggle one/many toolbars. You can do this by finding the name of the toolbar, in my case "tbform4". Then the commands:
toggle_toolbar('tbform4');
tbHide('tbform4');
tbShow('tbform4');
will toggle, hide or show the named toolbar. The only problem with these commands is they don't put the toolbar back to its last position, but instead, in my case, display it after the first toolbar.
Thank you all very much for your replies and help! Much appreciated...