File Events

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 its a usualy 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
}

EventNames:

  • CheckinFile_Restrictions

  • CheckinFile_Pre

  • CheckinFile_Post

Parameters

Type

Name

Description

File

file

The file which is / was checked in.

Restrictions and Pre:
In Restrictions and Pre you have the future data set on this object like _NewName, _NewComment, _NewModDate, _NewClassification, _NewCheckedOut and _NewHidden.

Post:
In POST you can retrieve the information from previous events by using the properties _OldName, _OldComment, _OldModDate, _OldClassification, _OldCheckedOut and _OldHidden.

File[]

dependencies

The file dependencies what this new checked-in file has.

File[]

attachments

The attachments what this new checked-in file has.

FileBomRow[]

fileBom

The Bill of Materials of the 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:
CheckinFile_Restrictions:

Register-VaultEvent -EventName CheckinFile_Restrictions -Action 'RestrictCheckinFile'
function RestrictCheckinFile($file, $dependencies, $attachments, $fileBom) {
	#Write event code here
}

CheckinFile_Pre:

Register-VaultEvent -EventName CheckinFile_Pre -Action 'PreCheckinFile'
function PreCheckinFile($file, $dependencies, $attachments, $fileBom) {
	#Write event code here
}

CheckinFile_Post:

Register-VaultEvent -EventName CheckinFile_Post -Action 'PostCheckinFile'
function PostCheckinFile($file, $dependencies, $attachments, $fileBom, $successful) {
	#Write event code here
}

EventNames:

  • CheckoutFile_Restrictions

  • CheckoutFile_Pre

  • CheckoutFile_Post

Parameters

Type

Name

Description

File

file

The file which should get / is checked=out.

Restrictions and Pre:
In Restrictions and Pre you have the future data set on this object like _NewComment and _NewCheckoutMachine.

Post:
In POST you can retrieve the information from the previous events by using the properties _OldComment and _OldCheckoutMachine.

string

localPath

The local path where the file should / is checked=out

bool

successful

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

Examples:
CheckoutFile_Restrictions:

Register-VaultEvent -EventName CheckoutFile_Restrictions -Action 'RestrictCheckoutFile'
function RestrictCheckoutFile($file, $localPath) {
	#Write event code here
}

CheckoutFile_Pre:

Register-VaultEvent -EventName CheckoutFile_Pre -Action 'PreCheckoutFile'
function PreCheckoutFile($file, $localPath) {
	#Write event code here
}

CheckoutFile_Post:

Register-VaultEvent -EventName CheckoutFile_Post -Action 'PostCheckoutFile'
function PostCheckoutFile($file, $localPath, $successful) {
	#Write event code here
}

EventNames:

  • DeleteFiles_Restrictions

  • DeleteFiles_Pre

  • DeleteFiles_Post

Parameters

Type

Name

Description

File[]

files (deletedFiles in POST)

The files which should be deleted or are already deleted.

bool

successful

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

Examples:
DeleteFiles_Restrictions:

Register-VaultEvent -EventName DeleteFiles_Restrictions -Action 'RestrictDeleteFiles'

function RestrictDeleteFiles($files) {
	#Write event code here
}

DeleteFiles_Pre:

Register-VaultEvent -EventName DeleteFiles_Pre -Action 'PreDeleteFiles'

function PreDeleteFiles($files) {
	#Write event code here
}

DeleteFiles_Post:

Register-VaultEvent -EventName DeleteFiles_Post -Action 'PostDeleteFiles'

function PostDeleteFiles($deletedFiles, $successful) {
	#Write event code here
}

EventNames:

  • DownloadFiles_Restrictions

  • DownloadFiles_Pre

  • DownloadFiles_Post

Parameters

Type

Name

Description

File[]

files

The files which should get / are downloaded.

bool

successful

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

Examples:
DownloadFiles_Restrictions:

Register-VaultEvent -EventName DownloadFiles_Restrictions -Action 'RestrictDownloadFiles'

function RestrictDownloadFiles($files) {
	#Write event code here
}

DownloadFiles_Pre:

Register-VaultEvent -EventName DownloadFiles_Pre -Action 'PreDownloadFiles'

function PreDownloadFiles($files) {
	#Write event code here
}

DownloadFiles_Post:

Register-VaultEvent -EventName DownloadFiles_Post -Action 'PostDownloadFiles'

function PostDownloadFiles($files, $successful) {
	#Write event code here
}

EventNames:

  • MoveFile_Restrictions

  • MoveFile_Pre

  • MoveFile_Post

Parameters

Type

Name

Description

File

file

The file which should get / are moved.

Restrictions and Pre:
In Restrictions and Pre you could get the new path by the property _NewFullPath.

Post:
In POST you you could get the old path by the property _OldFullPath.

Folder

parentFolder

The parent folder where the file should get / is moved.

bool

successful

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

Examples:
MoveFile_Restrictions:

Register-VaultEvent -EventName MoveFile_Restrictions -Action 'RestrictMoveFile'

function RestrictMoveFile($file, $parentFolder) {
	#Write event code here
}

MoveFile_Pre:

Register-VaultEvent -EventName MoveFile_Pre -Action 'PreMoveFile'

function PreMoveFile($file, $parentFolder) {
	#Write event code here
}

MoveFile_Post:

Register-VaultEvent -EventName MoveFile_Post -Action 'PostMoveFile'

function PostMoveFile($file, $parentFolder, $successful) {
	#Write event code here
}

EventNames:

  • UpdateFileStates_Restrictions

  • UpdateFileStates_Pre

  • UpdateFileStates_Post

Parameters

Type

Name

Description

File[]

files

The updated / updating files for a LifeCycle.

Restrictions and Pre:
In Restrictions and Pre you have the future data set on this object like _NewComment, _NewLifeCycleDefinition and _NewState.

Post:
In POST you can retrieve the information from previous events by using the properties _OldComment, _OldState and _OldLifeCycleDefinition.

bool

successful

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

Examples:
UpdateFileStates_Restrictions:

Register-VaultEvent -EventName UpdateFileStates_Restrictions -Action 'RestrictUpdateFileStates'

function RestrictUpdateFileStates($files) {
	#Write event code here
}

UpdateFileStates_Pre:

Register-VaultEvent -EventName UpdateFileStates_Pre -Action 'PreUpdateFileStates'

function PreUpdateFileStates($files) {
	#Write event code here
}

UpdateFileStates_Post:

Register-VaultEvent -EventName UpdateFileStates_Post -Action 'PostUpdateFileStates'

function PostUpdateFileStates($files, $successful) {
	#Write event code here
}