Matching two or three colours

Matching two or three colours

Anonymous
Not applicable
353 Views
1 Reply
Message 1 of 2

Matching two or three colours

Anonymous
Not applicable

Hi All....

 

I want to to do an operation based on colors but I need more than the 216 individual colors available so......

What I was thinking was to do an operation based on two or three colors like some as below. Is this possible?

 

 

------------------------------------------------

REAL $Red = 0
REAL $Green = 0
REAL $Blue = 0


IF ($Red== 128 and $Green == 255 and $Blue == 0) and ( $Red== 255 and $Green == 0 and $Blue == 255) {
EDIT MODEL "Cover_Abutment_WP_2" SELECT ALL
}

---------------------------------------------------

 

Thanks Anthony

 

0 Likes
354 Views
1 Reply
Reply (1)
Message 2 of 2

5axes
Advisor
Advisor

An entity can have only one color. So using something like :

IF ($Red== 128 and $Green == 255 and $Blue == 0) AND ( $Red== 255 and $Green == 0 and $Blue == 255)  will always return 0, The condition can never be fulfilled

 

You can use :

IF ($Red== 128 and $Green == 255 and $Blue == 0) OR ( $Red== 255 and $Green == 0 and $Blue == 255). If the color of the entity is Chartreuse (128,255,0)  OR Magenta (255,0,255)  Then ...

 

You can also use directly

 

EDIT MODEL ALL DESELECT ALL

EDIT SELECTION MODEL FILTER "128,255,0" EDIT SELECTION MODEL APPLY

EDIT SELECTION MODEL FILTER "255,0,255" EDIT SELECTION MODEL APPLY

 

0 Likes