Technical Reference > Graphics Builder Automation Interface > Object Drawing and Property Functions > AttributeLineColour


Applies a color to a line, or retrieves the current color setting.

This function applies to the selected object, which is typically the last placed object. By using the PageSelectFirstObject() and PageSelectNextObject() functions, you can access your objects and change or read their properties.

Note: This function, as it does not support True Color functionality, has been superseded by the functions AttributeLineOnColourEx and AttributeLineOffColourEx.




A value between 0 and 255 representing a particular color.

Return Value

If retrieving the current line color, a value between 0 and 255. If setting the line color, 0 (zero) if successful. In both cases, an error is returned if unsuccessful. If values are out of range on writing to the attribute, the function will exit and report the error E_INVALIDARG. If there is no active object, they will exit and report a return value of E_HANDLE.

Note: For details on handling return and error values, see Error Handling.

Related Functions

AttributeLineWidth, AttributeLineStyle


' Applies a color to the current line
GraphicsBuilder.AttributeLineColour = 125

' Retrieves the value of the color applied to the current line
MyVariable = GraphicsBuilder.AttributeLineColour

Note: This function is implemented in the C++ environment as two separate functions: put_AttributeLineColour applies a particular color to a line, and get_AttributeLineColour retrieves the current color setting.