I am overriding colours of model elements using the below code, and this works fine, and some elements are changed correctly if I use an RGB colour like RED (255,0,0), however when I change the RGB values to something like 255, 255, 128 it seems to just change the colour of the element to WHITE.
Dim newColor As New Autodesk.Navisworks.Api.Color(255, 255, 128)
'Override the Color
Autodesk.Navisworks.Api.Application.ActiveDocument.Models.OverridePermanentColor(items, newColor)
Please see image below that the element was coloured white:
Howevere if I override the colour using Navisworks GUI, it works, see below:
As you can see it has changed the colour from the image below:
Really don't know why this is happending???
Thanks
Simon
Solved! Go to Solution.
Solved by tim.wiegand. Go to Solution.
Check the documentation for the Color class. In Navisworks the R, G and B parts of a color are defined as floating point values in the range 0.0 to 1.0. A color of (1,1,0.5) should do what you want.