Here is another suggestion for Inventor Engineer-To-Order. In some cases using Inventor Studio from Intent (IvStudioRenderedImage) to create an image is not working correctly. A solution is to use the Inventor API. Here is a method that shows how this can be done using SaveAsBitmap() of the active view.
Method createReportImage(outputFile As String) As String
Dim view = %%inventorApplication.ActiveView
Dim hasGnomon As Boolean = _
%%inventorApplication.DisplayOptions.Show3DIndicator
Dim displayMode = view.DisplayMode
Dim hasGroundShadow As Boolean = _
view.ShowGroundShadows
Dim hasAmbientShadow As Boolean = _
view.ShowAmbientShadows
Dim hasObjectShadows As Boolean = _
view.ShowObjectShadows
Dim hasShowGroundReflections As Boolean = _
view.ShowGroundReflections
'
%%inventorApplication.DisplayOptions. _
Show3DIndicator = False
view.ShowGroundReflections = True
view.ShowGroundShadows = True
view.ShowAmbientShadows = True
view.ShowObjectShadows = True
view.DisplayMode = _
Inventor.DisplayModeEnum.kRealisticRendering
view.RayTracingQuality= _
Inventor.RayTracingQualityEnum. _
kInteractiveRayTracingQuality
Try
view.SaveAsBitmap(outputFile, 1200, 800)
Finally
%%inventorApplication.DisplayOptions. _
Show3DIndicator = hasGnomon
view.DisplayMode = displayMode
view.ShowGroundShadows = hasGroundShadow
view.ShowAmbientShadows = hasAmbientShadow
view.ShowObjectShadows = hasObjectShadows
view.ShowGroundReflections = hasShowGroundReflections
End Try
Return outputFile
End Method
-Wayne


Subscribe