<?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: Suppress all contraints on suppressing the component in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/suppress-all-contraints-on-suppressing-the-component/m-p/10244243#M123401</link>
    <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5406798"&gt;@_dscholtes_&lt;/a&gt;&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/6518271"&gt;@dutt.thakar&lt;/a&gt;&amp;nbsp; All I want to do is when I suppress Part2, the associative mates should be suppressed too.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="shrey9GP3F_0-1618578881105.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/907669iFD17D59F43C58549/image-size/medium?v=v2&amp;amp;px=400" role="button" title="shrey9GP3F_0-1618578881105.png" alt="shrey9GP3F_0-1618578881105.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 16 Apr 2021 13:17:11 GMT</pubDate>
    <dc:creator>shrey9GP3F</dc:creator>
    <dc:date>2021-04-16T13:17:11Z</dc:date>
    <item>
      <title>Suppress all contraints on suppressing the component</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/suppress-all-contraints-on-suppressing-the-component/m-p/10232623#M123290</link>
      <description>&lt;P&gt;Hi Community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I apologize if this question has been asked before. I am trying to suppress all the constraints when the component is suppressed, and do the same for unsuppress. I created a code but it is not working.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Dim aDoc As AssemblyDocument = ThisApplication.ActiveDocument
Dim oCon As AssemblyConstraint
Dim oJon As AssemblyJoint
Dim oOcc As ComponentOccurrence
Dim i As Integer

For i = 1 To aDoc.SelectSet.Count 
	oOcc = aDoc.SelectSet.Item(i)
	If oOcc.Suppressed = True Then
		For Each oCon In oOcc.Constraints
			oCon.Suppressed = True
		Next
		For Each oJon In oOcc.Joints
			oJon.Suppressed = True
		Next
	ElseIf oOcc.Suppressed = False Then
		For Each oCon In oOcc.Constraints
			oCon.Suppressed = False
		Next
		For Each oJon In oOcc.Joints
			oJon.Suppressed = False
		Next
	End If
Next&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Apr 2021 21:23:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/suppress-all-contraints-on-suppressing-the-component/m-p/10232623#M123290</guid>
      <dc:creator>shrey9GP3F</dc:creator>
      <dc:date>2021-04-12T21:23:28Z</dc:date>
    </item>
    <item>
      <title>Re: Suppress all contraints on suppressing the component</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/suppress-all-contraints-on-suppressing-the-component/m-p/10237039#M123309</link>
      <description>&lt;P&gt;Where exactly does it fail, did you find that out? I expect it will not process the exact constraints that you are trying to suppress in the loops. I have experienced that when an occurrence is suppressed, not all his properties and methods are accessible by API anymore.&lt;/P&gt;&lt;P&gt;If that is the case, you might first want to unsuppress the occurrence, suppress his constraints and then suppress the occurrence again.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Apr 2021 09:34:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/suppress-all-contraints-on-suppressing-the-component/m-p/10237039#M123309</guid>
      <dc:creator>_dscholtes_</dc:creator>
      <dc:date>2021-04-14T09:34:49Z</dc:date>
    </item>
    <item>
      <title>Re: Suppress all contraints on suppressing the component</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/suppress-all-contraints-on-suppressing-the-component/m-p/10240773#M123347</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5406798"&gt;@_dscholtes_&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;I tried with unsuppress + suppress + unsuppress. But it did not work. I cannot figure out why does it not looping through a component and suppress all the constraints.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Apr 2021 12:48:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/suppress-all-contraints-on-suppressing-the-component/m-p/10240773#M123347</guid>
      <dc:creator>shrey9GP3F</dc:creator>
      <dc:date>2021-04-15T12:48:23Z</dc:date>
    </item>
    <item>
      <title>Re: Suppress all contraints on suppressing the component</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/suppress-all-contraints-on-suppressing-the-component/m-p/10240921#M123349</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/9915864"&gt;@shrey9GP3F&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There is a question from my end, let's assume you have two components that are connected with one constraint, and you want one of that component to be suppressed, now as you know, in Inventor Mate:1 is shared between two components, if you run an iLogic rule that actually checks if the component is suppressed or not and if it is it will suppress its a constraint, but as Mate:1, in this case, is shared and the second component is not suppressed, so the rule will not suppress the constraint.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Think about it and share your thoughts,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For the time being, I have created a code for you that actually checks if the component is suppressed or not and if it is it will suppress its constraints, but if any of the components are not suppressed it will not suppress the constraint.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To check this code, please suppress both the components (which are sharing the same constraint) and then run the rule below. Also, note that you must have to create a custom level of detail to make this work, it will not work in the Master level of detail, if you are not using Inventor 2022.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oDoc&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;AssemblyDocument&lt;/SPAN&gt; = &lt;SPAN&gt;ThisApplication&lt;/SPAN&gt;.&lt;SPAN&gt;ActiveDocument&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oDef&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;AssemblyComponentDefinition&lt;/SPAN&gt; = &lt;SPAN&gt;oDoc&lt;/SPAN&gt;.&lt;SPAN&gt;ComponentDefinition&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oCon&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;AssemblyConstraint&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oJon&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;AssemblyJoint&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oOcc&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;ComponentOccurrence&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;i&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Integer&lt;/SPAN&gt;



