Objects Pline statement - 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.686000

Purpose

Splits a single section polyline into two polylines. You can issue this statement from the MapBasic window in MapInfo Pro.

Syntax

Objects Pline Split At Node index 
	[ Into Table name ]
	[ Data column_name = expression [ , column_name = expression ... ] ]

index is an integer of the index number of the node to split.

name is a string representing the name of the table to hold the new objects.

column_name is a string representing the name of the column where the new values are stored.

expression is an expression which is used to assign values to column_name.

Description

If an object is a single section polyline, then two new single section polyline objects are created in the output table name. The Node index should be a valid MapBasic index for the polyline to be split. If Node is a start or end node for the polyline, the operation is cancelled and an error message is displayed.

The optional Data clause controls what values are stored in the columns of the output objects. The Data clause can contain a comma-delimited list of column assignments. Each column assignment can take one of the forms listed in the following table:

Assignment Effect
col_name = col_name
Does not alter the value stored in the column.
col_name = value
Stores a specific value in the column. If the column is a character column the value can be a string; if the column is a numeric column, the value can be a number.

The Data clause can contain an assignment for every column in the table. If the Data clause specifies assignments for only some of the columns, blank values are assigned to those columns that are not listed in the Data clause.

If you omit the Data clause entirely, all columns are blanked out of the target objects, storing zero values in numeric columns and blank values in character columns.

Example

In the following partial example, the selected polyline is split at the specified node (node index of 12). The unchanged values from each record of the selected polyline are inserted into the new records for the split polyline.

Objects Pline Split At Node 12 Into Table WORLD Data 
Country=Country,Capital=Capital,Continent=Continent,Numeric_code=Numeric_
code,FIPS=FIPS,ISO_2=ISO_2,ISO_3=ISO_3,Pop_1994=Pop_1994,Pop_Grw_Rt=Pop_G
rw_Rt,Pop_Male=Pop_Male,Pop_Fem=Pop_Fem...

See Also:

ObjectLen() function, ObjectNodeX() function, ObjectNodeY() function, Objects Disaggregate statement