File

File object is of type powerVault File and provides direct access to the Vault file associated with the triggered Job.
The $file variable always references the latest iteration of the file in Vault.

Syntax

1
$file.'Full Path'

See also

For additional details, refer to: powerVault File.

Remarks

The $file variable is available when a Job is triggered with the following parameters:

  • EntityClassId = ‘File’

  • EntityId = <MasterId or Id of a Vault file>

These parameters are utilized by the powerJobs Vault add-in and the LifecycleEventEditor to queue Jobs.
The powerVault File object provides additional members beyond those available in the VDF file object, such as lifecycle state, category, and properties. For instance, the author of a file can be accessed using $file.Author.

The $file variable always references the latest iteration, removing the need for manual management of file IDs or iterations. This allows direct access to lifecycle and property information.

For advanced use cases where the File object does not provide enough information, it can be converted to an Autodesk file object using the Id or MasterId property and used with VDF or web service methods as necessary.