&lt;SPAN&gt;For&lt;/SPAN&gt; &lt;SPAN&gt;Each&lt;/SPAN&gt; &lt;SPAN&gt;oOcc&lt;/SPAN&gt; &lt;SPAN&gt;In&lt;/SPAN&gt; &lt;SPAN&gt;oDef&lt;/SPAN&gt;.&lt;SPAN&gt;Occurrences&lt;/SPAN&gt;
	&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;oOcc&lt;/SPAN&gt;.&lt;SPAN&gt;Suppressed&lt;/SPAN&gt; = &lt;SPAN&gt;True&lt;/SPAN&gt;
		&lt;SPAN&gt;For&lt;/SPAN&gt; &lt;SPAN&gt;Each&lt;/SPAN&gt; &lt;SPAN&gt;oCon&lt;/SPAN&gt; &lt;SPAN&gt;In&lt;/SPAN&gt; &lt;SPAN&gt;oOcc&lt;/SPAN&gt;.&lt;SPAN&gt;Constraints&lt;/SPAN&gt;
			&lt;SPAN&gt;oCon&lt;/SPAN&gt;.&lt;SPAN&gt;Suppressed&lt;/SPAN&gt; = &lt;SPAN&gt;True&lt;/SPAN&gt;
		&lt;SPAN&gt;Next&lt;/SPAN&gt;
	&lt;SPAN&gt;Else&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;oOcc&lt;/SPAN&gt;.&lt;SPAN&gt;Suppressed&lt;/SPAN&gt; = &lt;SPAN&gt;False&lt;/SPAN&gt;
		&lt;SPAN&gt;For&lt;/SPAN&gt; &lt;SPAN&gt;Each&lt;/SPAN&gt; &lt;SPAN&gt;oCon&lt;/SPAN&gt; &lt;SPAN&gt;In&lt;/SPAN&gt; &lt;SPAN&gt;oOcc&lt;/SPAN&gt;.&lt;SPAN&gt;Constraints&lt;/SPAN&gt;
			&lt;SPAN&gt;oCon&lt;/SPAN&gt;.&lt;SPAN&gt;Suppressed&lt;/SPAN&gt; = &lt;SPAN&gt;False&lt;/SPAN&gt;
		&lt;SPAN&gt;Next&lt;/SPAN&gt;
	&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;/SPAN&gt;
