Maptitude GISDK Help |
Converts an absolute pathname to a relative pathname.
Added to Version 2019.
GetRelativePath(string ref_path, string path)
Argument |
Contents |
ref_path |
The reference pathname |
path |
The absolute pathname to convert to a pathname relative to ref_path |
The relative pathname.
Error Type |
Meaning |
Error |
The absolute pathname does not exist |
The relative pathname is the portion of the absolute pathname that is not included in the reference pathname.
folder = RunMacro("G30 Tutorial Folder")
file_name = folder + "customer.dbf"
relative_path = GetRelativePath(folder, file_name)
ShowMessage("The relative pathname for " + file_name + " is " + relative_path)
result = GetRelativePath("C:\\projects", "C:\\projects\\inputs\\test")
// result = "inputs\\test"
Function |
Summary |
Shortens a file's pathname to the listed length for purposes of display. |
|
Converts a relative pathname to an absolute pathname. |
|
Returns the full, long pathname for a file |
|
Returns the short pathname for a file |
|
Tests to see if the pathname is an absolute pathname |
|
Splits a path and filename into its component parts |
©2025 Caliper Corporation | www.caliper.com |