<?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 migrate an assembly with substitute model state in Inventor 2022? in Inventor Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-forum/how-to-migrate-an-assembly-with-substitute-model-state-in/m-p/10722211#M92997</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3474788"&gt;@CattabianiI&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ComponentOccurrence.Definition.Document is member document whose ActiveModelState is not certainly the one consumed in assembly. Would you please try whether the following code meets your need?&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oSS&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;SelectSet&lt;/SPAN&gt;
&lt;SPAN&gt;oSS&lt;/SPAN&gt; = &lt;SPAN&gt;ThisApplication&lt;/SPAN&gt;.&lt;SPAN&gt;ActiveDocument&lt;/SPAN&gt;.&lt;SPAN&gt;SelectSet&lt;/SPAN&gt;

&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;occ&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;ComponentOccurrence&lt;/SPAN&gt; = &lt;SPAN&gt;oSS&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(1)
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;doc&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Document&lt;/SPAN&gt; = &lt;SPAN&gt;occ&lt;/SPAN&gt;.&lt;SPAN&gt;Definition&lt;/SPAN&gt;.&lt;SPAN&gt;Document&lt;/SPAN&gt;

&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;isSubstitute&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Boolean&lt;/SPAN&gt; = &lt;SPAN&gt;doc&lt;/SPAN&gt;.&lt;SPAN&gt;ComponentDefinition&lt;/SPAN&gt;.&lt;SPAN&gt;ModelStates&lt;/SPAN&gt;.&lt;SPAN&gt;item&lt;/SPAN&gt;(&lt;SPAN&gt;occ&lt;/SPAN&gt;.&lt;SPAN&gt;ActiveModelState&lt;/SPAN&gt;).&lt;SPAN&gt;ModelStateType&lt;/SPAN&gt; = &lt;SPAN&gt;ModelStateTypeEnum&lt;/SPAN&gt;.&lt;SPAN&gt;kSubstituteModelStateType&lt;/SPAN&gt;
&lt;SPAN&gt;MsgBox&lt;/SPAN&gt;(&lt;SPAN&gt;"isSubstitute: "&lt;/SPAN&gt; &amp;amp; &lt;SPAN&gt;isSubstitute&lt;/SPAN&gt;)&lt;/PRE&gt;</description>
    <pubDate>Fri, 29 Oct 2021 06:57:34 GMT</pubDate>
    <dc:creator>JaneFan</dc:creator>
    <dc:date>2021-10-29T06:57:34Z</dc:date>
    <item>
      <title>How to migrate an assembly with substitute model state in Inventor 2022?</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/how-to-migrate-an-assembly-with-substitute-model-state-in/m-p/10717876#M92992</link>
      <description>&lt;P&gt;Is there a guideline or something? Because I'm finding strange behaviour* if I migrate the file with substitute model state active.&lt;BR /&gt;&lt;BR /&gt;*I'll show you the strange behaviour in a few hours when I easily reproduce the issue&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Oct 2021 16:13:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/how-to-migrate-an-assembly-with-substitute-model-state-in/m-p/10717876#M92992</guid>
      <dc:creator>CattabianiI</dc:creator>
      <dc:date>2021-10-27T16:13:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to migrate an assembly with substitute model state in Inventor 2022?</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/how-to-migrate-an-assembly-with-substitute-model-state-in/m-p/10718297#M92993</link>
      <description>&lt;P&gt;Hi! Please share an example that exhibits the behavior here or with me directly &lt;A href="mailto:johnson.shiue@autodesk.com" target="_blank"&gt;johnson.shiue@autodesk.com&lt;/A&gt;. I would like to understand the strange behavior better.&lt;/P&gt;
&lt;P&gt;Many thanks!&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Oct 2021 19:17:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/how-to-migrate-an-assembly-with-substitute-model-state-in/m-p/10718297#M92993</guid>
      <dc:creator>johnsonshiue</dc:creator>
      <dc:date>2021-10-27T19:17:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to migrate an assembly with substitute model state in Inventor 2022?</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/how-to-migrate-an-assembly-with-substitute-model-state-in/m-p/10719434#M92994</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/486618"&gt;@johnsonshiue&lt;/a&gt;,&lt;BR /&gt;here's the screencast with the steps to reproduce the issue, the video starts after decompressing the attached pack&amp;amp;go and project activation:&amp;nbsp;&lt;A href="https://autode.sk/3EpcMQo" target="_blank" rel="noopener"&gt;https://autode.sk/3EpcMQo&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;I know it's quite subtle the way I recognise the issue (asking for&amp;nbsp;Document.ComponentDefinition.ModelStates.ActiveModelState.ModelStateType) but this API is important to me.&lt;BR /&gt;I posted here because the migration behaviour is beyond the API usage and because just saving again in master model state fix the problem as you can see in the video.&lt;BR /&gt;Just to be clear I have the 2022.2 RC.&lt;BR /&gt;&lt;BR /&gt;Let me launch into an analysis of a possible cause you can totally ignore: it's like it was a factory document with substitute model state active, but the factory document does not exist if the document has just substitute model states; or in other words: it's like some section of the file are filled with substitute document data because that's the only document which is migrated until I migrate the master model state document.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Oct 2021 08:02:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/how-to-migrate-an-assembly-with-substitute-model-state-in/m-p/10719434#M92994</guid>
      <dc:creator>CattabianiI</dc:creator>
      <dc:date>2021-10-28T08:02:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to migrate an assembly with substitute model state in Inventor 2022?</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/how-to-migrate-an-assembly-with-substitute-model-state-in/m-p/10721977#M92995</link>
      <description>&lt;P&gt;Hi! This does look like a bug. I personally think the substitute status should be shown correctly in the iLogic rule. I will need to work with the project team to understand it better.&lt;/P&gt;
