<?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: Is there anything in the API that lets me access a feature being &amp;quot;adaptive&amp;quot;? in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/is-there-anything-in-the-api-that-lets-me-access-a-feature-being/m-p/12947075#M7443</link>
    <description>&lt;P&gt;The blue section...&lt;/P&gt;
&lt;P&gt;I was not sure if you were working within a part or assembly, but I knew it had to be either one or the other, but that this rule should never be ran on DrawingDocument or PresentationDocument, so I used a simple filter to eliminate that possibility.&amp;nbsp; I like to use the 'TypeOf' operator these days, due to it simply seeming to process faster than using the &lt;A href="https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=Document_DocumentType" target="_blank" rel="noopener"&gt;Document.DocumentType&lt;/A&gt; &amp;amp; &lt;A href="https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=DocumentTypeEnum" target="_blank" rel="noopener"&gt;DocumentTypeEnum&lt;/A&gt; check.&amp;nbsp; Then, I already know (from experience) that the &lt;A href="https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=AssemblyComponentDefinition_Features" target="_blank" rel="noopener"&gt;AssemblyComponentDefinition.Features&lt;/A&gt; property returns the '&lt;A href="https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=GUID-Features" target="_blank" rel="noopener"&gt;Features&lt;/A&gt;' Type, while the &lt;A href="https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=PartComponentDefinition_Features" target="_blank" rel="noopener"&gt;PartComponentDefinition.Features&lt;/A&gt; property returns the '&lt;A href="https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=GUID-PartFeatures" target="_blank" rel="noopener"&gt;PartFeatures&lt;/A&gt;' Type, so I did not specify the Type of the collection object being in Line 4, because the Type varies.&amp;nbsp; Then, since I did not 'declare' the Type of that variable, I needed to first make sure it was not Nothing, before checking its Count, just as added error proofing.&amp;nbsp; When using a For Each...Next type loop, if the collection object is Null (such as no value assigned to that variable), that will throw an error, but if the Count of the collection is zero, that is OK (no error), it will just not do anything.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The green section...&lt;/P&gt;
&lt;P&gt;I just assumed that you may have more than one feature that you wanted to control the same way, so just showing an 'ElseIf' section for filling that part in, if needed, but was not really necessary.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I posted that last example before seeing what Curtis posted.&amp;nbsp; His example does certainly look a lot more simple, because it takes advantage of that iLogic API method.&amp;nbsp; Pretty much anything that can be done with iLogic API can be done with Inventor API, but using Inventor API usually involves more code.&amp;nbsp; There are definitely pros &amp;amp; cons for going either way with the code.&lt;/P&gt;</description>
    <pubDate>Thu, 08 Aug 2024 14:26:03 GMT</pubDate>
    <dc:creator>WCrihfield</dc:creator>
    <dc:date>2024-08-08T14:26:03Z</dc:date>
    <item>
      <title>Is there anything in the API that lets me access a feature being "adaptive"?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/is-there-anything-in-the-api-that-lets-me-access-a-feature-being/m-p/12946021#M7436</link>
      <description>&lt;P&gt;Example, if a feature is adaptive I'd like to have an if/this assigned to it to perform some math, however if it's not adaptive it would perform different math. I'm currently handling this with a custom parameter called "Adaptive", but it involves a manual step and I'd rather iLogic just handle it automatically.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Basically I'd like to have something that looks like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If&amp;nbsp;Feature.IsActive("Beam Profile") Is Adaptive Then&lt;BR /&gt;Parameter("d51") = (d45)&lt;BR /&gt;Parameter("d52") = (d45 / 2)&lt;BR /&gt;Else If&amp;nbsp;Feature.IsActive("Beam Profile") Is Not Adaptive Then&lt;BR /&gt;Parameter("d45") = B_L&lt;BR /&gt;Parameter("d51") = (B_L)&lt;BR /&gt;Parameter("d52") = (B_L/2)&lt;BR /&gt;End If&lt;/P&gt;</description>
      <pubDate>Thu, 08 Aug 2024 05:15:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/is-there-anything-in-the-api-that-lets-me-access-a-feature-being/m-p/12946021#M7436</guid>
      <dc:creator>chris</dc:creator>
      <dc:date>2024-08-08T05:15:24Z</dc:date>
    </item>
    <item>
      <title>Re: Is there anything in the API that lets me access a feature being "adaptive"?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/is-there-anything-in-the-api-that-lets-me-access-a-feature-being/m-p/12946039#M7437</link>
      <description>&lt;P&gt;This is what chat gtp gave me, but I don't need the code to search the entire part, I already know what specific feature would have it or not, so would there be an easier way to write it as a "true/false" if the specific feature is known?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;' Get the part document&lt;BR /&gt;Dim oDoc As PartDocument&lt;BR /&gt;oDoc = ThisApplication.ActiveDocument&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;' Get the part component definition&lt;BR /&gt;Dim oCompDef As PartComponentDefinition&lt;BR /&gt;oCompDef = oDoc.ComponentDefinition&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;' Loop through all features in the part&lt;BR /&gt;Dim oFeature As Object&lt;BR /&gt;For Each oFeature In oCompDef.Features&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;' Check if the feature is adaptive&lt;BR /&gt;If oFeature.Adaptive Then&lt;BR /&gt;' Output the feature name and its adaptive status&lt;BR /&gt;MessageBox.Show(oFeature.Name &amp;amp; " is adaptive.", "Adaptive Feature Found")&lt;BR /&gt;End If&lt;/P&gt;&lt;P&gt;Next&lt;/P&gt;</description>
      <pubDate>Thu, 08 Aug 2024 05:03:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/is-there-anything-in-the-api-that-lets-me-access-a-feature-being/m-p/12946039#M7437</guid>
      <dc:creator>chris</dc:creator>
      <dc:date>2024-08-08T05:03:40Z</dc:date>
    </item>
    <item>
      <title>Re: Is there anything in the API that lets me access a feature being "adaptive"?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/is-there-anything-in-the-api-that-lets-me-access-a-feature-being/m-p/12946051#M7438</link>
      <description>&lt;P&gt;I was also given this code, but iLogic said that "let" and "set" were no longer supported?&amp;nbsp;&lt;/P&gt;&lt;P&gt;' Get the part document&lt;BR /&gt;Dim oDoc As PartDocument&lt;BR /&gt;oDoc = ThisApplication.ActiveDocument&lt;/P&gt;&lt;P&gt;' Get the part component definition&lt;BR /&gt;Dim oCompDef As PartComponentDefinition&lt;BR /&gt;oCompDef = oDoc.ComponentDefinition&lt;/P&gt;&lt;P&gt;' Specify the name of the feature you want to check&lt;BR /&gt;Dim featureName As String&lt;BR /&gt;featureName = "YourFeatureNameHere" ' Replace with the actual feature name&lt;/P&gt;&lt;P&gt;' Find the feature by name&lt;BR /&gt;Dim oFeature As Object&lt;BR /&gt;On Error Resume Next&lt;BR /&gt;Set oFeature = oCompDef.Features.Item(featureName)&lt;BR /&gt;On Error GoTo 0&lt;/P&gt;&lt;P&gt;' Check if the feature exists&lt;BR /&gt;If Not oFeature Is Nothing Then&lt;BR /&gt;' Check if the feature is adaptive&lt;BR /&gt;If oFeature.Adaptive Then&lt;BR /&gt;MessageBox.Show(featureName &amp;amp; " is adaptive.", "Adaptive Feature Check")&lt;BR /&gt;Else&lt;BR /&gt;MessageBox.Show(featureName &amp;amp; " is not adaptive.", "Adaptive Feature Check")&lt;BR /&gt;End If&lt;BR /&gt;Else&lt;BR /&gt;MessageBox.Show("Feature " &amp;amp; featureName &amp;amp; " not found.", "Error")&lt;BR /&gt;End If&lt;/P&gt;</description>
      <pubDate>Thu, 08 Aug 2024 05:12:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/is-there-anything-in-the-api-that-lets-me-access-a-feature-being/m-p/12946051#M7438</guid>
      <dc:creator>chris</dc:creator>
      <dc:date>2024-08-08T05:12:28Z</dc:date>
    </item>
    <item>
      <title>Re: Is there anything in the API that lets me access a feature being "adaptive"?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/is-there-anything-in-the-api-that-lets-me-access-a-feature-being/m-p/12946948#M7439</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3950322"&gt;@chris&lt;/a&gt;&amp;nbsp;, try this syntax&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;Feature&lt;/SPAN&gt;.&lt;SPAN&gt;InventorFeature&lt;/SPAN&gt;(&lt;SPAN&gt;"Beam Profile"&lt;/SPAN&gt;).&lt;SPAN&gt;Adaptive&lt;/SPAN&gt; = &lt;SPAN&gt;True&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt;
	&lt;SPAN&gt;MsgBox&lt;/SPAN&gt;(&lt;SPAN&gt;"Adaptive"&lt;/SPAN&gt;)
