Community
Navisworks Forum
Welcome to Autodesk’s Navisworks Forums. Share your knowledge, ask questions, and explore popular Navisworks topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Override colour makes elements white...

1 REPLY 1
SOLVED
Reply
Message 1 of 2
ticodi
684 Views, 1 Reply

Override colour makes elements white...

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:

 

RGBColour.png

 

Howevere if I override the colour using Navisworks GUI, it works, see below:

 

palette.png

 

As you can see it has changed the colour from the image below:

 

worked.png

 

Really don't know why this is happending???

 

Thanks

 

Simon

 

1 REPLY 1
Message 2 of 2
tim.wiegand
in reply to: ticodi

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.


Tim Wiegand
Software Architect

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Rail Community


 

Autodesk Design & Make Report