Hi,
From the RevitSDK2014 I copy/pasted the code as stated below, but when I execute the code it keeps throwing an exception. My problem is that the newcolor is created but as read-only and so I am not allowed to change its settings. Anyone any ideas how to resolve this read-only issue?
regards,
Raymond
Private Function NewColorInfo(ByVal appCreation As Autodesk.Revit.Creation.Application) As Color
' Create a new color
Dim color As Autodesk.Revit.DB.Color = appCreation.NewColor()
' Set its RGB values
color.Red = CByte(127)
color.Green = CByte(64)
color.Blue = CByte(32)
' Display the color info
Dim info As New StringBuilder()
info.AppendLine("Red:" & vbTab & color.Red.ToString())
info.AppendLine("Green:" & vbTab & color.Green.ToString())
info.AppendLine("Blue:" & vbTab & color.Blue.ToString())
TaskDialog.Show("Revit", info.ToString())
Return color
End Function