Table of Contents

CadSupportFiles

from OpenCAD2D import CadSupportFiles

class CadSupportFiles(System.Object) ยท CadSupportFiles in the .NET reference

The support files a drawing's linetypes (.lin) and hatch patterns (.pat) may be read from, looked for in this order: the folders the user gave in CadDocument.SupportFolders, then the Linetypes or Hatches folder beside OpenCAD2D.Core.dll and its subfolders (CadSupportFolders), then the presenter's own sets (CadLinetypeFile.BuiltIn, CadPatternFile.BuiltIn). The drawing's own folder is not looked in for them, and no file of AutoCAD's is looked for or preferred.

Properties and fields

DefaultFolders

.NET

DefaultFolders: ClassVar[System.Collections.Generic.IReadOnlyList[str]]

Gets the support folders a drawing starts with: none. The user adds a folder of their own in Global settings' Support file search folders; the folders beside the dll are looked in after them.

Methods

DefaultLinetypeFile

.NET

@staticmethod
def DefaultLinetypeFile(document: CadDocument) -> str

Gets the linetype file a drawing loads from unless told otherwise: the presenter's own set (CadLinetypeFile.BuiltInName), whatever the drawing's units. A file of the user's is loaded only where the user names it.

Find

.NET

@staticmethod
def Find(document: CadDocument, fileName: str) -> str

Finds a file of support: the path as written where it is a full path that is there, else its name in the document's support folders in order and then, for a .lin or .pat file, in the Linetypes or Hatches folder beside the dll and its subfolders; null where none has it.

List

.NET

@staticmethod
def List(document: CadDocument, extension: str) -> System.Collections.Generic.IReadOnlyList[str]

Lists the files of support of an extension in the support folders and the folder beside the dll with its subfolders, each name once, the first that has it winning, in the order of the walk (CadSupportFolders): the user's folders in order, then the folder beside the dll, its own files by name first and then its subfolders.