How would I add a pen json to a power chart

So I copy and pasted the json from on of the pens and modded it so i can add a new pen through script. It’s not working, python is complaining about true. Am I going about this the correct way?Thanks, Jake

JSON, while similar to valid Python code, is not quite there.
One of the big differences is that Javascript (and therefore JSON) use true, false, and null as literals.
If you’re writing this out as literals, you can just do a manual/automated string replacement, e.g. trueTrue, nullNone.

There may be other issues with string escaping/quoting, etc, but that’s probably a start.

That got it going. Now the only problem is I can’t get it to actual show up. When I click on the config of the power chart they are there, just not displaying them. I tried a refreshBindings with no luck.Thanks, jake

Anyone else encounter this. Seems odd it’s not displaying, but it shows it’s there.

nevermind, I’m an idiot, there were some params so those weren’t getting replaced, all is well, thank you all

Hi @codersmurf , I am facing the exact same issue. Which params did you write using script? I am using an Expression Binding with a Script Transform to write to the “pens” property of a PowerChart. Is there any other params that I need to be writing to or some data format issue? If I select a pen using the built-in tag browser and just right click to duplicate pens[0] then edit the tagPath and pen name then that works but not when I write from a script!

The problem happened with a db arc issue, the dec 2021 table was dropped instead of 2020. Once I restored the table all was well.Thx, jake