&lt;SPAN&gt;Else&lt;/SPAN&gt;
	&lt;SPAN&gt;MsgBox&lt;/SPAN&gt;(&lt;SPAN&gt;"not Adaptive"&lt;/SPAN&gt;)
&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Aug 2024 13:29:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/is-there-anything-in-the-api-that-lets-me-access-a-feature-being/m-p/12946948#M7439</guid>
      <dc:creator>Curtis_W</dc:creator>
      <dc:date>2024-08-08T13:29:33Z</dc:date>
    </item>
    <item>
      <title>Re: Is there anything in the API that lets me access a feature being "adaptive"?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/is-there-anything-in-the-api-that-lets-me-access-a-feature-being/m-p/12946954#M7440</link>
      <description>&lt;P&gt;Hi &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3950322"&gt;@chris&lt;/a&gt;.&amp;nbsp; Those AI bots usually get things mixed up, like mixing VBA keywords into iLogic rules.&amp;nbsp; It does not understand the iLogic API system that well either.&amp;nbsp; Maybe try this way of formatting the iLogic rule.&amp;nbsp; It uses Inventor API way of accessing the features, but uses iLogic API for working with the parameters.&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;Sub Main
	Dim oDoc As Document = ThisDoc.Document
	If (Not TypeOf oDoc Is AssemblyDocument) AndAlso (Not TypeOf oDoc Is PartDocument) Then Return
	Dim oFeats = oDoc.ComponentDefinition.Features 'Type varies between assembly and part
	If oFeats Is Nothing OrElse oFeats.Count = 0 Then Return
	For Each oFeat As PartFeature In oFeats
		If oFeat.Name = "Beam Profile" Then
			If oFeat.Adaptive Then
				Parameter("d51") = d45
				Parameter("d52") = (d45 / 2)
			Else
				Parameter("d45") = B_L
				Parameter("d51") = B_L
				Parameter("d52") = (B_L / 2)
			End If
		ElseIf oFeat.Name = "OtherFeatureName" Then
			If oFeat.Adaptive Then
				'Parameter("X") = X
				'Parameter("X") = (X / 2)
			Else
				'Parameter("X") = X
				'Parameter("X") = X
				'Parameter("X") = (X / 2)
			End If
		End If
	Next oFeat
