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


Defines whether a polygon (polyline) is set to open mode (that is, its two end points are not joined) or closed (its two ends are joined). It can also be used to retrieve the current open mode 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.




TRUE = Polygon is drawn in open mode; FALSE = Polygon is drawn in closed mode.

Return Value

If retrieving the current open mode setting for a polygon, TRUE or FALSE is returned. If setting the open mode, 0 (zero) is returned 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.


' Sets a polygon to Open mode
GraphicsBuilder.AttributePolygonOpen = TRUE

' Determines if the current polygon is defined as Open
MyVariable = GraphicsBuilder.AttributePolygonOpen

Note: This function is implemented in the C++ environment as two separate functions: put_AttributePolygonOpen sets the open mode for a polygon, and get_AttributePolygonOpen retrieves the current open mode setting.