LoadPoints Statement
Loads a point file into the point memory area for the current robot.
Syntax
LoadPoints fileName [, Merge]
Parameters
- fileName
- String expression containing the specific file to load into the current robot’s point memory area. The extension must be .PTS. The file must exist in the current project for the current robot. You cannot specify a file path and fileName doesn’t have any effect from ChDisk. See ChDisk for the details.
- Merge
- If supplied, then the current points are not cleared before loading the new points. Points in the file are added to the current points. If a point exists in the file, it will overwrite the point in memory.
Description
LoadPoints loads point files from disk into the main memory area of the controller for the current robot.
Use Merge to combine point files. For example, you could have one main point file that includes common points for locals, parking, etc. in the range from 0 to 100. Then use Merge to load other point files for each part being run without clearing the common points. The range could be from 101 to 999.
Potential Errors
A Path Cannot be Specified
If fileName contains a path, an error occurs.
Only a file name in the current project can be specified. File Does Not Exist
If fileName does not exist, an error will occur.
Point file not for the current robot
If fileName is not a point file for the current robot, the following error will be issued: Point file not found for current robot. To correct this, add the Point file to the robot in the Project editor, or execute SavePoints or ImportPoints.
See Also
ImportPoints, Robot, SavePoints
LoadPoints Statement Example
Function main
' Load common points for the current robot
LoadPoints "R1Common.pts"
' Merge points for part model 1
LoadPoints "R1Model1.pts", Merge
Robot 2
' Load point file for the robot 2
LoadPoints "R2Model1.pts"
Fend