End Sub&lt;/LI-CODE&gt;
&lt;P&gt;If this solved your problem, or answered your question, please click &lt;SPAN&gt;&lt;STRONG&gt; ACCEPT SOLUTION &lt;/STRONG&gt;&lt;/SPAN&gt;.&lt;BR /&gt;Or, if this helped you, please click (LIKE or KUDOS) &lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Aug 2024 13:32:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/is-there-anything-in-the-api-that-lets-me-access-a-feature-being/m-p/12946954#M7440</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2024-08-08T13:32:15Z</dc:date>
    </item>
    <item>
      <title>Re: Is there anything in the API that lets me access a feature being "adaptive"?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/is-there-anything-in-the-api-that-lets-me-access-a-feature-being/m-p/12947035#M7441</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7812054"&gt;@WCrihfield&lt;/a&gt;&amp;nbsp;Thank you for the help, can you please give me an explanation of the segments of the above code? I get the red section, as it's pretty much my existing rule, but what is the blue section saying and what is the green section for?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="chris_0-1723125628503.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1395859i2804B51660E55C56/image-size/medium?v=v2&amp;amp;px=400" role="button" title="chris_0-1723125628503.png" alt="chris_0-1723125628503.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Aug 2024 14:00:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/is-there-anything-in-the-api-that-lets-me-access-a-feature-being/m-p/12947035#M7441</guid>
      <dc:creator>chris</dc:creator>
      <dc:date>2024-08-08T14:00:35Z</dc:date>
    </item>
    <item>
      <title>Re: Is there anything in the API that lets me access a feature being "adaptive"?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/is-there-anything-in-the-api-that-lets-me-access-a-feature-being/m-p/12947051#M7442</link>
      <description>&lt;P&gt;I have a variant of what I want to happen working from the simple message box that&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/105031"&gt;@Curtis_W&lt;/a&gt;&amp;nbsp;added, but while it will change from adaptive, it will not change back without manually running the rule. What the rule is trying to be is this:&lt;/P&gt;&lt;P&gt;when I place a template of the structural member, I have a parameter that allows the user to define the length they desire, however, which of course carries with it a way to show a total length in the parts list. (that being the "B_L". However, if the user decides they want to use "adaptive" to stretch that part between other parts, then they can do so, in which case I need "d51"-end plane&amp;nbsp; and&amp;nbsp; "d52"-mid plane to follow whatever the adaptive length now is. But if they decide they don't want to be adaptive, then those dims need to fall back to it's start stage, that is being based off the "B_L".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have this working fine with a custom parameter called adaptive, but it causes problems if the user forgets to check it before they change the feature to adaptive.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The actual geometric length is being handled with this for the parts list:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Geo_Length = Measure.PreciseExtentsHeight&lt;BR /&gt;iLogicVb.UpdateWhenDone = True&lt;BR /&gt;InventorVb.DocumentUpdate()&lt;/P&gt;</description>
      <pubDate>Thu, 08 Aug 2024 14:10:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/is-there-anything-in-the-api-that-lets-me-access-a-feature-being/m-p/12947051#M7442</guid>
      <dc:creator>chris</dc:creator>
      <dc:date>2024-08-08T14:10:07Z</dc:date>
    </item>
    <item>
      <title>Re: Is there anything in the API that lets me access a feature being "adaptive"?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/is-there-anything-in-the-api-that-lets-me-access-a-feature-being/m-p/12947075#M7443</link>
      <description>&lt;P&gt;The blue section...&lt;/P&gt;
