Table: FileAssociations
Defines parent-child relationships between Vault files, meaning dependencies and attachments.
Columns
Column |
Data Type |
Can Import |
Allows Null |
Default |
Description |
|---|---|---|---|---|---|
nvarchar(256) |
✅ Required |
❌ |
Vault path of the parent file. References Files→FilePath. |
||
int |
✅ |
❌ |
1 |
Exact version of the parent file. References Files→Version. |
|
nvarchar(256) |
✅ Required |
❌ |
Vault path of the referenced file or attachment. References Files→FilePath. |
||
int |
✅ |
❌ |
1 |
Exact version of the referenced file or attachment. References Files→Version. |
|
IsAttachment |
bit |
✅ |
❌ |
0 |
Indicates whether the linked file is an Attachment (1) or a Dependency (0). |
CADRefId |
varchar(260) |
✅ (usually updated via SQL) |
✅ |
Optional Inventor, AutoCAD or Revit-specific reference id. Used to correctly redirect file references after import, specially after moves/renames |
|
_OriginalBCPOverflow |
xml |
⚪ auto (only available when importing from a source Vault BCP package) |
✅ |
Enables identical re-export of the BCP package. |
Remarks
Each association record represents the link between two files and is uniquely identified by the combination of ParentFilePath (including ParentVersion) and ChildFilePath (including ChildVersion).
These columns together form the primary key of this table.
However, although this is allowed by Vault, a single parent-file version should actually not reference multiple versions of the same child-file.
Limitations after imports from BCP packages
For imports from BCP packages, updating the ChildFilePath and ChildVersion columns—or inserting new association records—is not recommended and requires extra steps.
This is because Export-BCPDatabase exports these records including the original ChildId= attribute.
To make changes, the ChildId must be manually corrected in the _OriginalBCPOverflow column, or removed for the respective file record.
Associations imported from other sources can have ChildFilePath and ChildVersion updated normally, as the IDs in the resulting BCP package are generated automatically.
Examples
Retrieving all dependencies and attachements of a given Vault file
SELECT ChildFilePath, ChildVersion, IsAttachment, CADRefId
FROM FileAssociations
WHERE ParentFilePath = '$/Designs/Padlock/Pad Lock.idw'
AND ParentVersion = 6
ChildFilePath ChildVersion IsAttachment CADRefId
----------------------------------------- ------------ ------------ -------
$/Designs/Padlock/Assemblies/Pad Lock.ipn 1 0 1
$/Designs/Padlock/Assemblies/Pad Lock.iam 3 0 2
$/Designs/Padlock/Pad Lock.idw.pdf 6 1