CurrentLinePen() function - MapBasic - 2023

MapInfo MapBasic Reference

Product type
Software
Portfolio
Locate
Product family
MapInfo
Product
MapInfo > MapBasic
Version
2023
Language
English
Product name
MapBasic
Title
MapInfo MapBasic Reference
First publish date
1985
Last updated
2023-09-12
Published on
2023-09-12T16:32:32.686312

Purpose

Returns the Pen (line) style currently in use. You can call this function from the MapBasic window in MapInfo Pro.

Syntax

CurrentLinePen()

Return Value

Pen

Description

The CurrentLinePen() function returns the current Pen style. MapInfo Pro assigns the current style to any line or polyline objects drawn by the user. If a MapBasic program creates an object through a statement such as Create Line statement, but the statement does not include a Pen clause, the object uses the current Pen style. The return value can be assigned to a Pen variable, or may be used as a parameter within a statement that takes a Pen setting as a parameter (such as Set Map statement).

To extract specific attributes of the Pen style (such as the color), call the StyleAttr() function. For more information about Pen settings, see Pen clause.

Example

Dim p_user_pen As Pen p_user_pen = CurrentPen() 

See Also:

CurrentBorderPen() function, Pen clause, Set Style statement, StyleAttr() function