Get dollar params in CTRL from panel topology

Find and share HowTos to various installations / configurations!
Search

Post Reply
4 posts • Page 1 of 1
Mgiacome
Posts: 20
Joined: Thu Sep 26, 2024 1:35 pm

Get dollar params in CTRL from panel topology

Post by Mgiacome »

Hi,

I've set a dollar param in the panel topology (ex: $title = "My title" ), but I cannot access it from within the panel script. DebugN($title) prints an empty string.
The only function that returns me something is getDollarParamsFromPanel() that returns me the dollar param name, but not the value !

Is there a solution ?

User avatar
kilianvp
Posts: 443
Joined: Fri Jan 16, 2015 10:29 am

Re: Get dollar params in CTRL from panel topology

Post by kilianvp »

The Panel Topology function only works within a template. If you open the panel elsewhere it will not pass the parameter.

gschijndel
Posts: 373
Joined: Tue Jan 15, 2019 3:12 pm

Re: Get dollar params in CTRL from panel topology

Post by gschijndel »

I prefer to use the dollars property to access the dollar parameters, but it does not seem be in the documentation (yet). It returns a mapping and from the panel itself 'self.dollars' can be used to access it.
You could also try the 'getDollarList' and 'getDollarValue' functions.

However as already mentioned it only returns a value if dollar values were passed along during the opening of the panel. The templates can be taken as an example for your own template.

User avatar
leoknipp
Posts: 2926
Joined: Tue Aug 24, 2010 7:28 pm

Re: Get dollar params in CTRL from panel topology

Post by leoknipp »

A value for a $-parameter defined in the panel topology only is passed to the panel when it is opened using the CTRL functions for the panel topology.
When opening the panel with standard functions, e.g. RootPanelOnModule(), the values for the $-parameters must be defined at the function call.

Best Regards
Leopold Knipp
Senior Support Specialist

Post Reply
4 posts • Page 1 of 1