I can set part color using the below code. But i want to set the color of multiple parts in parallel.
swAssembly = (IAssemblyDoc^)swModel;
IComponent2^ childExxar1;
childExxar1 = (IComponent2^)swAssembly->GetComponentByName(partNameCLI);//partNameCLI
char* stringPointer1 = (char*)Marshal::StringToHGlobalAnsi(childExxar1->Name).ToPointer();
array
colorset[0] = red;
colorset[1] = green;
colorset[2] = blue;
childExxar1->MaterialPropertyValues = colorset;
Thanks
SolidworksApi/macros