OK. I guess it can be complicated. I will try to elaborate further on everything.
First of all, an assembly doesn't have a material or an appearance of its own, but the Part type components within it can and do, so there's not really a one shot way to change the appearance of the whole assembly.
You appear to be attempting to change the appearance of 'each' component within the assembly, which is definitely doable, both manually and by code. Manually, you can select the component, then either change the value in the Appearance drop-down menu (Tools tab > Material and Appearance panel), or right-click on it > then choose iProperties > then on the Occurrence tab > change the value in the appearance drop-down list.
By code, if you want to change the appearance of all occurrences that have been placed within a 'normal' assembly, you can 'loop' through them all (don't need to know their names), and do one of the following. 1) Within the 'loop' you can use that shortcut line of code to change its 'color' by supplying a String (text) name of the color or appearance you want to set it to. 2) You can go the longer route of attempting to set the component's ComponentOccurrence.AppearanceSourceType to 'kComponentOccurrenceAppearance' and its ComponentOccurrence.Appearance to an appearance type Asset (a pre-existing named appearance in your document's appearances list). But this may not work if the component is 'assosiatively' set to a design view representation (DesignViewRepresentation). You can check if the component is 'associatively' set using its ComponentOccurrence.IsAssociativeToDesignViewRepresentation Property, but it's not as easy to turn that associative setting off (it is possible though).
An example iLogic rule code using the shortcut method you were using would look something like this:
Dim oADoc As AssemblyDocument = ThisDoc.Document
Dim oADef As AssemblyComponentDefinition = oADoc.ComponentDefinition
For Each oOcc As ComponentOccurrence In oADef.Occurrences
Component.Color(oOcc.Name) = ColorSelect 'or something simple like "Red"
Next
The first line of code in that example, is attempting to get the 'local' or 'active' assembly document object. The next line of code is retrieving the assembly document's component definition, which is where all the components are within. Then the For Each...Next terms are used to 'loop' through a set of objects...in this case the set of all component occurrences that are within the assemblies component definition. Then the Component.Color() line is a shortcut line of code to help you get or set the 'color' of whichever component name you supply (as long as that component is found within the 'active' assembly.) If either it doesn't find the specified component, or if it doesn't recognize the 'color' name you specified, it will throw an error.
You said in your first post that the word "ColorSelect" you used in your rule represented a local user parameter (within the main assembly document), right? And you said that it has "a bunch of different colors linked". Do you mean it is a multi-value 'text' type user parameter, and it has a list of names of colors within it? If so, that should work OK with this simpler example code above, because it is asking for us to specify a color name.
The original iLogic code I posted was attempting to access the iAssembly's configuration table, so it could be edited, and I assumed it might have a column within it that specified the 'color' of components in the iAssembly member rows. I also assumed I could just edit that table cell's text based value to change it to the name of the color you wanted them to be. Since I'm not very familiar with iAssemblies, did a bit of guessing there. Since this is an iAssembly, I do know it has a table where you can change Parameter values, iProperty Values, Exclusions, iMates, BOM stuff, etc, so I assumed you might have a column within the table that you set-up using this 'ColorSelect' user parameter. That way you can change its value individually for each row (member) of the table. However, the code I originally posted still wouldn't have looped through each component within each one of those members (iAssemblyMember) to change the color of all components within each of them. I'm honestly not sure if that can be done in one shot from the iAssemblyFactory document.
Wesley Crihfield

(Not an Autodesk Employee)