AnsweredAssumed Answered

How to set part colors Parallelly ?

Question asked by Paritosh Singh on Feb 20, 2020
Latest reply on Mar 27, 2020 by Paritosh Singh

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<double>^ colorset = (array<double>^)(childExxar1->GetModelMaterialPropertyValues(childExxar1->ReferencedConfiguration));

colorset[0] = red;
colorset[1] = green;
colorset[2] = blue;

childExxar1->MaterialPropertyValues = colorset;