Jump to content
Mozzarino

Get current context path with python

Recommended Posts

I'm developing some UI for pipeline tools.
One of the tools is an HDAs and Setups manager, where I click on the desired HDA and it is imported into the current geo context. I spent some time reading the documentation and other created threads on how to get the current geo context path and all I've managed to do is a workaround where I have to select one or more nodes and only then can I import my HDA into the selected context.

Any ideas on how to achieve this without having to select any nodes?
 

Share this post


Link to post
Share on other sites
import toolutils
network = toolutils.networkEditor()
path = network.pwd().path()

 

  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×