Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
tom89Y38
278 Views, 2 Replies

Get RGB color from active appearance to color Excel cell

Hi,

 

I wrote an iLogic rule to collect data from an assembly that's very useful to my colleagues on the shop floor.

One of the functions of the rule is to create an overview like this, it checks all the appearances, and overrides, sums the surface area's and weights, etc..

 

Example assembly (contains sub assembly, 1 weld assembly with color override, 1 weld assembly without color override, 1 part)

tom89Y38_1-1718717595611.png

tom89Y38_2-1718717630980.png

 

The problem i'm facing: when a weld assembly has a color override, the thumbnail does not have the correct color. (This is normal because the color is given at a higher level).

Therefore I was thinking to have a work around and get the RGB value of the active appearance of that color override and color the corresponding Excel cell.

I just can't figure out how to get the RGB color values of the active appearance on a correct way.

 

In my code I'm already looping through all component occurrences like this

Sub ProcessWeldAssembliesWithOverrides(oAssembly As AssemblyDocument) 'subprogramma
		' Loop door de alle componenten in de assembly
		For Each oComp As ComponentOccurrence In oAssembly.ComponentDefinition.Occurrences

So it would be great if I could get the RGB values of oComp in that same loop.

 

Any ideas to help me out?

 

Thanks!