Get View Path in Perspective

It looks like there are some functions for Vision to get the path to the window using, but the same function are not working in Perspective. Is there any way to get the path of a view that you are currently on in scripting?

I think you want page.props.path, available on the property tree.

I see that ‘page.props.path’ for an embedded view to specify the view to be used but not on just a normal view. I also tried adding it to the page props section and it gave this error: “path: is not defined in the schema and additional properties are not allowed”. Am I missing something?

Page props:
Root Container props:

There is no way to get the path of a View you are currently on via scripting with one exception. If the View is the primary View used for the Page you are viewing, binding against or using a script to refer to page.props.path will provide the path of the View but ONLY IN AN ACTIVE SESSION. The Designer does not have “Pages” available to it, and so the path does not resolve to the path of the View of the active Page.

I now see what @bkarabinchak.psi was saying. That is what I was looking for! Thanks guys!

1 Like

I have a need to get the view path of a dock via scripting, I might create a feature request for this