Maptitude GISDK Help

CompactPath()

Summary

Shortens a file's pathname to the listed length for purposes of display.

 

Changes

Added to Version 2019.

 

Syntax

CompactPath(string path, integer length)

 

Argument

Contents

path

Full file pathname of a file

length

Shortened string length

 

Returns

The pathname no longer than length.

 

Notes

Examples

folder = RunMacro("G30 Tutorial Folder")

file_name = folder + "customer.dbf"

compact_name = CompactPath(file_name, 20)

ShowMessage("The compact pathname for " + file_name + " is " + compact_name)

 

result = CompactPath("C:\\this\\is\\a\\long\\path.exe", 10)

// result = "...\\path.exe"

 

See Also

Function

Summary

GetAbsolutePath()

Converts a relative pathname to an absolute pathname

GetLongPathName()

Returns the full, long pathname for a file

GetRelativePath()

Converts an absolute pathname to a relative pathname

GetShortPathName()

Returns the short pathname for a file

IsPathAbsolute()

Tests to see if the pathname is an absolute pathname

SplitPath()

Splits a path and filename into its component parts

 

 

©2025 Caliper Corporation www.caliper.com