Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Edit Default Render Image Output Sizes in Studio

1 REPLY 1
Reply
Message 1 of 2
Atlas_Inventor
445 Views, 1 Reply

Edit Default Render Image Output Sizes in Studio

I use Inventor Studio quite often and generally output at 1080 x 1920, I am wondering if there's a way to edit the default sizes to include this one?

1 REPLY 1
Message 2 of 2

As far as I know there is no way to set that default size in the UI, however this isn't really a customization question, as it doesn't involve using the API. You may have more luck asking this kind of questions in the general section of the forum. A product specialist might be able to answer you.

 

If you are interested in rendering an image through the API, below is a sample. You can control the size of the image using RenderManager properties:

 

Public Sub StudioRender()

    ' Find the Studio Add-In
    Dim oStudioAddin As ApplicationAddIn
    Set oStudioAddin = ThisApplication.ApplicationAddIns.ItemById("{F3D38928-74D1-4814-8C24-A74CE8F3B2E3}")
       
    If oStudioAddin Is Nothing Then
        MsgBox "Inventor Studio Addin not loaded."
        Exit Sub
    End If

    ' Get the Inventor Studio object.
    Dim oInventorStudio As InventorStudioLib.InventorStudio
    Set oInventorStudio = oStudioAddin.Automation

    ' Get the environment manager for the active document.
    Dim oEnvironmentMgr As EnvironmentManager
    Set oEnvironmentMgr = ThisApplication.ActiveDocument.EnvironmentManager

    ' Get the current environment.
    Dim oCurrentEnvironment As Environment
    Dim strEditID As String
    Call oEnvironmentMgr.GetCurrentEnvironment(oCurrentEnvironment, strEditID)

    ' Activate the Studio environment.
    Dim oStudioEnvironment As Environment
    Set oStudioEnvironment = oInventorStudio.activate

    ' Get a reference to the RenderManager
    Dim oRenderManager As InventorStudioLib.RenderManager
    Set oRenderManager = oInventorStudio.RenderManager

    ' Set the active lighting style.
    oInventorStudio.ActiveLightingStyle = oInventorStudio.StudioLightingStyles.item("Pleasant")

    ' Set the Camera.
    oRenderManager.camera = oInventorStudio.StudioCameras.item("MyCamera")

    ' Set the active Scene.
    oInventorStudio.ActiveSceneStyle = oInventorStudio.StudioSceneStyles.item("Starfield")

    ' Set the output resolution to the size of the current view.
    oRenderManager.ImageWidth = ThisApplication.ActiveView.width
    oRenderManager.ImageHeight = ThisApplication.ActiveView.height
    'oRenderManager.AntiAliasing
    
    ' Render the image.
    Call oRenderManager.RenderToFile("C:\Temp\Render.bmp")

    ' Reset the environment to whatever it was before
    ' we entered the Studio environment.
    Call oEnvironmentMgr.SetCurrentEnvironment(oCurrentEnvironment)
    
End Sub

 



Philippe Leefsma
Developer Technical Services
Autodesk Developer Network

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report