It looks like you're new here. If you want to get involved, click one of these buttons!
Hi,
I used to calculate parameters, such as the total length of a chain based on the input parameters in the produce_imp, and then display the value of the parameter value in display_text_impl. With the latest Klayout version, the parameter values are still displayed in the cell. But I get an error in Macro Development saying the pcell object has no attribute of this parameter. How to access parameters created in produce_imp from display_text_imp ? I don't want to repeat the calculation in the display_text_impl.
Comments
Hi,
The idea is to do the computation in "coerce_parameters_impl" (actually that is a generic callback executed whenever some other parameter changes) and not in "produce_impl". "produce_impl" is called to generate layout and not to compute parameters.
In "display_text_impl" you can access the parameter by a member with the parameter's name.
So for example, if you define a readonly parameter called "tot_length" which you want to compute from "l" and "n", use a "coerce_parameters_impl" function like this:
and a "display_text_impl" like this:
Matthias
Thanks.