Andrew Beckett
Senior Fellow
Offline
Life, don't talk to me about Life...
Posts: 1742
Bracknell, UK
|
Provided that you ensure that the default value of a CDF parameter matches the default value of the pcell parameter, you don't have to do anything special in the pcell.
When you change the value on the create instance or edit properties form, of a property governed by CDF, then the property is stored as an instance property on the instance. If this is an instance of a pcell, then those properties which are pcell parameters govern the lookup of a pcell submaster (i.e. variant) with that particular combination of parameter values. If one is not already available in memory, the pcell code will be evaluated with that set of parameter values, and the submaster will be created.
It is possible to write your pcell to explicitly look up the values from the CDF - normally only for finding default values - but it's rarely necessary. Note that pcells can only be communicated with via instance parameters - these are the only things that trigger re-mastering.
Regards,
Andrew.
|