Description
Per default Inventor will use a flat side of the model to make pictures. For some models though an isometric view is more desirable.
To achieve that, the Inventor camera must be manipulated before the image is exported.
To demonstrate this we will modify the job "Sample.CreatePNG.ps1". We want to transform it from this:
To this:
Explanation
try/catch: If the Inventor API produces an error in the try block, the code in the catch block will be executed. This ensures that the document will be closed properly if any error happens that is beyond our control.
Code in the try block: This gets the current camera and sets it to top right isometric view. Perspective is set to false, otherwise the image will be warped. Fit ensures the model is centered and fully visible. The Apply function makes the changes effective. The ViewOrientationType lets you choose the desired orientation of the camera
Possible values for the orientation are:
FileClassifiication: This is optional. Setting it to None causes the images to have proper versioning in Vault, though it will also require the source document to create a new version when you attach the image file to it. Leaving it on DesignVisualization causes it to be detached from the model file during certain Vault actions, but doesn't require the parent document to be checked out in order to attach it
See also
* Working with cameras(Mod the machine)