LSP Functions

Overview

Many of the Carlson functions and program environment settings are defined in LSP. These functions and variables are available for you to use in your own LSP routines.

The following is a list of useful functions:
scad_getfiled - file selection dialog

The following is a list of useful variables:
lspdir$ - Carlson LSP folder where program files are located (string)
tmpdir$ - current project data folder (string)
usrdir$ - folder for program settings and temporary files (string)
psname - Carlson Support folder (string)
sv:sm - horizontal scale (real)
sv:vs - vertical scale (real)
sv:ts - text size scaler (real)
sv:ps - symbol size scaler (real)
is_metric - english/metric mode (0=english, 1=metric)
crdfile - current coordinate file (string)

scad_getfiled

Runs a file selection dialog. The function returns a string of the selected file name.

Usage: (scad_getfiled title folder extension mode)
title - A string for the dialog title
folder - A string for the initial default folder
extension - A string for the file type extension
mode - An integer for the selection mode (0 = existing file, 1 = new file)

Example: (setq file_name (scad_getfiled "Pick Surface To Process" tmpdir$ "tin" 0))

centroid

Calculates the centroid point of a polyline. The function returns a point for the centroid. This function is within the poly3d program which must be loaded using scload.

Usage: (cf:poly3d usrdir$ 112 ename)
ename - entity name of closd polyline

Example: (scload (strcat lspdir$ "poly3d"))
        (setq pnt (
cf:poly3d usrdir$ 112 ename))