Hello,
I can’t seem to find Python classes that would allow me to layout some nodes in network. This functionality is available in right-click menu. Please is this missing from Python API, or have I just overlooked it? Thanks
Hey @monty_python,
i hesitate to mention it but as there is no pythonic way to do this, i will point you to something that still exists but has not been tested nor is it supported functionality as tscript is deprecated:
oplayout
and opgrid
are available in tscript for doing this…
cheers
Markus
Oh shoot, can I move this into RFE? I am starting to work with dynamically creating / deleting nodes (forming larger networks) from python and without this is my network quite a mess
In that case you might be able to use
TDFunctions.arrangeNode(yourNewlyCreatedNode)
Could you do this node by node?
op(’constant1’).nodeX = 180
op(’constant1’).nodeY = 200
Yep, absolutely, but I guess that isn’t the user-friendliest approach
Felt your pain a few years ago,
here’s a tox that does what you want!
AlignTool.tox (1.5 KB)
I used a shortcut key to activate the functions, works well!
I made a blank .toe file and dropped this tox into the root.
Set this toe as the default project and every new toe will include this tox in the root.
Cheers!