How to add a column type color into dataset in the template's internal property

Dear Expert,

     For my practicing about ignition software. I have download a VM demo project from . I have try but cannot figure out how to do the dataset column with type is color. If any one could help me, please see in attached picture for more detail.

Best Regard,

There’s a few ways to do this, one scripting, one by using a little trick I found with custom properties.

Easy enough to run a little script to set the column up, then you can add more rows and columns via the gui should you choose to.

You can put the below on a temporary button to fill in the property with the color column

dataset = system.dataset.toDataSet(['color'],[[system.gui.color(255,255,255)]])
# then set the component property:
pathToComponentProperty = dataset

If you want to do this in a dataset that is a custom property, you can create a color column by default during the creation of the dataset property. Follow these steps:

a. Go to custom properties on the component you wish to have it on and click the add button.
b. Give it a name, and select Color as the type. Do not click OK.
c. Set the Type to Dataset and click OK
d. Open that dataset up and you’ll see the value column default to a Color type. Shown below.



Dear jonathan.taylor

        Thank you!