Class NwcXRef
- Namespace
- NwcIO.Model
- Assembly
- NwcIO.dll
Represents an external cross-reference (XRef) to an external file (e.g., texture, CAD file, link model) referenced by a Navisworks document.
public sealed record NwcXRef : IEquatable<NwcXRef>Inheritance
Implements
Inherited Members
Constructors
NwcXRef(string, string)
Represents an external cross-reference (XRef) to an external file (e.g., texture, CAD file, link model) referenced by a Navisworks document.
public NwcXRef(string OriginalPath, string RemappedPath)Parameters
Properties
EffectivePath
Gets the most specific available path (remapped path if present, otherwise original path).
public string EffectivePath { get; }Property Value
OriginalPath
public string OriginalPath { get; init; }Property Value
RemappedPath
public string RemappedPath { get; init; }Property Value
Methods
Exists(string?)
Checks whether the referenced file exists on disk, optionally relative to a base directory.
public bool Exists(string? baseDirectory = null)Parameters
baseDirectorystring?
Returns
TryResolve(string?, out string)
Resolves the reference to an existing file. Relative paths are resolved against
baseDirectory when provided, otherwise against the process working
directory. An absolute stored path is tried first,
and when it is missing the trailing path segments are matched under the base
directory, longest suffix first, so a reference to <old-root>/Arch/A.nwc
resolves to <base>/Arch/A.nwc before <base>/A.nwc.
public bool TryResolve(string? baseDirectory, out string resolvedPath)Parameters
baseDirectorystring?-
Directory to resolve against, typically the directory of the referencing file.
resolvedPathstring-
The first existing candidate, in the order described above.
Returns
- bool
-
True when an existing file was found.