<?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: Section Participation in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/section-participation/m-p/7101953#M128312</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I was trying to apply this solution to a section view that was being placed on an Inventor Drawing using the API. The parts in the model are coming from the content center but need to be sectioned. It seems this method might be the only way to allow them to section, however when I call the command:&amp;nbsp;&lt;U&gt;&lt;EM&gt;_inventorApplication&lt;/EM&gt;&lt;/U&gt;&lt;EM&gt;&lt;U&gt;&lt;U&gt;.&lt;/U&gt;CommandManager.ControlDefinitions[“AllowSectionParticipation”].Ex&lt;WBR /&gt;ecute()&lt;/U&gt;&lt;/EM&gt; nothing appears to happen.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Stepping through the add-in, the application calls the command without issue or throwing any exceptions. After the program completes, the correct node is expanded and selected (highlighted), but the component remains 'un'-sectioned. I can right click the node that is selected and select 'Section' under participation and the section works then.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The only thing I can think is maybe the application isn't 'Ready' and that the views are not fully calculated, but nothing I try seems to change anything.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any thoughts on how i could get this to work would be most appreciated?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Additional information:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;I've also tried &lt;EM&gt;&lt;U&gt;.Ex&lt;WBR /&gt;ecute2(true)&lt;/U&gt;&lt;/EM&gt;&lt;/LI&gt;
&lt;LI&gt;This is in a full custom add-in we are creating that builds the assembly from content center and creates a drawing of that assembly so I don't have any small sample code, but I could provide the entirety of the logic surrounding this operation (though its entirely based on the information linked)&lt;/LI&gt;
&lt;LI&gt;I am setting the section behavior prior to navigating the browser and performing the execute operation&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;_sectionView.StandardPartsSectionBehavior = StandardPartsSectionBehaviorEnum.kObeyBrowserSettingsSectionStandardParts;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;I am only changing&amp;nbsp;&lt;U&gt;&lt;EM&gt;_inventorApplication.SilentOperation = true;&lt;/EM&gt;&lt;/U&gt;&amp;nbsp;no other inventor behavior modifications (screen updating, userinteraction, etc)&lt;/LI&gt;
&lt;LI&gt;I've tried running &lt;EM&gt;&lt;U&gt;AssemblyDrawingDocument.Update2(true);&lt;/U&gt;&lt;/EM&gt; before calling the execute command.&lt;/LI&gt;
&lt;LI&gt;I'm running this from Visual Studio in C#. I just noticed that I am using the&amp;nbsp;&lt;EM&gt;&lt;U&gt;ControlDefinitions[“..."]&lt;/U&gt;&lt;/EM&gt;&amp;nbsp;syntax, which may not work in this application&lt;/LI&gt;
&lt;/UL&gt;</description>
    <pubDate>Tue, 23 May 2017 14:05:12 GMT</pubDate>
    <dc:creator>NSBowser</dc:creator>
    <dc:date>2017-05-23T14:05:12Z</dc:date>
    <item>
      <title>Section Participation</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/section-participation/m-p/4426175#M128309</link>
      <description>&lt;P&gt;Is Section Participation of a component accesible via the API?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It can be controlled locally with respect to a view in a drawing, or via document settings for the file itself ( so it would always be excluded). I'm hoping it's available in either of those two areas of the API.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So far we've not been able to find it in the API help. Can someone clarify please?&lt;/P&gt;</description>
      <pubDate>Sat, 14 Sep 2013 03:37:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/section-participation/m-p/4426175#M128309</guid>
      <dc:creator>scottmoyse</dc:creator>
      <dc:date>2013-09-14T03:37:33Z</dc:date>
    </item>
    <item>
      <title>Re: Section Participation</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/section-participation/m-p/4426259#M128310</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So far, I do not see a direct way. While it could always be a workaround to execute the corresponding command by API. i.e. assume you have found the browser node of the component you do not want to “section participant”., select it and execute&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ThisApplication.CommandManager. ControlDefinitions(“AllowNoneParticipation”).Execute()&lt;/P&gt;
