AddFile

EventNames:

  • AddFile_Restrictions

  • AddFile_Pre

  • AddFile_Post

Parameters

Type

Name

Description

File

file

The file which is / was added.

Restrictions and Pre:
In Restrictions and Pre you have only very limited data set on this object like _NewName, _NewComment, _NewModDate, _NewClassification and _NewHidden, because the file does not exist yet.

Post:
In Post it is a powerVaultFile object, because here the file exists.

Folder

parentFolder

The folder where the new file is located.

File[]

dependencies

The file dependencies what this new file has.

File[]

attachments

The attached files what this new file has.

FileBomRow[]

fileBom

The Bill of Materials of the newly checked-in file.
For Inventor files with multiple Model States only the BOM data of the Master model state is available.

bool

successful

Post:
The information whether the Web Service call was successful or not is only available in Post events.

Examples:
AddFile_Restrictions:

Register-VaultEvent -EventName AddFile_Restrictions -Action 'RestrictAddFile'

function RestrictAddFile($file, $parentFolder, $dependencies, $attachments, $fileBom) {
	#Write event code here
}

AddFile_Pre:

Register-VaultEvent -EventName AddFile_Pre -Action 'PreAddFile'

function PreAddFile($file, $parentFolder, $dependencies, $attachments, $fileBom) {
	#Write event code here
}

AddFile_Post:

Register-VaultEvent -EventName AddFile_Post -Action 'PostAddFile'

function PostAddFile($file, $parentFolder, $dependencies, $attachments, $fileBom, $successful) {
	#Write event code here
}