Click or drag to resize

GH_ConvertToRelativePath Method

Note: This API is now obsolete.

Create a relative path from two absolute paths.

Namespace:  Grasshopper.Kernel
Assembly:  Grasshopper (in Grasshopper.dll)
Syntax
[ObsoleteAttribute("Do not use this method, it is lame")]
public static string ToRelativePath(
	string anchor_path,
	string target_path
)

Parameters

anchor_path
Type: SystemString
Anchor path, the relative path result will be based on this location. Must be absolute.
target_path
Type: SystemString
Target path, this is the path that will be converted. Must be absolute and must have the same root as the Anchor.

Return Value

Type: String
The relative path on success or null on failure.
Exceptions
ExceptionCondition
ArgumentNullExceptionThrown if anchor_path is a null reference.
ArgumentNullExceptionThrown if target_path is a null reference.
See Also