Here is a very basic iLogic rule that can be ran while you have a 'model' (part or assembly) document open & active on your screen. In included several other partial lines of code, and left them commented out, just so that you can see that there are View level (above the camera) tools available for similar tasks. In the lower portion of the code, I have the line of code for 'oTopColor' commented out, and have shortened the method's input options, because when you do not specify a color, it will basically use the current background color of your model screen, which is often just fine.
oDoc = ThisDoc.Document
oView = oDoc.Views.Item(1)
oView.Fit
'oView.RayTracing = True
'oView.RayTracingQuality = RayTracingQualityEnum.kLowRayTracingQuality
'oView.StartRenderingRateRecord
'oView.RayTracingProgress
'oView.IsRayTracingPaused
'oView.StopRenderingRateRecord
'oView.SaveAsBitmap()
'oView.SaveAsBitmapWithOptions()
'oView.SaveAsBitmapWithRayTracing
oImageFullFileName = "C:\Temp\ViewAsBitmap1.bmp"
oWidth = oView.Width
oHeight = oView.Height
'oTopColor = ThisApplication.TransientObjects.CreateColor(255, 255, 255)
oView.Camera.Fit
oView.Camera.SaveAsBitmap(oImageFullFileName, oWidth, oHeight)', oTopColor)
Wesley Crihfield

(Not an Autodesk Employee)