How to export a DWF or DWFX file with powerJobs Processor

With powerJobs Processor it is possible to export DWF or DWFx files for following file formats: IAM, IPT, IDW, DWG, IPN.

Depending on the source file different config files can be used to customize the DWF/DWFx:

2D Inventor files

For 2D files (IDW, DWG) you can use the PDF_2D.ini file that is delivered with powerJobs Processor as config file. The file is located at "C:\ProgramData\coolOrange\powerJobs\Modules\Export":

$configFile = "$($env:POWERJOBS_MODULESDIR)Export\PDF_2D.ini"
In the Export-Document cmdlet the argument -Format 'DWF' or 'DWFX' needs to be passed:
$exportResult = Export-Document -Format 'DWFX' -To $localDWFXfileLocation -Options $configFile

3D Inventor files

For 3D files (IAM, IPT, IPN) use the INI file DWF_3D.ini from the powerJobs Processor wiki. Copy the file to the powerJobs Processor Export folder "C:\ProgramData\coolOrange\powerJobs\Modules\Export" and add the following to your job:

$configFile = "$($env:POWERJOBS_MODULESDIR)Export\DWF_3D.ini"
In the Export-Document the argument -Format 'DWF' or 'DWFX' needs to be passed same as for 2D Inventor files. 

Optionally you can also use the attached module: FileOnExportToDwf.psm1 to further customize the export for the different Views by passing the scriptblock to the -OnExport argument. 

To do this copy the module in the powerJobs Processor modules directory "C:\ProgramData\coolOrange\powerJobs\Modules" and use following code in your job:

$exportResult = Export-Document -Format 'DWF' -To $localDWFfileLocation -Options $configFile -OnExport $DWF3DOnExport

TrueView

For AutoCAD DWGs you can use the PDF.dwg file that is delivered with powerJobs Processor as config file. 

The file is located at "C:\ProgramData\coolOrange\powerJobs\Modules\Export". When added, the page setup of the PDF.dwg will be used. If no config file is specified the page setup of the AutoCAD dwg itself is used.

$configFile = "$($env:POWERJOBS_MODULESDIR)Export\PDF.dwg"
Same as for Inventor files the Export-Document cmdlet needs to have the -Format 'DWF' or 'DWFX' argument passed:
$exportResult = Export-Document -Format 'DWFX' -To $localDWFXfileLocation -Options $configFile

See Also