How to make Inventor visible while running a job
To make the Inventor instance visible, add the following line to your code after calling the Open-Document Cmdlet:
$openResult.Application.Instance.Visible = $true
Example:
This example shows how the Inventor instance can be set to visible in the standard PDF job that comes with powerJobs Processor:
#...
#Download the files
$downloadedFiles = Save-VaultFile -File $file._FullPath -DownloadDirectory $workingDirectory -ExcludeChildren:$fastOpen -ExcludeLibraryContents:$fastOpen
$file = $downloadedFiles | select -First 1
#Open the file
$openResult = Open-Document -LocalFile $file.LocalPath -Options @{ FastOpen = $fastOpen }
if($openResult) {
#Make the Inventor instance visible
$openResult.Application.Instance.Visible = $true
#...
}
See Also