klayout icon indicating copy to clipboard operation
klayout copied to clipboard

"klayoutrc" file sometimes causes runtime error

Open dsus4wang opened this issue 2 years ago • 4 comments

I use Klayout 0.27.9 on the newest MacOS(M1 chip). Occasionally when I debug the macro, I changed the parameters, but the script still runs with the old parameters. I found if I delete the in klayoutrc file, the program would back to normal. Could you help me find the problem?thanks.

dsus4wang avatar Jun 07 '22 10:06 dsus4wang

(the in klayoutrc

dsus4wang avatar Jun 07 '22 11:06 dsus4wang

I'm afraid I don't understand.

What are the parameters you change and what does the last message mean?

Matthias

klayoutmatthias avatar Jun 07 '22 19:06 klayoutmatthias

I use Klayout 0.27.9 on the newest MacOS(M1 chip). Occasionally when I debug the macro, I changed the parameters, but the script still runs with the old parameters. I found if I delete the edit-inst-pcell-parameters in klayoutrc file, the program would back to normal. Could you help me find the problem?thanks.

dsus4wang avatar Jun 11 '22 10:06 dsus4wang

KLayout stores the most recently used parameters. So when you instantiate a PCell again, it will receive the parameters you have used most recently. That is an intended behaviour and is for the convenience of the users who do not have to re-enter the same values.

So when you change the parameters (I assume you change the definition), then you will see the old values, that is true, but not a bug. Either you change the name of the parameter when you change the type for example, or you need to do the reset as you have described it.

Matthias

klayoutmatthias avatar Jun 18 '22 12:06 klayoutmatthias