<?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: how to optimize performance while conversion of .ipt to step file using C# code? in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-optimize-performance-while-conversion-of-ipt-to-step-file/m-p/11190178#M138525</link>
    <description>&lt;P&gt;Did you try Task Scheduler?&lt;/P&gt;</description>
    <pubDate>Tue, 24 May 2022 17:25:11 GMT</pubDate>
    <dc:creator>Frederick_Law</dc:creator>
    <dc:date>2022-05-24T17:25:11Z</dc:date>
    <item>
      <title>how to optimize performance while conversion of .ipt to step file using C# code?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-optimize-performance-while-conversion-of-ipt-to-step-file/m-p/11189978#M138523</link>
      <description>&lt;P&gt;Hello Experts,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to convert .ipt file to stp file using translator addin of inventor.&lt;/P&gt;&lt;P&gt;there are 2L+ objects need to convert to stp file. but it's taking very longer time to process this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;my code is like below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Inventor.TranslatorAddIn STEPAddin = null;&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;Inventor.Document oDocument = null;&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;try&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;{&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;STEPAddin = InvApp.ApplicationAddIns.ItemById["{90AF7F40-0C01-11D5-8E83-0010B541CD80}"] as TranslatorAddIn;&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;if (!STEPAddin.Activated)&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;{&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;STEPAddin.Activate();&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;}&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;oDocument = InvApp.ActiveDocument;&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;// oDocument = InvApp.Documents.Open(completefileName, false);&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;oDocument = InvApp.Documents.OpenWithOptions(completefileName, openFileOptions, false);&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;Inventor.TranslationContext oContext = InvApp.TransientObjects.CreateTranslationContext();&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;oContext.Type = Inventor.IOMechanismEnum.kFileBrowseIOMechanism;&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;Inventor.NameValueMap oOptions = InvApp.TransientObjects.CreateNameValueMap();&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;Inventor.DataMedium oDataMedium = InvApp.TransientObjects.CreateDataMedium();&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;if (STEPAddin.HasSaveCopyAsOptions[oDocument, oContext, oOptions])&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;{&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;oOptions.set_Value("GeometryType", 1);&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;}&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;string NameDocument = oDocument.DisplayName;&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;NameDocument = NameDocument.Substring(0, NameDocument.Length - 4);&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;oDataMedium.FileName = outPutPath + "\\" + folder + "\\" + NameDocument + ".ipt.stp";&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;STEPAddin.SaveCopyAs(oDocument, oContext, oOptions, oDataMedium);&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;//sConsole.WriteLine("68 completed&amp;gt;&amp;gt;&amp;gt;");&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;string path = backupPath + "\\" + folder + "\\" + NameDocument + ".ipt.stp";&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;try&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;{&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;System.IO.File.Copy(oDataMedium.FileName, path, true);&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;}&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;catch (Exception ex)&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;{&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;Console.WriteLine(ex.GetBaseException());&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;}&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;partElement.SetAttributeValue("FilePath", completefileName);&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;partElement.WriteTo(writerOK);&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;strStpFilesPathInput += "\"" + oDataMedium.FileName + "\"" + "?";&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;}&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;catch (Exception ex)&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;{&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;partElement.SetAttributeValue("FilePath", completefileName);&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;partElement.WriteTo(writerKO);&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;//Console.WriteLine("220::xmlOK exception" + xmlOK.ToString());&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;}&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;finally&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;{&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;STEPAddin.Deactivate();&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;oDocument.Close();&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;}&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;}&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;with this logic only 100 objects I am able to convert per 2 to 3 mins &amp;amp; it also consuming too much memory.&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;any help on this will be very much appreciated.&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Thanks ,&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Umakant&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 May 2022 16:03:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-optimize-performance-while-conversion-of-ipt-to-step-file/m-p/11189978#M138523</guid>
      <dc:creator>umakant.sontakke</dc:creator>
      <dc:date>2022-05-24T16:03:38Z</dc:date>
    </item>
    <item>
      <title>Re: how to optimize performance while conversion of .ipt to step file using C# code?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-optimize-performance-while-conversion-of-ipt-to-step-file/m-p/11190169#M138524</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/12015516"&gt;@umakant.sontakke&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could try move the step-addin activation/deactivation only once per startup. Is there a reason to deactivate it everytime you translate?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It also depends on how big your parts are, where the step files are being created and saved etc (network/local).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could also debug your code and watch the task manager and see where the memory spike is.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Final note, if you are using inventor step translators, they should automatically do a demand load and activate when you save copy as step.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If nothing works, please share your addin code along with sample parts files and we can take a look.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;-shiva&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 May 2022 17:22:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-optimize-performance-while-conversion-of-ipt-to-step-file/m-p/11190169#M138524</guid>
      <dc:creator>sundars</dc:creator>
      <dc:date>2022-05-24T17:22:39Z</dc:date>
    </item>
    <item>
      <title>Re: how to optimize performance while conversion of .ipt to step file using C# code?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-optimize-performance-while-conversion-of-ipt-to-step-file/m-p/11190178#M138525</link>
      <description>&lt;P&gt;Did you try Task Scheduler?&lt;/P&gt;</description>
      <pubDate>Tue, 24 May 2022 17:25:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-optimize-performance-while-conversion-of-ipt-to-step-file/m-p/11190178#M138525</guid>
      <dc:creator>Frederick_Law</dc:creator>
      <dc:date>2022-05-24T17:25:11Z</dc:date>
    </item>
    <item>
      <title>Re: how to optimize performance while conversion of .ipt to step file using C# code?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-optimize-performance-while-conversion-of-ipt-to-step-file/m-p/11191178#M138526</link>
      <description>&lt;P&gt;Hi &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/2105322"&gt;@sundars&lt;/a&gt; ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your response.&lt;/P&gt;&lt;P&gt;As you suggested , I have activated &amp;amp; deactivated step addin only once.&lt;/P&gt;&lt;P&gt;But as no such improvement in performance.&lt;/P&gt;&lt;P&gt;So we are creating step file form network .&lt;/P&gt;&lt;P&gt;I have shared code &amp;amp; files .&lt;/P&gt;&lt;P&gt;please let us know your reply.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Umakant&lt;/P&gt;</description>
      <pubDate>Wed, 25 May 2022 04:46:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-optimize-performance-while-conversion-of-ipt-to-step-file/m-p/11191178#M138526</guid>
      <dc:creator>umakant.sontakke</dc:creator>
      <dc:date>2022-05-25T04:46:14Z</dc:date>
    </item>
    <item>
      <title>Re: how to optimize performance while conversion of .ipt to step file using C# code?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-optimize-performance-while-conversion-of-ipt-to-step-file/m-p/11195908#M138646</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/12015516"&gt;@umakant.sontakke&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am afraid, I cannot compile your sources without all the necessary libraries. Instead, what I would recommend is try to debug it yourself and see where its hanging?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. First, try to see if you can translate using a local machine and measure the speed&lt;/P&gt;
