Applications

In a powerJobs Processor context, entities that support a specific set of operations e.g. opening or exporting a file, are referred to as Applications.
These Applications are used by the powerJobs Processor Cmdlets to perform their actions on documents.

Available Applications can be accessed in the $Host.Applications variable in a Job Environment.
The product also provides an option to extend or implement new and existing Applications.

Supported Applications

The following Applications can be used in Jobs out of the box:

Application

Note

../../_images/inventor.png Inventor

Autodesk Inventor supports opening, manipulating and converting 3D mechanical designs, 2D drawings (Inventor and AutoCAD) as well as presentation files.
A software license is required and a Single-User or Multi-User License must be activated on the Job Processor in order to prevent license issues

../../_images/inventorserver.png InventorServer

Inventor Server is a headless version of Autodesk Inventor and is noticeably faster in starting and processing jobs, but there are no GUI features available.
No additional license must be purchased for the Job Processor environment and no full Inventor installation is required.

../../_images/dwg_trueview.png DWG TrueView

DWG TrueView is a file viewer for 2D drawings (AutoCAD and Inventor), which in contrast to AutoCAD, only supports conversions to PDF and DWF formats.
No additional license is required and no full version of AutoCAD must be installed.
AutoCAD is currently not supported.

More details on the supported conversions for each application can be found on the File Conversion page.

Registration

These default applications are registered in the coolOrange.Applications.psm1 module with the following lines:

18
19
20
Register-Application ([powerJobs.Application.Inventor.Application])
Register-Application ([powerJobs.Application.Inventor.Server.Application])
Register-Application ([powerJobs.Application.TrueView.Application])

Their registration order may affect which application is used from the Open-Document cmdlet to open files, if it is called without -Application parameter.

The Register-Application function expects an application’s Type to be passed and registers this application globally via its Name.
Since the passed Type must implement the IApplication interface, this function can also be used to register custom applications.

Custom Applications

Custom applications can be used to extend the export capabilities, for instance when opening or exporting files with special extensions is required.

To implement the exposed .NET interfaces you first need to install powerJobs Processor on your development machine.
Afterwards the implemented application must be registered and can therefore be used by all document related cmdlets.
The .Net library requires your project to target .NET Framework 4.7 !

IApplication Interface

The API for Applications is designed around the IApplication interface and also includes types like IDocument, IExport, ect. and is designed as follows:

../../_images/application_uml.png

Visual Studio Project setup for Custom Applications

Visual Studio Template

The Visual Studio Template creates a basic project similar to following the steps above.

Visual Studio 2012
Download: C# Template

Installation:
Copy the zip file to your VisualStudio Templates directory %userprofile%\Documents\Visual Studio 2012\Templates\ProjectTemplates\coolOrange.

Start VisualStudio and create a new project by using the project template powerJobs Processor Application and give your application a meaningful name (without characters like spaces or dots).

../../_images/vs_application_template.png

The assembly which contains your application and the according registration module will be deployed to the Modules directory, with the name of your project.
It is already configured to automatically launch the PowerShell Console and import the powerJobs module when pressing F5.