<?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: Rebuild function do not working with Inventor api. in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/rebuild-function-do-not-working-with-inventor-api/m-p/11578620#M30079</link>
    <description>&lt;P&gt;Can you post the code your using and&amp;nbsp; a screenshot of the change? Have you tried to go into the sketch? This might cause it to refresh.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 25 Nov 2022 21:32:42 GMT</pubDate>
    <dc:creator>A.Acheson</dc:creator>
    <dc:date>2022-11-25T21:32:42Z</dc:date>
    <item>
      <title>Rebuild function do not working with Inventor api.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/rebuild-function-do-not-working-with-inventor-api/m-p/11577516#M30078</link>
      <description>&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;Although I change the length parameter of the frame part, whose length I want to change in Incentor, it does not change its length. Rebuild function with Inventor api "document.Rebuil(); , activeDocument.Rebuild();" I'm trying with. The function doesn't give an error but neither works. How can I fix this situation?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 25 Nov 2022 10:13:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/rebuild-function-do-not-working-with-inventor-api/m-p/11577516#M30078</guid>
      <dc:creator>hayattangercekler2</dc:creator>
      <dc:date>2022-11-25T10:13:23Z</dc:date>
    </item>
    <item>
      <title>Re: Rebuild function do not working with Inventor api.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/rebuild-function-do-not-working-with-inventor-api/m-p/11578620#M30079</link>
      <description>&lt;P&gt;Can you post the code your using and&amp;nbsp; a screenshot of the change? Have you tried to go into the sketch? This might cause it to refresh.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Nov 2022 21:32:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/rebuild-function-do-not-working-with-inventor-api/m-p/11578620#M30079</guid>
      <dc:creator>A.Acheson</dc:creator>
      <dc:date>2022-11-25T21:32:42Z</dc:date>
    </item>
    <item>
      <title>Re: Rebuild function do not working with Inventor api.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/rebuild-function-do-not-working-with-inventor-api/m-p/11581364#M30080</link>
      <description>&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;I am trying to implement this code.&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;SPAN class=""&gt;&lt;SPAN class=""&gt;The reason I want to implement this is that although I changed the length parameter of the frame files, the change did not occur on the frame.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hayattangercekler2_2-1669611387587.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1144954iC3586ED10F49DEBD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="hayattangercekler2_2-1669611387587.png" alt="hayattangercekler2_2-1669611387587.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hayattangercekler2_1-1669611227501.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1144952iB7110B208E937154/image-size/medium?v=v2&amp;amp;px=400" role="button" title="hayattangercekler2_1-1669611227501.png" alt="hayattangercekler2_1-1669611227501.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;I get this error "The RPC server is unavailable."&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hayattangercekler2_0-1669611098967.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1144951iC3BA56397A7D56E2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="hayattangercekler2_0-1669611098967.png" alt="hayattangercekler2_0-1669611098967.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Nov 2022 04:56:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/rebuild-function-do-not-working-with-inventor-api/m-p/11581364#M30080</guid>
      <dc:creator>hayattangercekler2</dc:creator>
      <dc:date>2022-11-28T04:56:12Z</dc:date>
    </item>
    <item>
      <title>Re: Rebuild function do not working with Inventor api.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/rebuild-function-do-not-working-with-inventor-api/m-p/11581446#M30081</link>
      <description>&lt;P&gt;Are you changing the sketch parameter by code or manually? If by code can you provide the code and not just an image. It is hard for users to see issues when there is no way to reproduce the errors. Can you get the frame to update manually but not by code?&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have had situations in another addin tube and pipe whereby updating a sketch route resulted in no change in the adaptive geometry. In that case editing the sketch by code and rebuilding/updating was all that was needed.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Nov 2022 15:15:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/rebuild-function-do-not-working-with-inventor-api/m-p/11581446#M30081</guid>
      <dc:creator>A.Acheson</dc:creator>
      <dc:date>2022-11-29T15:15:10Z</dc:date>
    </item>
    <item>
      <title>Re: Rebuild function do not working with Inventor api.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/rebuild-function-do-not-working-with-inventor-api/m-p/11581533#M30082</link>
      <description>&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;I am replacing the parameter with code.&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;SPAN class=""&gt;&lt;SPAN class=""&gt;This is the code I'm using.&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;SPAN class=""&gt;&lt;SPAN class=""&gt;Although the parameter has changed and the line is relative to it, the profile does not extend relative to the line.&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;SPAN class=""&gt;&lt;SPAN class=""&gt;I need to do the update process with code.&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;SPAN class=""&gt;&lt;SPAN class=""&gt;If I do it manually, I can't achieve my goal.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;My parameter change code&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;   public void ChangeParam(Document doc, string paramName, string paramValue)
        {

           

            UserParameters userParams;

            if (doc.DocumentType == DocumentTypeEnum.kPartDocumentObject)
            {
                Console.WriteLine("Part Document");
                PartComponentDefinition partComponentDef = ((PartDocument)doc).ComponentDefinition;
                Parameters docParams = partComponentDef.Parameters;
                userParams = docParams.UserParameters;


            }
            else if (doc.DocumentType == DocumentTypeEnum.kAssemblyDocumentObject)
            {
                Console.WriteLine("Assembly Document");
                AssemblyComponentDefinition assemblyComponentDef = ((AssemblyDocument)doc).ComponentDefinition;
                Parameters docParams = assemblyComponentDef.Parameters;
                userParams = docParams.UserParameters;
            }
            else
            {
                Console.WriteLine("Unknown Document");
                // unsupported doc type, throw excepstion
                throw new Exception("Unsupported document type: " + doc.DocumentType.ToString());
            }
            try
            {

                Console.WriteLine($"Setting {paramName} to {paramValue}");
                UserParameter modelParam = userParams[paramName];
                modelParam.Expression = paramValue;
                doc.Update();

            }
            catch (Exception e)
            {
                Console.WriteLine("Cannot update '{0}' parameter. ({1})", paramName, e.Message);
            }

        }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Nov 2022 07:17:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/rebuild-function-do-not-working-with-inventor-api/m-p/11581533#M30082</guid>
      <dc:creator>hayattangercekler2</dc:creator>
      <dc:date>2022-11-28T07:17:11Z</dc:date>
    </item>
    <item>
      <title>Re: Rebuild function do not working with Inventor api.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/rebuild-function-do-not-working-with-inventor-api/m-p/11583398#M30083</link>
      <description>&lt;P&gt;Have you tried the update method instead of rebuild?&lt;/P&gt;
