Getting started

Automatic creation of visualization files on Lifecycle State Change to Released

powerEvents is installed with sample events which allow to react to different actions in Vault with custom code.
The Sample.SubmitPublishingJobsOnRelease was created to react to lifecycle state changes in Vault.

../_images/powerevents_ise.png

To activate it, all you have to do is to enable the sample script which will trigger publishing jobs when certain Inventor or AutoCAD files are released in Vault.
Afterwards the Sample.CreatePDF and Sample.CreateDXF&STEPfromSheetmetal jobs will be queued for them automatically.
The event script is highly customizable and can be used as a template for easily creating a custom script which fits your needs!

Requirements

powerJobs Processor must be installed on a Job Processor environment and must be running in order to process the queued publishing jobs.

Start the Powershell environment

In order to get started either open any Powershell IDE or open the powerEvents ISE shortcut in the start menu, which already opens the event script Sample.SubmitPublishingJobsOnRelease.ps1 for you.

Open event script as Administrator

On some systems the directory “C:\ProgramData\” is write protected so you need to start your editor as Admin, by right clicking Windows PowerShell ISE in the start menu and clicking “Run as administrator”.
Afterwards select “File” -> “Open…” (or press {CTRL}+O) and open the file “C:\ProgramData\coolOrange\powerEvents\Events\Sample.SubmitPublishingJobsOnRelease.ps1”.

Activate publishing job

In order to enable the event script Sample.SubmitPublishingJobsOnRelease change line 10 from

10
#Register-VaultEvent -EventName UpdateFileStates_Post -Action 'SubmitPublishJobs'

To

10
Register-VaultEvent -EventName UpdateFileStates_Post -Action 'SubmitPublishJobs'

After un-commenting the Register-VaultEvent call you need to save the changes in the powerShell script by selecting “File” -> “Save” (or press {CTRL}+S).

Release a Vault File

Activate job queue

In order to follow this getting started guide, the Job Queue in your Vault needs to be enabled.

Start your Vault Client and navigate to a Inventor- or AutoCAD drawing to publish a PDF file, or to a Sheet Metal part to publish a DXF and STEP file and change its state to “Released”.
In this example we have selected the “SubmitPdfJobOnRelease.idw ” drawing.

../_images/vault-release-idw.png

Result

In your job queue there should be a new job of the type “Sample.CreatePDF”. If you open the job queue now, you will see your job in here.
You can find the job queue in the menue at Tools → Job Queue.

../_images/sample.SubmitPublishingJobsOnRelease_jobqueue.png