Author Topic: How can I get the path current .sbs file?  (Read 463 times)

As tittle. Thank you!

in SD you can have several .sbs files opened (you can see them in explorer window) so there's no "current sbs"

you can retrieve the file path for your current graph (the graph you see in graph window)
to do that just call getFilePath() for current graph

something like that:
Code: [Select]
import sd

ctx = sd.getContext()
app = ctx.getSDApplication()
ui_mgr = app.getUIMgr()

current_graph = ui_mgr.getCurrentGraph()
pkg = current_graph.getPackage()