Hey @paullee,paullee wrote: ↑Wed Mar 17, 2021 7:18 pm BTW, it seems the standard Dependency Graph is not something by python, there is not an API or something similar which can be tweaked and reported in the Python Console?
Code: Select all
Gui.runCommand('Std_DependencyGraph',0)
you can access the dependency graph in .dot format using:
Code: Select all
FreeCAD.ActiveDocument.DependencyGraph
This should return the string which is passed to dot when the dependency graph is to be visualized. I have a small macro that pipes this to xdot on Linux.
Code: Select all
#Before using, make sure xdot is installed
#pip3 install --user xdot
import xdot
graph = FreeCAD.ActiveDocument.DependencyGraph
window = xdot.DotWindow()
window.set_filter('dot')
window.set_dotcode(graph.encode())
window.connect('delete-event', xdot.ui.window.Gtk.main_quit)
I don't think there is functionality in-place that allows for making graphs of sub-selections of the tree. Nevertheless, I would be very interested in implementing something like that if time allows. Are there any specs/ticket for this already?