CadFileReference
from OpenCAD2D.SheetSets import CadFileReference
class CadFileReference(System.Object) ยท CadFileReference in the .NET reference
A path as a sheet set data file keeps it, in the four forms AutoCAD writes so that a set still finds its files after the folder is moved or opened on another machine: the absolute path, the path relative to the .dst (.\A-101.dwg for a drawing beside the set, ..\Shared\T.dwt for one above it, . for the folder itself), the path with environment variables (%USERPROFILE%\Sheets) and the path with a special folder ($(CSIDL_PERSONAL)\Sheets). A form that is absent is null.
Constructors
__init__
def __init__(self, fileName: str, relativeFileName: str, environFileName: str, specialFolderFileName: str) -> None
Makes a reference from its four forms.
Properties and fields
EnvironFileName
@property
def EnvironFileName(self) -> str | None
Gets the path with environment variables in it (%USERPROFILE%\Sheets), or null.
FileName
@property
def FileName(self) -> str | None
Gets the absolute path, or null.
RelativeFileName
@property
def RelativeFileName(self) -> str | None
Gets the path relative to the folder of the .dst (.\A-101.dwg, ..\T.dwt, .), or null.
SpecialFolderFileName
@property
def SpecialFolderFileName(self) -> str | None
Gets the path with a special folder in it ($(CSIDL_PERSONAL)\Sheets), or null.
Methods
FromPath
@staticmethod
def FromPath(path: str, setFolder: str) -> CadFileReference
Makes the reference the writer makes for a path: the absolute form and the form relative to the .dst. A path on another drive than the .dst has no relative form.
Resolve
def Resolve(self, setFolder: str) -> str
Finds the file or folder the reference names: the relative form against the folder of the .dst, then the absolute form, then the environment form with its variables expanded, then the special folder form.