It looks like you're new here. If you want to get involved, click one of these buttons!
Hi,
I saw we can add boolean parameter in Pcell writing in Python.
But what should I do if I want to add a parameter "grating_length" when boolean parameter "DrawnType" is true, and another parameter "period_number" when this boolean parameter "DrawnType" value is false?
Thus, in the instance page, that is to say, when we make boolean parameter values true, only "grating_length" is shown.
When we make boolean paramter false, only "period_number" is shown.
I try to add parameter like this, but whether I make DrawnType to true or false, only "Period_number" is shown.
self.param("DrawnType", self.TypeBoolean, "Drawn parameter Type (grating_length=True,period_number =False)", default=True)
if self.DrawnType is True:
self.param("grating_length", self.TypeDouble, "Grating length ", default=19.0)
else:
self.param("period_number", self.TypeInt, "Period_number", default=30)
What is the reason causing this?
Could anyone who knows give me some suggestions on how to achieve this?
Thank you in advance!
Comments
@Weiling_Zheng No, there is no such feature currently. All parameter types and states are static.
Matthias
@Matthias,
Thank you for your respond. Looking forward to this feature in the future.