Share
 
 

findtrustedfile (AutoLISP)

Searches the AutoCAD trusted locations for the specified file

Supported Platforms: Windows, Mac OS, and Web

Signature

(findtrustedfile filename)
filename

Type: String

Name of the file to be searched for.

Return Values

Type: String or nil

A string containing the fully qualified file name; otherwise nil, if the specified file is not found.

Remarks

The findtrustedfile function makes no assumption about the file type or extension of filename.

Examples

Windows

If the trusted locations and support search file paths contains C:\myapps, and abc.lsp is contained in the path, the function retrieves the path name:

(findtrustedfile "abc.lsp")
"C:\\myapps\\abc.lsp"

If the folder in which abc.lsp is not present in both the trusted locations and support search file paths, findtrustedfile returns nil.

(findtrustedfile "abc.lsp")
nil
Mac OS and Web

If the trusted locations and support search file paths contains /myapps, and abc.lsp is contained in the path, the function retrieves the path name:

(findtrustedfile "abc.lsp")
"/myapps/abc.lsp"

If the folder in which abc.lsp is not present in both the trusted locations and support search file paths, findtrustedfile returns nil.

(findtrustedfile "abc.lsp")
nil

Was this information helpful?