Table of Contents

Class CadSupportFolders

Namespace
OpenCAD2D
Assembly
OpenCAD2D.Core.dll

The default support folders, as AutoCAD's own Fonts and Support folders are: Fonts, Hatches, Linetypes, Lisps, Pythons, Plugins and DrawingTemplates beside OpenCAD2D.Core.dll (not beside the exe, so that a host which embeds the dll, such as a model drawing library or a Tekla plugin, finds the same ones). A font, a pattern file or a linetype file is looked for in the folders the user set in Global settings' Folder preference first, then in these and their subfolders, then in the presenter's own built-in sets. Every folder is read the same way: depth first, a folder's own files by name first and then its subfolders in the same order, so that a file at the top level comes before one in a subfolder and, of two files of one name, the first wins; a subfolder that is a junction or a symbolic link, or is hidden or a system folder, is not entered. Every .lsp file in Lisps, at any depth, is loaded into each drawing when it opens, and the folder itself (not its subfolders) is on the AutoLISP search path after the user's folders. Every folder directly in Pythons that holds a requirements.txt is a Python tool, loaded once when the app starts (a folder without one is a package the tools import, and a .py file directly in it is refused), where the app uses Python. Every .dll directly in Plugins is one command plugin, and so is every folder at any depth that holds .dll files directly (the folders below it are not walked); a folder with none is walked into, so that Plugins\Company\ToolA\ToolA.dll is the plugin ToolA. They are loaded once when the app starts; the folder is on no search path. The templates in DrawingTemplates and its subfolders are the ones NEW lists where Global settings name no template folder. A folder that does not exist is passed over without a word.

public sealed class CadSupportFolders
Inheritance
CadSupportFolders
Inherited Members

Constructors

CadSupportFolders(string)

Makes the default folders of a root, as a test or a host puts them.

Properties

Default

Gets the default folders: those beside OpenCAD2D.Core.dll.

ProgramFolder

Gets the folder that holds the Fonts, Hatches, Linetypes, Lisps, Pythons, Plugins and DrawingTemplates folders: the folder of OpenCAD2D.Core.dll; null where the dll has no place on disk.

Methods

ExistingOf(CadSupportKind)

Gets the default folder of a kind where it exists, else none: a folder that does not exist is skipped silently; its subfolders are not listed.

FolderOf(CadSupportKind)

Gets the default folder of a kind, as C:\App\Fonts, whether it exists or not; null where there is no root.