points_load()

Loads points from a file located in the profile directory.

The function accepts a string that represents the filename (or relative subpath) within the profile directory.

If the file exists, it loads the points into the global point list and returns the number of points loaded.

Syntax

planetcnc.points_load(filename)

Parameters

Parameter Type Description
filename str A string representing the name of the file (or relative path) from which to load points.

Return Value

Examples

#! /usr/bin/env python 
 
import planetcnc
 
# Load points from a file named "points.dat" in the profile directory.
num_points = planetcnc.points_load("points.dat")
print(f"Loaded {num_points} points from 'points.dat'.")

See also

points_clear
points_count
points_add
points_get
points_set
points_delete
points_load
points_save