&lt;P&gt;Many thanks!&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Oct 2021 03:21:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/how-to-migrate-an-assembly-with-substitute-model-state-in/m-p/10721977#M92995</guid>
      <dc:creator>johnsonshiue</dc:creator>
      <dc:date>2021-10-29T03:21:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to migrate an assembly with substitute model state in Inventor 2022?</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/how-to-migrate-an-assembly-with-substitute-model-state-in/m-p/10722205#M92996</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/486618"&gt;@johnsonshiue&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;if you'll have an INVGEN, please post it here&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Oct 2021 06:55:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/how-to-migrate-an-assembly-with-substitute-model-state-in/m-p/10722205#M92996</guid>
      <dc:creator>CattabianiI</dc:creator>
      <dc:date>2021-10-29T06:55:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to migrate an assembly with substitute model state in Inventor 2022?</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/how-to-migrate-an-assembly-with-substitute-model-state-in/m-p/10722211#M92997</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3474788"&gt;@CattabianiI&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ComponentOccurrence.Definition.Document is member document whose ActiveModelState is not certainly the one consumed in assembly. Would you please try whether the following code meets your need?&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oSS&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;SelectSet&lt;/SPAN&gt;
&lt;SPAN&gt;oSS&lt;/SPAN&gt; = &lt;SPAN&gt;ThisApplication&lt;/SPAN&gt;.&lt;SPAN&gt;ActiveDocument&lt;/SPAN&gt;.&lt;SPAN&gt;SelectSet&lt;/SPAN&gt;

&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;occ&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;ComponentOccurrence&lt;/SPAN&gt; = &lt;SPAN&gt;oSS&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(1)
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;doc&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Document&lt;/SPAN&gt; = &lt;SPAN&gt;occ&lt;/SPAN&gt;.&lt;SPAN&gt;Definition&lt;/SPAN&gt;.&lt;SPAN&gt;Document&lt;/SPAN&gt;

&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;isSubstitute&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Boolean&lt;/SPAN&gt; = &lt;SPAN&gt;doc&lt;/SPAN&gt;.&lt;SPAN&gt;ComponentDefinition&lt;/SPAN&gt;.&lt;SPAN&gt;ModelStates&lt;/SPAN&gt;.&lt;SPAN&gt;item&lt;/SPAN&gt;(&lt;SPAN&gt;occ&lt;/SPAN&gt;.&lt;SPAN&gt;ActiveModelState&lt;/SPAN&gt;).&lt;SPAN&gt;ModelStateType&lt;/SPAN&gt; = &lt;SPAN&gt;ModelStateTypeEnum&lt;/SPAN&gt;.&lt;SPAN&gt;kSubstituteModelStateType&lt;/SPAN&gt;
&lt;SPAN&gt;MsgBox&lt;/SPAN&gt;(&lt;SPAN&gt;"isSubstitute: "&lt;/SPAN&gt; &amp;amp; &lt;SPAN&gt;isSubstitute&lt;/SPAN&gt;)&lt;/PRE&gt;</description>
      <pubDate>Fri, 29 Oct 2021 06:57:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/how-to-migrate-an-assembly-with-substitute-model-state-in/m-p/10722211#M92997</guid>
      <dc:creator>JaneFan</dc:creator>
      <dc:date>2021-10-29T06:57:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to migrate an assembly with substitute model state in Inventor 2022?</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/how-to-migrate-an-assembly-with-substitute-model-state-in/m-p/10723598#M92998</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/538492"&gt;@JaneFan&lt;/a&gt;&amp;nbsp;thank you.&lt;BR /&gt;I don't really have needs but deeply understand model states and substitute in Inv2022.&lt;BR /&gt;That code clearly works well, and I can confirm there's no migration issue depending on which model state is active when you're migrating the file.&lt;BR /&gt;&lt;BR /&gt;So what is the purpose of ModelStates.ActiveModelState? It's not the ModelState in which the factory is active because here the factory does not even exist.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Oct 2021 17:30:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/how-to-migrate-an-assembly-with-substitute-model-state-in/m-p/10723598#M92998</guid>
      <dc:creator>CattabianiI</dc:creator>
      <dc:date>2021-10-29T17:30:54Z</dc:date>
    </item>
  </channel>
</rss>