&lt;P&gt;I was not sure if you were working within a part or assembly, but I knew it had to be either one or the other, but that this rule should never be ran on DrawingDocument or PresentationDocument, so I used a simple filter to eliminate that possibility.&amp;nbsp; I like to use the 'TypeOf' operator these days, due to it simply seeming to process faster than using the &lt;A href="https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=Document_DocumentType" target="_blank" rel="noopener"&gt;Document.DocumentType&lt;/A&gt; &amp;amp; &lt;A href="https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=DocumentTypeEnum" target="_blank" rel="noopener"&gt;DocumentTypeEnum&lt;/A&gt; check.&amp;nbsp; Then, I already know (from experience) that the &lt;A href="https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=AssemblyComponentDefinition_Features" target="_blank" rel="noopener"&gt;AssemblyComponentDefinition.Features&lt;/A&gt; property returns the '&lt;A href="https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=GUID-Features" target="_blank" rel="noopener"&gt;Features&lt;/A&gt;' Type, while the &lt;A href="https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=PartComponentDefinition_Features" target="_blank" rel="noopener"&gt;PartComponentDefinition.Features&lt;/A&gt; property returns the '&lt;A href="https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=GUID-PartFeatures" target="_blank" rel="noopener"&gt;PartFeatures&lt;/A&gt;' Type, so I did not specify the Type of the collection object being in Line 4, because the Type varies.&amp;nbsp; Then, since I did not 'declare' the Type of that variable, I needed to first make sure it was not Nothing, before checking its Count, just as added error proofing.&amp;nbsp; When using a For Each...Next type loop, if the collection object is Null (such as no value assigned to that variable), that will throw an error, but if the Count of the collection is zero, that is OK (no error), it will just not do anything.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The green section...&lt;/P&gt;
&lt;P&gt;I just assumed that you may have more than one feature that you wanted to control the same way, so just showing an 'ElseIf' section for filling that part in, if needed, but was not really necessary.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I posted that last example before seeing what Curtis posted.&amp;nbsp; His example does certainly look a lot more simple, because it takes advantage of that iLogic API method.&amp;nbsp; Pretty much anything that can be done with iLogic API can be done with Inventor API, but using Inventor API usually involves more code.&amp;nbsp; There are definitely pros &amp;amp; cons for going either way with the code.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Aug 2024 14:26:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/is-there-anything-in-the-api-that-lets-me-access-a-feature-being/m-p/12947075#M7443</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2024-08-08T14:26:03Z</dc:date>
    </item>
    <item>
      <title>Re: Is there anything in the API that lets me access a feature being "adaptive"?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/is-there-anything-in-the-api-that-lets-me-access-a-feature-being/m-p/12947200#M7444</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3950322"&gt;@chris&lt;/a&gt;&amp;nbsp;, I don't know of anyway to catch the event with iLogic, that occurs when the adaptivity is toggled .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;maybe someone else can think of something?&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-1723129693578.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1395903iA481254FC6F634C2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Curtis_Waguespack_1-1723129693578.png" alt="Curtis_Waguespack_1-1723129693578.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>Thu, 08 Aug 2024 15:10:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/is-there-anything-in-the-api-that-lets-me-access-a-feature-being/m-p/12947200#M7444</guid>
      <dc:creator>Curtis_W</dc:creator>
      <dc:date>2024-08-08T15:10:18Z</dc:date>
    </item>
    <item>
      <title>Re: Is there anything in the API that lets me access a feature being "adaptive"?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/is-there-anything-in-the-api-that-lets-me-access-a-feature-being/m-p/12947246#M7445</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/105031"&gt;@Curtis_W&lt;/a&gt;&amp;nbsp;can you show me how to get the code to auto update as soon I change the feature to not adaptive, currently it requires me to manually run the rule? (not sure why there is no thumbnail)&lt;/P&gt;&lt;P&gt;&lt;div class="video-embed-center video-embed"&gt;&lt;iframe class="embedly-embed" src="https://cdn.embedly.com/widgets/media.html?url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DDsqvp3QCadY&amp;amp;type=text%2Fhtml&amp;amp;schema=youtube&amp;amp;display_name=YouTube&amp;amp;src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FDsqvp3QCadY" width="200" height="112" scrolling="no" title="YouTube embed" frameborder="0" allow="autoplay; fullscreen; encrypted-media; picture-in-picture;" allowfullscreen="true"&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Aug 2024 15:26:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/is-there-anything-in-the-api-that-lets-me-access-a-feature-being/m-p/12947246#M7445</guid>
      <dc:creator>chris</dc:creator>
      <dc:date>2024-08-08T15:26:37Z</dc:date>
    </item>
    <item>
      <title>Re: Is there anything in the API that lets me access a feature being "adaptive"?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/is-there-anything-in-the-api-that-lets-me-access-a-feature-being/m-p/12947253#M7446</link>
      <description>&lt;P&gt;Nothing comes to mind for me either.&amp;nbsp; I looked into &lt;A href="https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=ModelingEvents_OnFeatureChange" target="_blank" rel="noopener"&gt;ModelingEvents.OnFeatureChange&lt;/A&gt; Event too, but not useful in this case.&amp;nbsp; It does get triggered, but the event does not provide any useful information that could be used for this case, because 'Context' is empty.&amp;nbsp; We would have access to the Document and the Feature, but without 'Context' help, we would have to 'test' if the 'Adaptive' is different during the 'kBefore' vs 'kAfter' timing, using one or two a share variables.&amp;nbsp; Might be possible to use that way though, but I have not done enough testing.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Aug 2024 15:29:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/is-there-anything-in-the-api-that-lets-me-access-a-feature-being/m-p/12947253#M7446</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2024-08-08T15:29:01Z</dc:date>
    </item>
    <item>
      <title>Re: Is there anything in the API that lets me access a feature being "adaptive"?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/is-there-anything-in-the-api-that-lets-me-access-a-feature-being/m-p/12947274#M7447</link>
      <description>&lt;P&gt;Okay, thank you all for your help, I'll just have to make sure to manually run that run&lt;/P&gt;</description>
      <pubDate>Thu, 08 Aug 2024 15:36:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/is-there-anything-in-the-api-that-lets-me-access-a-feature-being/m-p/12947274#M7447</guid>
      <dc:creator>chris</dc:creator>
      <dc:date>2024-08-08T15:36:33Z</dc:date>
    </item>
    <item>
      <title>Re: Is there anything in the API that lets me access a feature being "adaptive"?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/is-there-anything-in-the-api-that-lets-me-access-a-feature-being/m-p/12947407#M7448</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3950322"&gt;@chris&lt;/a&gt;, if I understand correctly, I would likely wire up that adaptive checkbox in the form to trigger the rule in the part, so that it sets the adaptivity and changes the parameter logic also.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;see the form and rule in the attached example part model using the code below&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;SPAN&gt;Feature&lt;/SPAN&gt;.&lt;SPAN&gt;InventorFeature&lt;/SPAN&gt;(&lt;SPAN&gt;"Beam Profile"&lt;/SPAN&gt;).&lt;SPAN&gt;Adaptive&lt;/SPAN&gt; = &lt;SPAN&gt;isAdaptive&lt;/SPAN&gt;

