Extensibility > Graphics Builder Automation Interface > Object Drawing and Property Functions > AttributeLineWidth

AttributeLineWidth

Sets the width of a line, or retrieves its current width.

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.

Syntax

AttributeLineWidth(LineWidth)

LineWidth:

A value between 0 and 32 representing the line width in pixels.

Return Value

If retrieving the current width of a line, a value between 1 and 32 (representing pixels) is returned. If setting the line width, 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

AttributeLineStyle, AttributeLoLightColour

Example

' Sets the width for the current line
GraphicsBuilder.AttributeLineWidth = 1

' Retrieves the width of the current line
MyVariable = GraphicsBuilder.AttributeLineWidth

This function is implemented in the C++ environment as two separate functions: put_AttributeLineWidth sets the value for the width of a line, and get_AttributeLineWidth retrieves the current line width setting.

Published June 2018