&lt;SPAN&gt;Next&lt;/SPAN&gt;
&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Apr 2021 13:31:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/suppress-all-contraints-on-suppressing-the-component/m-p/10240921#M123349</guid>
      <dc:creator>dutt.thakar</dc:creator>
      <dc:date>2021-04-15T13:31:21Z</dc:date>
    </item>
    <item>
      <title>Re: Suppress all contraints on suppressing the component</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/suppress-all-contraints-on-suppressing-the-component/m-p/10241083#M123352</link>
      <description>&lt;P&gt;Hi &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/6518271"&gt;@dutt.thakar&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the reply.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When we exclude any component, it also excludes its constraints. I want to achieve the same thing with suppression. Inventor does not do that out of the box, therefore I am using Inventor API.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Apr 2021 14:10:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/suppress-all-contraints-on-suppressing-the-component/m-p/10241083#M123352</guid>
      <dc:creator>shrey9GP3F</dc:creator>
      <dc:date>2021-04-15T14:10:42Z</dc:date>
    </item>
    <item>
      <title>Re: Suppress all contraints on suppressing the component</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/suppress-all-contraints-on-suppressing-the-component/m-p/10241233#M123355</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/6518271"&gt;@dutt.thakar&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/9915864"&gt;@shrey9GP3F&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There is a question from my end, let's assume you have two components that are connected with one constraint, and you want one of that component to be suppressed, now as you know, in Inventor Mate:1 is shared between two components, if you run an iLogic rule that actually checks if the component is suppressed or not and if it is it will suppress its a constraint, but as Mate:1, in this case, is shared and the second component is not suppressed, so the rule will not suppress the constraint.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Think about it and share your thoughts,&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;No need to assume when we can simply test. I created an assembly containing three cubes in a row. The first one is placed and grounded at origin, the others are constrained to the previous one.&amp;nbsp;When I suppress the middle one (which is constrained to both others) , its constraints are not suppressed. However, I can suppress the constraints manually, which means it should also be possible by iLogic. I tested this with the posted code and the constraints can be suppressed (whatever status of the occurrence on the other end of the constraint).&lt;BR /&gt;&lt;BR /&gt;It also showed me that some constraints that should be suppressed were not suppressed when the code was finished. What if I told you the fix is to remove the loop that un-suppresses the constraints when the occurrence is not suppressed?&lt;BR /&gt;&lt;BR /&gt;Spoiler: the suppressed occurrence is processed before the un-suppressed ones that it is constrained to.&lt;BR /&gt;So first the constraints are suppressed, but later-on they are un-suppressed again.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Apr 2021 14:50:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/suppress-all-contraints-on-suppressing-the-component/m-p/10241233#M123355</guid>
      <dc:creator>_dscholtes_</dc:creator>
      <dc:date>2021-04-15T14:50:13Z</dc:date>
    </item>
    <item>
      <title>Re: Suppress all contraints on suppressing the component</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/suppress-all-contraints-on-suppressing-the-component/m-p/10241390#M123359</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5406798"&gt;@_dscholtes_&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the reply.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried eliminating the loop for unsuppress, but it is still not working for me. I will investigate more today.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Apr 2021 15:29:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/suppress-all-contraints-on-suppressing-the-component/m-p/10241390#M123359</guid>
      <dc:creator>shrey9GP3F</dc:creator>
      <dc:date>2021-04-15T15:29:16Z</dc:date>
    </item>
    <item>
      <title>Re: Suppress all contraints on suppressing the component</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/suppress-all-contraints-on-suppressing-the-component/m-p/10243041#M123375</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5406798"&gt;@_dscholtes_&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes, I totally understand that, and that is why I am asking&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/9915864"&gt;@shrey9GP3F&lt;/a&gt;&amp;nbsp;if a constraint is shared between two components and we are suppressing one component and not the other, so he really wants to suppress a constraint that is also depending on a component that is not suppressed.?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you remove the unsuppressed loop it will suppress the constraint but, if the constraint is shared it will suppress the constraint for the unsuppressed component also.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;P.S : I know about spoiler also and that is why I am asking, what is the exact intention of achieving this, as there will be suppressed constraints for a component which is unsuppressed and vice versa, as this will be a cyclic dependency between constraints and suppressed/unsuppressed components.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Apr 2021 05:04:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/suppress-all-contraints-on-suppressing-the-component/m-p/10243041#M123375</guid>
      <dc:creator>dutt.thakar</dc:creator>
      <dc:date>2021-04-16T05:04:32Z</dc:date>
    </item>
    <item>
      <title>Re: Suppress all contraints on suppressing the component</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/suppress-all-contraints-on-suppressing-the-component/m-p/10243206#M123384</link>
      <description>&lt;P&gt;If shared constraints should not be suppressed, then no constraints will be suppressed. This is a result&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/9915864"&gt;@shrey9GP3F&lt;/a&gt;&amp;nbsp;may not have thought of (and makes running the code pointless).&lt;BR /&gt;If shared constraints should be suppressed, then it is possible that an unsuppressed occurrence is no longer fully constrained and can be moved, thereby modifying the model (unless it was grounded).&lt;BR /&gt;&lt;BR /&gt;I have not used 'exclude', so I do not know what it does exactly. Trying to imitate some of its behavior is not without trouble and needs careful consideration.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Apr 2021 06:56:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/suppress-all-contraints-on-suppressing-the-component/m-p/10243206#M123384</guid>
      <dc:creator>_dscholtes_</dc:creator>
      <dc:date>2021-04-16T06:56:05Z</dc:date>
    </item>
    <item>
      <title>Re: Suppress all contraints on suppressing the component</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/suppress-all-contraints-on-suppressing-the-component/m-p/10244243#M123401</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5406798"&gt;@_dscholtes_&lt;/a&gt;&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/6518271"&gt;@dutt.thakar&lt;/a&gt;&amp;nbsp; All I want to do is when I suppress Part2, the associative mates should be suppressed too.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="shrey9GP3F_0-1618578881105.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/907669iFD17D59F43C58549/image-size/medium?v=v2&amp;amp;px=400" role="button" title="shrey9GP3F_0-1618578881105.png" alt="shrey9GP3F_0-1618578881105.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Apr 2021 13:17:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/suppress-all-contraints-on-suppressing-the-component/m-p/10244243#M123401</guid>
      <dc:creator>shrey9GP3F</dc:creator>
      <dc:date>2021-04-16T13:17:11Z</dc:date>
    </item>
    <item>
      <title>Re: Suppress all contraints on suppressing the component</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/suppress-all-contraints-on-suppressing-the-component/m-p/12988471#M171269</link>
      <description>&lt;P&gt;Hey Guys How About the Joint. ?&lt;/P&gt;&lt;P&gt;Theare Only Works For Constrain...&amp;nbsp;&lt;/P&gt;&lt;P&gt;The First Code Above With Joint to.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I try For the Joint Code. But Not Work.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="drafter_sby2_0-1724923391742.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1403459iA713021A3A5525F7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="drafter_sby2_0-1724923391742.png" alt="drafter_sby2_0-1724923391742.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Aug 2024 09:23:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/suppress-all-contraints-on-suppressing-the-component/m-p/12988471#M171269</guid>
      <dc:creator>drafter_sby2</dc:creator>
      <dc:date>2024-08-29T09:23:15Z</dc:date>
    </item>
    <item>
      <title>Re: Suppress all contraints on suppressing the component</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/suppress-all-contraints-on-suppressing-the-component/m-p/12989583#M171298</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/15945680"&gt;@drafter_sby2&lt;/a&gt;.&amp;nbsp; All you can do is try.&amp;nbsp; If it does not work, then there is your answer.&amp;nbsp; The process is still pretty much the same.&amp;nbsp; Only since the 2022 version, we are working with ModelStates, instead of LevelOfDetailRepresentations, which are what records suppression status.&amp;nbsp; ModelStates sort of made it slightly simpler, since the default ModelState is not 'locked' (which some folks want to make happen), but the introduction of ModelStates also greatly complicated a lot of things that we do by code.&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;Sub Main
	Dim oADoc As AssemblyDocument = TryCast(ThisDoc.Document, Inventor.AssemblyDocument)
	If oADoc Is Nothing Then Return
	For Each oOcc As ComponentOccurrence In oADoc.ComponentDefinition.Occurrences
		If oOcc.Suppressed Then
			ConstraintAndJointSuppression(oOcc, True)
		Else
			ConstraintAndJointSuppression(oOcc, False)
		End If
	Next
	oADoc.Update2(True)