&lt;P&gt;or&lt;/P&gt;
&lt;P&gt;ThisApplication.CommandManager. ControlDefinitions(“AllowSectionParticipation”).Execute()&lt;/P&gt;
&lt;P&gt;or&lt;/P&gt;
&lt;P&gt;ThisApplication.CommandManager. ControlDefinitions(“AllowSliceParticipation”).Execute()&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You will need to create a code to find the node. Here is one blog which may give a clue:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://adndevblog.typepad.com/manufacturing/2012/09/parse-browsernodes-for-a-specified-node-and-perform-userinterface-commands.html" target="_blank"&gt;http://adndevblog.typepad.com/manufacturing/2012/09/parse-browsernodes-for-a-specified-node-and-perform-userinterface-commands.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope it helps.&lt;/P&gt;</description>
      <pubDate>Sat, 14 Sep 2013 08:15:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/section-participation/m-p/4426259#M128310</guid>
      <dc:creator>xiaodong_liang</dc:creator>
      <dc:date>2013-09-14T08:15:03Z</dc:date>
    </item>
    <item>
      <title>Re: Section Participation</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/section-participation/m-p/4437437#M128311</link>
      <description>&lt;P&gt;Download the app called D&amp;amp;M Section Hatch Updates from the Inventor App Exchange store and that should provide you with what you need! &lt;img id="smileyvery-happy" class="emoticon emoticon-smileyvery-happy" src="https://forums.autodesk.com/i/smilies/16x16_smiley-very-happy.png" alt="Smiley Very Happy" title="Smiley Very Happy" /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Sep 2013 03:25:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/section-participation/m-p/4437437#M128311</guid>
      <dc:creator>gavbath</dc:creator>
      <dc:date>2013-09-19T03:25:47Z</dc:date>
    </item>
    <item>
      <title>Re: Section Participation</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/section-participation/m-p/7101953#M128312</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I was trying to apply this solution to a section view that was being placed on an Inventor Drawing using the API. The parts in the model are coming from the content center but need to be sectioned. It seems this method might be the only way to allow them to section, however when I call the command:&amp;nbsp;&lt;U&gt;&lt;EM&gt;_inventorApplication&lt;/EM&gt;&lt;/U&gt;&lt;EM&gt;&lt;U&gt;&lt;U&gt;.&lt;/U&gt;CommandManager.ControlDefinitions[“AllowSectionParticipation”].Ex&lt;WBR /&gt;ecute()&lt;/U&gt;&lt;/EM&gt; nothing appears to happen.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Stepping through the add-in, the application calls the command without issue or throwing any exceptions. After the program completes, the correct node is expanded and selected (highlighted), but the component remains 'un'-sectioned. I can right click the node that is selected and select 'Section' under participation and the section works then.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The only thing I can think is maybe the application isn't 'Ready' and that the views are not fully calculated, but nothing I try seems to change anything.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any thoughts on how i could get this to work would be most appreciated?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Additional information:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;I've also tried &lt;EM&gt;&lt;U&gt;.Ex&lt;WBR /&gt;ecute2(true)&lt;/U&gt;&lt;/EM&gt;&lt;/LI&gt;
