Class CadFileReference
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.
public sealed class CadFileReference
- Inheritance
-
CadFileReference
- Inherited Members
Remarks
Resolve(string) tries the forms in the order relative, absolute, environment, special folder, and the first that exists is the file; a set whose folder has been moved therefore keeps working through the relative form. A reference made by FromPath(string, string) has the absolute and the relative form only: the other two are kept where a file has them and are never added.
Constructors
- CadFileReference(string, string, string, string)
Makes a reference from its four forms.
Properties
- EnvironFileName
Gets the path with environment variables in it (
%USERPROFILE%\Sheets), or null.
- FileName
Gets the absolute path, or null.
- RelativeFileName
Gets the path relative to the folder of the .dst (
.\A-101.dwg,..\T.dwt,.), or null.
- SpecialFolderFileName
Gets the path with a special folder in it (
$(CSIDL_PERSONAL)\Sheets), or null.
Methods
- FromPath(string, string)
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(string)
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.