End Sub

Sub ConstraintAndJointSuppression(oOcc As ComponentOccurrence, bSuppress As Boolean)
	For Each oConst As AssemblyConstraint In oOcc.Constraints
		Try : oConst.Suppressed = bSuppress : Catch : End Try
	Next
	For Each oJoint As AssemblyJoint In oOcc.Joints
		Try : oJoint.Suppressed = bSuppress : Catch : End Try
	Next
End Sub&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 29 Aug 2024 16:36:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/suppress-all-contraints-on-suppressing-the-component/m-p/12989583#M171298</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2024-08-29T16:36:53Z</dc:date>
    </item>
    <item>
      <title>Re: Suppress all contraints on suppressing the component</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/suppress-all-contraints-on-suppressing-the-component/m-p/12989655#M171302</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/15945680"&gt;@drafter_sby2&lt;/a&gt;&amp;nbsp;, welcome to the forum.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you're using iLogic you can use &lt;STRONG&gt;Capture Current State&lt;/STRONG&gt; on the Joint to get /set it's status.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can do the same for the component(s) it is constrained to.&lt;BR /&gt;&lt;BR /&gt;Here is an example where the 3rd lego is toggled on or off, and the Joint is active only when both of the components it uses is active... if one is not then the Joint's active status is false.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope that helps, Curtis&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="Curtis_Waguespack_1-1724951821666.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1403632i5DD3B9D229C7D991/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Curtis_Waguespack_1-1724951821666.png" alt="Curtis_Waguespack_1-1724951821666.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;SPAN&gt;Component&lt;/SPAN&gt;.&lt;SPAN&gt;IsActive&lt;/SPAN&gt;(&lt;SPAN&gt;"Lego:3"&lt;/SPAN&gt;) = &lt;SPAN&gt;Not&lt;/SPAN&gt; &lt;SPAN&gt;Component&lt;/SPAN&gt;.&lt;SPAN&gt;IsActive&lt;/SPAN&gt;(&lt;SPAN&gt;"Lego:3"&lt;/SPAN&gt;)