&lt;LI&gt;This is in a full custom add-in we are creating that builds the assembly from content center and creates a drawing of that assembly so I don't have any small sample code, but I could provide the entirety of the logic surrounding this operation (though its entirely based on the information linked)&lt;/LI&gt;
&lt;LI&gt;I am setting the section behavior prior to navigating the browser and performing the execute operation&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;_sectionView.StandardPartsSectionBehavior = StandardPartsSectionBehaviorEnum.kObeyBrowserSettingsSectionStandardParts;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;I am only changing&amp;nbsp;&lt;U&gt;&lt;EM&gt;_inventorApplication.SilentOperation = true;&lt;/EM&gt;&lt;/U&gt;&amp;nbsp;no other inventor behavior modifications (screen updating, userinteraction, etc)&lt;/LI&gt;
&lt;LI&gt;I've tried running &lt;EM&gt;&lt;U&gt;AssemblyDrawingDocument.Update2(true);&lt;/U&gt;&lt;/EM&gt; before calling the execute command.&lt;/LI&gt;
&lt;LI&gt;I'm running this from Visual Studio in C#. I just noticed that I am using the&amp;nbsp;&lt;EM&gt;&lt;U&gt;ControlDefinitions[“..."]&lt;/U&gt;&lt;/EM&gt;&amp;nbsp;syntax, which may not work in this application&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Tue, 23 May 2017 14:05:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/section-participation/m-p/7101953#M128312</guid>
      <dc:creator>NSBowser</dc:creator>
      <dc:date>2017-05-23T14:05:12Z</dc:date>
    </item>
    <item>
      <title>Re: Section Participation</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/section-participation/m-p/7101958#M128313</link>
      <description>&lt;P&gt;A quick followup:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To ensure that the problem wasn't with the &amp;nbsp;ControlDefinitions[...] syntax, i replaced the logic with the following:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;        private void setSectionParticipation(BrowserNode node)
        {
            node.Expanded = true;
            node.DoSelect();
            executeCommand("AllowSectionParticipation");
        }

        private void executeCommand(string controlName)
        {
            ControlDefinitions controlDefs = _inventorApplication.CommandManager.ControlDefinitions;
            foreach (ControlDefinition controlDef in controlDefs)
            {
                if (controlDef.InternalName == controlName)
                {
                    controlDef.Execute2(true);
                    return;
                }
            }
        }&lt;/PRE&gt;
&lt;P&gt;This ensured (at least in my mind) that i was actually getting the correct control&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It, however, had no affect. the result was the same...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 May 2017 14:16:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/section-participation/m-p/7101958#M128313</guid>
      <dc:creator>NSBowser</dc:creator>
      <dc:date>2017-05-23T14:16:14Z</dc:date>
    </item>
    <item>
      <title>Re: Section Participation</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/section-participation/m-p/7102265#M128314</link>
      <description>&lt;P&gt;I discovered a tidbit here:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/forums/replypage/board-id/120/message-id/%20https:/forums.autodesk.com/t5/inventor-customization/command-manager-and-ilogic-automation-not-working/td-p/3517864" target="_self"&gt;https://forums.autodesk.com/t5/inventor-customization/command-manager-and-ilogic-automation-not-working/td-p/3517864&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;which made me try setting the userInteractionDisabled setting to false&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;       _inventorApplication.UserInterfaceManager.UserInteractionDisabled = false;&lt;/PRE&gt;
&lt;P&gt;Upon doing so the operation succeeds. I assume even though I never set it to true, the API calls are somehow triggering a user interaction suppression which nullifies the 'Execute' command since it sees it as some sort of user interaction&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 May 2017 15:20:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/section-participation/m-p/7102265#M128314</guid>
      <dc:creator>NSBowser</dc:creator>
      <dc:date>2017-05-23T15:20:12Z</dc:date>
    </item>
    <item>
      <title>Re: Section Participation</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/section-participation/m-p/9850560#M128315</link>
      <description>&lt;P&gt;Good afternoon,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am having a similar problem with an iLogic rule and I have tried to apply the tips mentioned in this thread. But I may have a different problem I think.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to change the section participation of a subassembly in my assembly. If I run the rule nothing happens although I see that the elements are selected (the right BrowserNodes are found).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I manually look at the section participation of the subassembly I see this:&amp;nbsp;&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Aantekening 2020-11-06 154505.jpg" style="width: 396px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/841165i1368CBDD950134CC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Aantekening 2020-11-06 154505.jpg" alt="Aantekening 2020-11-06 154505.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I manually change the section participation to "Section" (for example) then I run the rule and it works properly.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Once I find the right BrowserNode I am using the following subroutine:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Sub SetNodeNoSectionParticipation (oBrowserNode As BrowserNode)

ThisApplication.UserInterfaceManager.UserInteractionDisabled = False

oBrowserNode.DoSelect


ThisApplication.CommandManager.ControlDefinitions.Item("AllowNoneParticipation").Execute()


End Sub&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anybody help me to find a solution to make the rule work without manual intervention? (It looks like it may be related to the fact that when I select the subaseembly some parts are participating on the section and some not.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Nov 2020 15:22:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/section-participation/m-p/9850560#M128315</guid>
      <dc:creator>RodrigoEiras</dc:creator>
      <dc:date>2020-11-06T15:22:54Z</dc:date>
    </item>
  </channel>
</rss>

