thanks for the suggestion, but unfortunately, this did not have the desired effect.
For clarity, the following image contains the holes that have the biggest problem:
top-to-bottom; an M10 hole, after manually reapplying the color settings (nothing changed); the same M10 hole as affected by the macro, and an M6 hole, unedited
if i change the lighting to the extremes: this results in the following
the M10 holes are set to 255;177;0, while the M6 is 255;255;0
on the upper image, holes #2 and #3 have the different RGB applied, but show the same color under the same conditions (fresh hole, no manual tampering)
can you show me this part of your code?
vMatProp(0) = 1
vMatProp(1) = 177 / 255
vMatProp(2) = 0
MatProp = swFeat.GetMaterialPropertyValues
If MatProp Is Nothing Then
MatProp = swModel.MaterialPropertyValues()
MatProp(0) = CDbl(RGBCodes(0)) / 255.0#
MatProp(1) = CDbl(RGBCodes(1)) / 255.0#
MatProp(2) = CDbl(RGBCodes(2)) / 255.0#
MatProp(7) = 0
MatProp(8) = CDbl(Emission)
swFaces = swFeat.GetFaces
If swFaces IsNot Nothing Then
For j As Integer = 0 To swFaces.Length - 1
tmpFace = swFaces(j)
Result = tmpFace.RemoveMaterialProperty()
tmpFace.SetMaterialPropertyValues2(MatProp, swInConfigurationOpts_e.swAllConfiguration, Nothing)
swFeat is pre-defined at this point to be the hole i want to color.
'RGBCodes' and 'Emmision' are imported from XML
Your default language setting for comma is not the same as Emission uses. Therefore CDbl(Emission) = 1
if Emission has "." as separator, then you can use val(Emission)
I just figured this out by experimentation myself.
thanks for the help