&lt;SPAN&gt;Joint&lt;/SPAN&gt;.&lt;SPAN&gt;IsActive&lt;/SPAN&gt;(&lt;SPAN&gt;"Rotational:1"&lt;/SPAN&gt;) = (&lt;SPAN&gt;Component&lt;/SPAN&gt;.&lt;SPAN&gt;IsActive&lt;/SPAN&gt;(&lt;SPAN&gt;"Lego:2"&lt;/SPAN&gt;) &lt;SPAN&gt;And&lt;/SPAN&gt;  &lt;SPAN&gt;Component&lt;/SPAN&gt;.&lt;SPAN&gt;IsActive&lt;/SPAN&gt;(&lt;SPAN&gt;"Lego:3"&lt;/SPAN&gt;))&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Aug 2024 17:20:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/suppress-all-contraints-on-suppressing-the-component/m-p/12989655#M171302</guid>
      <dc:creator>Curtis_Waguespack</dc:creator>
      <dc:date>2024-08-29T17:20:36Z</dc:date>
    </item>
    <item>
      <title>Re: Suppress all contraints on suppressing the component</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/suppress-all-contraints-on-suppressing-the-component/m-p/12990586#M171305</link>
      <description>&lt;P&gt;Yes, This Awesome.. Solve For me.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank u Sir.&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7812054"&gt;@WCrihfield&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This Code Is Very Easy To Add For Assembly Template And Combine with iTriger.&lt;/P&gt;&lt;P&gt;Where Inventor Didn't Automatic Suppress Constrain and Joint. Not Like Solidworks Or Else.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;mr.&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/105031"&gt;@Curtis_Waguespack&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes u Are Right too.. but is Hard To Code 1 By 1. For Each Part...&lt;/P&gt;&lt;P&gt;And We Should do manual Selection Which Part is Active.&lt;/P&gt;&lt;P&gt;Or Some Case you Need To Create The Other Rule For Selction&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>Mon, 02 Sep 2024 02:01:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/suppress-all-contraints-on-suppressing-the-component/m-p/12990586#M171305</guid>
      <dc:creator>drafter_sby2</dc:creator>
      <dc:date>2024-09-02T02:01:02Z</dc:date>
    </item>
  </channel>
</rss>

