how to get name of parent panel ref?

Find and share HowTos to various installations / configurations!
4 posts • Page 1 of 1
tpjctrl
Posts:145
Joined: Tue May 08, 2018 10:30 am

how to get name of parent panel ref?

Post by tpjctrl »

I've got a panel ref embedded inside another panel ref, is it somehow possible to get the name of the top level / parent panel ref inside the child panel ref? if so, is it possible to reference shapes in the parent panel ref from within the child panel ref?

Thanks,
Tom

leoknipp
Posts:2928
Joined: Tue Aug 24, 2010 7:28 pm

Re: how to get name of parent panel ref?

Post by leoknipp »

The function myPanelName() always returns the name of the root panel, even if the function is called in a script inside of a panel reference.
When the object name in the parent panel is unique it should be possible to access it from the scripts in the panel reference.

Best Regards
Leopold Knipp
Senior Support Specialist

tpjctrl
Posts:145
Joined: Tue May 08, 2018 10:30 am

Re: how to get name of parent panel ref?

Post by tpjctrl »

Thanks Leo, but I meant if for example PANEL_REF1 holds inside it an embedded PANEL_REF2, is it possible to get the PANEL_REF1 name but from inside a script in PANEL_REF2? basically can the embedded Panel Ref somehow access the name of the Panel Ref in which it is embedded?

Regards,
Tom

leoknipp
Posts:2928
Joined: Tue Aug 24, 2010 7:28 pm

Re: how to get name of parent panel ref?

Post by leoknipp »

It is not possible to get the information for the cascade of panel references if a reference is loaded into another reference.
E.g. when using addSymbol() the reference is always loaded to the root panel and not the reference which has called the function.

Best Regards
Leopold Knipp
Senior Support Specialist

4 posts • Page 1 of 1