&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;isAdaptive&lt;/SPAN&gt; = &lt;SPAN&gt;True&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt;
	&lt;SPAN&gt;MsgBox&lt;/SPAN&gt;(&lt;SPAN&gt;"Feature is adaptive, params = d45"&lt;/SPAN&gt;)
&lt;SPAN&gt;'	Parameter("d51") = d45&lt;/SPAN&gt;
&lt;SPAN&gt;'	Parameter("d52") = (d45 / 2)&lt;/SPAN&gt;
&lt;SPAN&gt;Else&lt;/SPAN&gt;
	&lt;SPAN&gt;MsgBox&lt;/SPAN&gt;(&lt;SPAN&gt;"Feature is NOT adaptive, params = B_L"&lt;/SPAN&gt;)
&lt;SPAN&gt;'	Parameter("d45") = B_L&lt;/SPAN&gt;
&lt;SPAN&gt;'	Parameter("d51") = B_L&lt;/SPAN&gt;
&lt;SPAN&gt;'	Parameter("d52") = (B_L / 2)&lt;/SPAN&gt;
&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Aug 2024 16:30:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/is-there-anything-in-the-api-that-lets-me-access-a-feature-being/m-p/12947407#M7448</guid>
      <dc:creator>Curtis_W</dc:creator>
      <dc:date>2024-08-08T16:30:27Z</dc:date>
    </item>
    <item>
      <title>Re: Is there anything in the API that lets me access a feature being "adaptive"?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/is-there-anything-in-the-api-that-lets-me-access-a-feature-being/m-p/12947596#M7449</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/105031"&gt;@Curtis_W&lt;/a&gt;&amp;nbsp; &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7812054"&gt;@WCrihfield&lt;/a&gt;&amp;nbsp; How about this, would I be able to make the feature adaptive with a true/false checkbox, so that I wouldn't have to also go RMC the feature?&lt;/P&gt;</description>
      <pubDate>Thu, 08 Aug 2024 17:44:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/is-there-anything-in-the-api-that-lets-me-access-a-feature-being/m-p/12947596#M7449</guid>
      <dc:creator>chris</dc:creator>
      <dc:date>2024-08-08T17:44:49Z</dc:date>
    </item>
    <item>
      <title>Re: Is there anything in the API that lets me access a feature being "adaptive"?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/is-there-anything-in-the-api-that-lets-me-access-a-feature-being/m-p/12947618#M7450</link>
      <description>&lt;P&gt;I think I found a way do to this using that Event I mentioned (&lt;A href="https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=ModelingEvents_OnFeatureChange" target="_blank" rel="noopener"&gt;ModelingEvents.OnFeatureChange&lt;/A&gt;&amp;nbsp;).&amp;nbsp; It was just slightly more complicated than I had in mind.&amp;nbsp; I created an iLogic rule example, just for testing purposes, and it seems to be working just as planned so far in my testing.&amp;nbsp; That Event is for every model document, across the whole application, the entire time Inventor is running, so I had to come up with a way to limit that to only focusing on one document, and only while that one document is open, then get rid of itself when that one document closed.&amp;nbsp; So, this example includes 2 ways to get rid of the EventHandlers after they have been launched.&amp;nbsp; One way is using an iLogic SharedVariable, where I can change the value of that from another rule, then run the original rule again which senses the changed value, then removes them.&amp;nbsp; I have been using that method for years.&amp;nbsp; The other one is subscribing to the DocumentEvents.OnClose event for that specific document.&amp;nbsp; And when that event happens, it gets rid of the event mentioned above, and eliminates the OnClose one because the document is no longer available.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Next, I had to declare several variables between the routines, so that they would be held in memory while the EventHandlers were still running, and could hold on to a value between the 'before' &amp;amp; 'after' timing of the event, so that they could be compared to each other.&amp;nbsp; Since this event gives us a reference to both the document and the feature, I first check if the document matches the one we want to monitor, and if not, it does not respond.&amp;nbsp; Next it records the Feature.Adaptive status to those variables during both before and after timing, then compares the variables values during after timing to see if they are different.&amp;nbsp; Then the code only responds when they are different.&amp;nbsp; Then it just collects data from the 'Context' (none in this specific case) and writes a report about this event and the status change to the iLogic Log window.&amp;nbsp; The whole part where it checks Context and writes a Logger report out could be replaced with a call to run an iLogic rule instead, or just put some simple code in there to do a task like what you are trying to do above.&lt;/P&gt;
&lt;P&gt;The test code example is attached as a text file, because it is rather long.&amp;nbsp; I did include a lot of comments in there, and left some of my other Logger statements in there, but commented out.&amp;nbsp; You can get rid of those to reduce code size and clutter.&amp;nbsp; If you have questions, feel free to ask them.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Aug 2024 18:01:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/is-there-anything-in-the-api-that-lets-me-access-a-feature-being/m-p/12947618#M7450</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2024-08-08T18:01:02Z</dc:date>
    </item>
    <item>
      <title>Re: Is there anything in the API that lets me access a feature being "adaptive"?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/is-there-anything-in-the-api-that-lets-me-access-a-feature-being/m-p/12947619#M7451</link>
      <description>&lt;P&gt;Any checkbox you put into an iLogic Form would have to be backed by a UserParameter with Boolean units.&amp;nbsp; So back to what Curtis suggested as far as that goes.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Aug 2024 18:03:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/is-there-anything-in-the-api-that-lets-me-access-a-feature-being/m-p/12947619#M7451</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2024-08-08T18:03:25Z</dc:date>
    </item>
  </channel>
</rss>