&lt;LI-CODE lang="visual-basic"&gt;' Summary:
'     Performs compute operations on all of the entities within this Document's scope
'     that may be out of date with respect to their driving entities.
ThisDoc.Document.Update()

' Summary:
'     Method that performs compute operations on all of the entities within this Document's
'     scope that may be out of date with respect to their driving entities.
' Parameters:
'   AcceptErrorsAndContinue:
'     Optional argument that specifies if errors should be ignored and the update completed
'     or if the update should be aborted if an error occurs. If the IgnoreErrors argument
'     is set to True, errors are skipped and the update process continues. If IgnoreErrors
'     is set to False, the method returns as soon as the first error is encountered.
ThisDoc.Document.Update2()&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Nov 2022 19:50:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/rebuild-function-do-not-working-with-inventor-api/m-p/11583398#M30083</guid>
      <dc:creator>JelteDeJong</dc:creator>
      <dc:date>2022-11-28T19:50:27Z</dc:date>
    </item>
    <item>
      <title>Re: Rebuild function do not working with Inventor api.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/rebuild-function-do-not-working-with-inventor-api/m-p/11584609#M30084</link>
      <description>Although the parameter of my profile, which I created with the frame with the inventor api, has changed, there is no change in the profile. I also tried the true versions of the update and rebuild commands, but it didn't work.</description>
      <pubDate>Tue, 29 Nov 2022 08:56:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/rebuild-function-do-not-working-with-inventor-api/m-p/11584609#M30084</guid>
      <dc:creator>hayattangercekler2</dc:creator>
      <dc:date>2022-11-29T08:56:02Z</dc:date>
    </item>
    <item>
      <title>Re: Rebuild function do not working with Inventor api.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/rebuild-function-do-not-working-with-inventor-api/m-p/11585269#M30085</link>
      <description>&lt;P&gt;&amp;gt;&amp;gt;&amp;nbsp;&lt;SPAN&gt;Are you changing the&lt;STRONG&gt; sketch parameter&lt;/STRONG&gt; by code or manually?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;gt;&amp;nbsp;I am replacing the parameter with code.&lt;BR /&gt;I suppose you're changing the frame member parameter, what &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7946284"&gt;@A.Acheson&lt;/a&gt;&amp;nbsp;was assuming is that you're changing the sketch parameter; that's how the frame generator works.&lt;BR /&gt;&lt;BR /&gt;Let me add a thing.&lt;BR /&gt;Looking at your posts in the past few weeks what you're trying to achieve is very tricky and diffucult to maintain at least!&amp;nbsp;&lt;BR /&gt;What you're trying to do is to edit a frame generator without proper API, because frame generator API does not exist (vote this &lt;A href="https://forums.autodesk.com/t5/inventor-ideas/api-for-frame-generator/idi-p/8265215" target="_blank" rel="noopener"&gt;Idea&lt;/A&gt;.)&lt;BR /&gt;I suggest you - again - to deeply understand how frame generator works, if it's possible find a solution to your problem doable via UI, then try to implement the same workflow via API. Very few things can be done via API and not via UI. (EDIT: via API you can leverage the events triggering for example)&lt;BR /&gt;And if you find a possible solution try to post it in the &lt;A href="https://forums.autodesk.com/t5/inventor-forum/bd-p/78" target="_blank" rel="noopener"&gt;Inventor Forum&lt;/A&gt; to know if it's the right approach to your frame generator problem.&amp;nbsp;&lt;BR /&gt;And maybe using the frame generator there's no solution at all and you have to change completely the approach to your problem.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Nov 2022 13:58:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/rebuild-function-do-not-working-with-inventor-api/m-p/11585269#M30085</guid>
      <dc:creator>CattabianiI</dc:creator>
      <dc:date>2022-11-29T13:58:03Z</dc:date>
    </item>
    <item>
      <title>Re: Rebuild function do not working with Inventor api.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/rebuild-function-do-not-working-with-inventor-api/m-p/11585309#M30086</link>
      <description>Yes you are right, thank you for your suggestion. I'm not normally a cad programmer, but I'm trying to solve problems somehow.&lt;BR /&gt;&lt;BR /&gt;In my problem on this issue, the "rebuild" function does not work both manually and with code. I tried to run it with a trigger in a rule, but the function is completely ineffective during my operations. When I turn it back on afterward, it becomes operational when the inventor is open with all its features. I can't figure out why this function doesn't work with both c# and vb ilogic. What is the reason of this ?</description>
      <pubDate>Tue, 29 Nov 2022 14:06:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/rebuild-function-do-not-working-with-inventor-api/m-p/11585309#M30086</guid>
      <dc:creator>hayattangercekler2</dc:creator>
      <dc:date>2022-11-29T14:06:58Z</dc:date>
    </item>
    <item>
      <title>Re: Rebuild function do not working with Inventor api.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/rebuild-function-do-not-working-with-inventor-api/m-p/11597424#M30087</link>
      <description>&lt;P&gt;In fact, my problem here was that the object created with the frame did not take shape in the desired size, although the parameter was changed. As a result of using an "application.Ready" feature, which I skipped using for this, by controlling it with a while loop, the frame size is shaped according to the desired parameter, even without the need for the "rebuild all" feature. This is my sample code block.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;while (!_application.Ready)&lt;BR /&gt;{&lt;BR /&gt;Console.WriteLine(_application.Ready);&lt;BR /&gt;Thread.Sleep(200);&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Mon, 05 Dec 2022 07:46:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/rebuild-function-do-not-working-with-inventor-api/m-p/11597424#M30087</guid>
      <dc:creator>hayattangercekler2</dc:creator>
      <dc:date>2022-12-05T07:46:20Z</dc:date>
    </item>
  </channel>
</rss>

