Arbortext Command Language > Functions by Alphabetical Listing > entity_relative_path
  
entity_relative_path
newpath=entity_relative_path(path, dir, type)
This function converts the absolute path name given by path into a relative path name if possible. If the file is in or below the same directory as the supplied directory dir, then a path name relative to that directory is returned. If the file is not in or below dir, depending on the value of type, if the file is in or below a directory from one of the path list options being considered, then a path name relative to that directory is returned. Otherwise, the original input path name is returned.
The type parameter can have one of the following values:
0 if the reference is to a graphic.
If it is 0 then the set graphicspath option is considered
1 if the reference is to a file entity.
If it is 1 then the set entitypath option is considered
2 if the reference is to an XML inclusion.
If it is 2 then both set graphicspath and set entitypath are ignored.
3 if the reference is a DITA reference.
If it is 3 then the set ditapath option is considered.
Related topic
entity_path function
graphic_relative_path function