Page 1 of 1
Color Palette Bulk read
Posted: Thu Oct 03, 2019 7:53 pm
by vbalan007
Hi ,
Is there any way to read all the contents of the colorDB via script?
For example, colorDB1 has 10 colors , I would like to read it all and store it in a dyn_string.
Thanks,
Bala
Re: Color Palette Bulk read
Posted: Fri Oct 04, 2019 12:15 pm
by kilianvp
You can read the file
you can see a example in
WinCC_OA\3.16\MobileAppServer_3.16\scripts\libs\mobileApp.ctl
in mobileApp_ColorDB_loadDBs()
Re: Color Palette Bulk read
Posted: Fri Oct 04, 2019 10:49 pm
by vbalan007
Thanks a lot!
Re: Color Palette Bulk read
Posted: Mon Oct 07, 2019 2:25 pm
by leoknipp
If you want to get the colors defined in your project you can use the CTRL function getColorNames();
Also the function colorGet() and colorToRgb() are available to get the color information.
Best Regards
Leopold Knipp
Senior Support Specialist
Re: Color Palette Bulk read
Posted: Mon Oct 07, 2019 4:25 pm
by vbalan007
Thank you! will use both the approaches for reading colors. for grouping and reading colors , based on colordbname, will use the earlier approach. for reading a individual color or color pattern's based on individual colorname, will use the latter.