Grasshopper API
GH_FormatFormatFilePath Method (String, Int32, Font) |
Format a filepath so that it doesn't exceed width.
If the filepath filename is already longer than maxLength it will be returned intact.
Namespace: Grasshopper.Kernel
Assembly: Grasshopper (in Grasshopper.dll)

public static string FormatFilePath( string path, int maxWidth, Font font )
Public Shared Function FormatFilePath ( path As String, maxWidth As Integer, font As Font ) As String
Parameters
- path
- Type: SystemString
Path to format. - maxWidth
- Type: SystemInt32
Maximum allowed width (in pixels) - font
- Type: System.DrawingFont
Font to use for measuring.
Return Value
Type: StringThe formatted path.
