OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Developer Forums > VBA > CorelDRAW/Corel DESIGNER VBA

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 26-07-2019, 06:19
aakkaarr aakkaarr is offline
Senior Member
 
Join Date: Jan 2009
Posts: 158
Default How to Select unique colors in shaperange

How to Select unique colors in shaperange
Reply With Quote
  #2  
Old 25-11-2020, 14:44
shelbym's Avatar
shelbym shelbym is offline
Senior Member
 
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,782
Blog Entries: 11
Send a message via ICQ to shelbym Send a message via AIM to shelbym Send a message via MSN to shelbym Send a message via Yahoo to shelbym
Default 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
Reply With Quote
  #3  
Old 17-01-2021, 13:51
aakkaarr aakkaarr is offline
Senior Member
 
Join Date: Jan 2009
Posts: 158
Default

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
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
X5 shaperange bug? knowbodynow CorelDRAW/Corel DESIGNER VBA 3 20-03-2012 23:08
shaperange.add HeauxmBru Macros/Add-ons 10 30-06-2011 22:15
How to select the black lines, fill in random colors? sy168 CorelDRAW/Corel DESIGNER VBA 2 16-08-2008 03:23
Shaperange to Layer ebu CorelDRAW/Corel DESIGNER VBA 2 19-01-2008 04:44
How To Select Similar Colors In Corel X3 SIGNTIST2004 CorelDRAW/Corel DESIGNER VBA 2 27-12-2006 16:19


All times are GMT -5. The time now is 18:30.


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