ApplicationNewColor Method |
Returns a new color object.
Namespace: Autodesk.Revit.CreationAssembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
SyntaxPublic Function NewColor As Color
public:
Color^ NewColor()
member NewColor : unit -> Color
Return Value
ColorThe new color object.
ExampleColor NewColorInfo(Autodesk.Revit.Creation.Application appCreation)
{
Autodesk.Revit.DB.Color color = appCreation.NewColor();
color.Red = (byte)127;
color.Green = (byte)64;
color.Blue = (byte)32;
StringBuilder info = new StringBuilder();
info.AppendLine("Red:\t" + color.Red.ToString());
info.AppendLine("Green:\t" + color.Green.ToString());
info.AppendLine("Blue:\t" + color.Blue.ToString());
TaskDialog.Show("Revit",info.ToString());
return color;
}
Private Function NewColorInfo(appCreation As Autodesk.Revit.Creation.Application) As Color
Dim color As Autodesk.Revit.DB.Color = appCreation.NewColor()
color.Red = CByte(127)
color.Green = CByte(64)
color.Blue = CByte(32)
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
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
See Also