<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Inventor Studio vba rendering in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/inventor-studio-vba-rendering/m-p/9136526#M102950</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/269445" target="_self"&gt;&lt;SPAN class=""&gt;jorgesmd,&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;have you solved your issue already?&lt;/P&gt;&lt;P&gt;i got stuck in a similar case:&lt;/P&gt;&lt;P&gt;I found the Addin in Item(29), but when the Item(29).Automation is empty and therefore i can not get the Inventor Studio Object. Does anybody know how i can fix it?&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Fri, 08 Nov 2019 21:55:40 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-11-08T21:55:40Z</dc:date>
    <item>
      <title>Inventor Studio vba rendering</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/inventor-studio-vba-rendering/m-p/7729313#M79620</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've got 25 cameras set-up and I would like to render each one for 3 hours.&lt;/P&gt;&lt;P&gt;I want to create a vba code to run all in batch mode.&lt;/P&gt;&lt;P&gt;The code is almost done (thanks internet &lt;img class="lia-deferred-image lia-image-emoji" src="https://forums.autodesk.com/html/@B4D44A73814D7FC0D950DEDFACB97081/emoticons/1f642.png" alt=":slightly_smiling_face:" title=":slightly_smiling_face:" /&gt; but I'm stuck in last step with is lanching the render and save it in a folder as .jpg file.&lt;/P&gt;&lt;P&gt;I read someone who used ..... oRenderManager.rendertofile "C:\temp\render1.jpg" ... but it doesn't work with me (don't know why) I'm getting run-time error 13.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anybody know how to lanch a camera based render and save it as *.jpg file in a folder?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Jorge&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ps: please see below the code so far...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;##############################################&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sub StudioRender()&lt;/P&gt;&lt;P&gt;' Find the Studio Add-In&lt;BR /&gt;Dim oStudioAddin As ApplicationAddIn&lt;BR /&gt;Set oStudioAddin = ThisApplication.ApplicationAddIns.Item(29)&lt;BR /&gt;&lt;BR /&gt;If oStudioAddin Is Nothing Then&lt;BR /&gt;MsgBox "Inventor Studio Addin not loaded."&lt;BR /&gt;Exit Sub&lt;BR /&gt;End If&lt;/P&gt;&lt;P&gt;' Get the Inventor Studio object.&lt;BR /&gt;' Dim oInventorStudio As InventorStudioLib.InventorStudio&lt;BR /&gt;Set oInventorStudio = oStudioAddin.Automation&lt;BR /&gt;'Dim xxx As ApplicationAddIn&lt;BR /&gt;&lt;BR /&gt;' Get the environment manager for the active document.&lt;BR /&gt;Dim oEnvironmentMgr As EnvironmentManager&lt;BR /&gt;Set oEnvironmentMgr = ThisApplication.ActiveDocument.EnvironmentManager&lt;/P&gt;&lt;P&gt;' Get the current environment.&lt;BR /&gt;Dim oCurrentEnvironment As Environment&lt;BR /&gt;Dim strEditID As String&lt;BR /&gt;Call oEnvironmentMgr.GetCurrentEnvironment(oCurrentEnvironment, strEditID)&lt;/P&gt;&lt;P&gt;' Activate the Studio environment.&lt;BR /&gt;Dim oStudioEnvironment As Environment&lt;BR /&gt;Set oStudioEnvironment = oInventorStudio.Activate&lt;/P&gt;&lt;P&gt;' Get a reference to the RenderManager&lt;BR /&gt;' Dim oRenderManager As InventorStudioLib.RenderManager&lt;BR /&gt;Set oRenderManager = oInventorStudio.RenderManager&lt;/P&gt;&lt;P&gt;' Set the active lighting style.&lt;BR /&gt;'oInventorStudio.ActiveLightingStyle = oInventorStudio.StudioLightingStyles.Item("Grid Light")&lt;/P&gt;&lt;P&gt;X = 1&lt;BR /&gt;Do Until X &amp;gt; oInventorStudio.StudioCameras.Count&lt;/P&gt;&lt;P&gt;'activate lights per room&lt;/P&gt;&lt;P&gt;'code here&lt;/P&gt;&lt;P&gt;' Set the Camera.&lt;BR /&gt;oRenderManager.camera = oInventorStudio.StudioCameras.Item(X)&lt;/P&gt;&lt;P&gt;' Set the active Scene.&lt;BR /&gt;'oInventorStudio.ActiveSceneStyle = oInventorStudio.StudioSceneStyles.Item("Starfield")&lt;/P&gt;&lt;P&gt;' Set the output resolution to the size of the current view.&lt;BR /&gt;oRenderManager.ImageWidth = ThisApplication.ActiveView.Width&lt;BR /&gt;oRenderManager.ImageHeight = ThisApplication.ActiveView.Height&lt;BR /&gt;'oRenderManager.AntiAliasing&lt;BR /&gt;&lt;BR /&gt;' Render the image.&lt;/P&gt;&lt;P&gt;oRenderManager.rendertofile "C:\temp\render1.jpg" ' &amp;gt;&amp;gt;&amp;gt; this is where I get the error&lt;/P&gt;&lt;P&gt;X = X + 1&lt;BR /&gt;Loop&lt;/P&gt;&lt;P&gt;' Reset the environment to whatever it was before&lt;BR /&gt;' we entered the Studio environment.&lt;BR /&gt;Call oEnvironmentMgr.SetCurrentEnvironment(oCurrentEnvironment)&lt;BR /&gt;&lt;BR /&gt;End Sub&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#############################&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 27 Jan 2018 22:04:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/inventor-studio-vba-rendering/m-p/7729313#M79620</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-01-27T22:04:54Z</dc:date>
    </item>
    <item>
      <title>Re: Inventor Studio vba rendering</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/inventor-studio-vba-rendering/m-p/7764787#M80124</link>
      <description>&lt;P&gt;Can you try the code if you un-comment the line below:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;' Dim oRenderManager As InventorStudioLib.RenderManager&lt;/PRE&gt;</description>
      <pubDate>Fri, 09 Feb 2018 09:26:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/inventor-studio-vba-rendering/m-p/7764787#M80124</guid>
      <dc:creator>YuhanZhang</dc:creator>
      <dc:date>2018-02-09T09:26:53Z</dc:date>
    </item>
    <item>
      <title>Re: Inventor Studio vba rendering</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/inventor-studio-vba-rendering/m-p/9136526#M102950</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/269445" target="_self"&gt;&lt;SPAN class=""&gt;jorgesmd,&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;have you solved your issue already?&lt;/P&gt;&lt;P&gt;i got stuck in a similar case:&lt;/P&gt;&lt;P&gt;I found the Addin in Item(29), but when the Item(29).Automation is empty and therefore i can not get the Inventor Studio Object. Does anybody know how i can fix it?&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 08 Nov 2019 21:55:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/inventor-studio-vba-rendering/m-p/9136526#M102950</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-11-08T21:55:40Z</dc:date>
    </item>
  </channel>
</rss>