&lt;P&gt;2. If it works fine BUT translating it off a network is slow, then its most likely related to network issues&lt;/P&gt;
&lt;P&gt;3. If local machine translation is slow, then you would need to debug it line by line and see where its taking up time&lt;/P&gt;
&lt;P&gt;4. You could also try manually translating it using Inventor and see if that takes time.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The&amp;nbsp; sample part file you enclosed seems straightforward and exports to step very fast.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;-shiva&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 May 2022 20:05:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-optimize-performance-while-conversion-of-ipt-to-step-file/m-p/11195908#M138646</guid>
      <dc:creator>sundars</dc:creator>
      <dc:date>2022-05-26T20:05:53Z</dc:date>
    </item>
    <item>
      <title>Re: how to optimize performance while conversion of .ipt to step file using C# code?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-optimize-performance-while-conversion-of-ipt-to-step-file/m-p/11196745#M138653</link>
      <description>&lt;P&gt;Hi &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/2105322"&gt;@sundars&lt;/a&gt; ,&lt;/P&gt;&lt;P&gt;Thanks for your response.&lt;/P&gt;&lt;P&gt;As you said,&lt;/P&gt;&lt;P&gt;1)it's taking time when accessing file from network &amp;amp; saving it on network.&lt;/P&gt;&lt;P&gt;2)Also , this conversion is depend on file size.&lt;/P&gt;&lt;P&gt;3)we are creating CGR's also , so CGR creation is taking much time.&lt;/P&gt;&lt;P&gt;4)So , on local it's really taking very less time.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your time. much appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Umakant&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 May 2022 05:53:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-optimize-performance-while-conversion-of-ipt-to-step-file/m-p/11196745#M138653</guid>
      <dc:creator>umakant.sontakke</dc:creator>
      <dc:date>2022-05-27T05:53:28Z</dc:date>
    </item>
    <item>
      <title>Re: how to optimize performance while conversion of .ipt to step file using C# code?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-optimize-performance-while-conversion-of-ipt-to-step-file/m-p/11197944#M138684</link>
      <description>&lt;P&gt;Hi Umakant,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for the update! Glad that you nailed down the root cause. If possible you could translate locally and then copying the results back to the network server to speed up things.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;
&lt;P&gt;-shiva&lt;/P&gt;</description>
      <pubDate>Fri, 27 May 2022 15:24:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-optimize-performance-while-conversion-of-ipt-to-step-file/m-p/11197944#M138684</guid>
      <dc:creator>sundars</dc:creator>
      <dc:date>2022-05-27T15:24:24Z</dc:date>
    </item>
  </channel>
</rss>

