OberonPlace.com Forums

OberonPlace.com Forums (http://forum.oberonplace.com/index.php)
-   CorelDRAW/Corel DESIGNER VBA (http://forum.oberonplace.com/forumdisplay.php?f=16)
-   -   How to Select unique colors in shaperange (http://forum.oberonplace.com/showthread.php?t=24837)

aakkaarr 26-07-2019 06:19

How to Select unique colors in shaperange
 
How to Select unique colors in shaperange

shelbym 25-11-2020 14:44

How to Select unique colors in shaperange
 
Here is a fun little way to do this using CQL:
Code:

Sub CQLColors()
    Dim sGroup As Shape
    Dim strColors As String
   
    Set sGroup = ActiveSelectionRange.Group
       
    strColors = sGroup.Evaluate("@children.foreach(array(), $lasteval.addarray($item.colors)).unique.convert($item.name).join(', ')")
   
    sGroup.Ungroup
   
    MsgBox strColors
End Sub

Happy Coding,

-Shelby

aakkaarr 17-01-2021 13:51

Thanks Shelby,
when selecting Red and Black the msgbox says Black, unnamed color
I need to find color value like if CMYK then the values of C,Y,M,K


All times are GMT -5. The time now is 11:03.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.
Copyright © 2011, Oberonplace.com