Function Entry: FINDFILE

← Prev | ↑ Chapter | Next → | Index | Symbols

Function Entry: FINDFILE

Name

findfile

Class

Function

Syntax

(findfile filename)

Arguments and Values

  • filename: string

Description

Searches the AutoCAD library path for the specified file.

Return Values

Returns a pathname string identifying the located file, or nil.

Side Effects

None.

Affected By

  • library-path configuration
  • trusted-path configuration
  • selected environment profile

Availability

  • AutoCAD 2026: documented (per Autodesk reference page).
  • AutoCAD 2022, BricsCAD V25 and V26: verified by runtime probe 2026-08-09 — absolute paths written with forward slashes are accepted on every engine.
  • Status: verified on both vendors (no longer "presumed compatible").

Source Notes

Notes

  • Autodesk documents that filename must not contain a directory prefix.
  • Autodesk documents that the support-file search path is searched.
  • Autodesk documents that URL strings may also be returned when appropriate.
  • Separator asymmetry — verified 2026-08-09. Both CADs accept a forward-slash absolute path on input but return the located path with backslashes. The argument and the result are therefore not interchangeable: a caller that compares findfile's result against the string it passed in, or that feeds one result to another path operation expecting its own spelling, will mismatch on Windows-style output. Normalise separators before comparing.
  • In clautolisp, findfile searches the union of the support search path and the trusted folders (TRUSTEDPATHS plus the implicit folders), without trust-filtering. See Normative Rules: Secure File Loading and Trust Model (this chapter).