ConvertToLine - 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

Convert all selected polylines with two nodes to line objects; corresponds to choosing Spatial > Edit > Covert Polyline To Line. This function requires the MapCAD Tool and can be executed via the Exec() command. You can call this function from the MapBasic window in MapInfo Pro.

Syntax

Exec ("MapCAD.mbx","ConvertPolylineToLine")

Return Value

Object

Description

Use the ConvertPolylineToLine function to convert all selected polylines with two nodes to line objects. All objects of the current selection will be changed. Objects that do not have a suitable object type or more than one nodes will be ignored. The return value of the function is the number of actually changed source objects.

The MapCAD tool must be loaded. This function requires no active map window.

Examples

'Convert all selected polylines with two nodes to line objects
Dim i as integer 
i = Exec("MapCAD.mbx","ConvertPolylineToLine") 
note "Objects changed: " + i