Author Topic: [SOLVED] Opening a graph in the view  (Read 519 times)

Can we open a recently created graph in the view ? Do I need to save it to do so ?

Code: [Select]
    context = sd.getContext()
    app = context.getSDApplication() if context else None
    package_manager = app.getPackageMgr() if app else None
    assert context and app and package_manager

    package = package_manager.newUserPackage()
    graph = create_graph(package, graph_name) if package else None
    assert package and graph

How can I script what happen when I double click on this graph ?



Last Edit: October 22, 2020, 08:26:05 am

Hi,

Opening graphs is not available in the Python API at the moment.
Maybe you could simulate a double click in the item using Qt for Python but I am not sure how that would work.

Est.

Hi,

Opening graphs is not available in the Python API at the moment.
Maybe you could simulate a double click in the item using Qt for Python but I am not sure how that would work.

Est.

Thanks, I will give it a try.