<?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 do delete the Angle Constraint of Selected Components in Assembly ILogic in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-do-delete-the-angle-constraint-of-selected-components-in/m-p/8924543#M99898</link>
    <description>&lt;P&gt;@Anonymous&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try below iLogic code&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Dim oAsm As AssemblyDocument = ThisApplication.ActiveDocument
Dim oAsmCompDef As AssemblyComponentDefinition = oAsm.ComponentDefinition
Line1 :
comp = ThisApplication.CommandManager.Pick(
SelectionFilterEnum.kAssemblyOccurrenceFilter,
"Select a components")

Dim oConstraint As AssemblyConstraint
For Each oConstraint In comp.Constraints
    If oConstraint.Type = kAngleConstraintObject Then
         Call oConstraint.Delete()		 
    End If
Next

GoTo Line1&lt;/PRE&gt;
&lt;P&gt;Thanks and regards,&lt;/P&gt;</description>
    <pubDate>Tue, 23 Jul 2019 06:33:48 GMT</pubDate>
    <dc:creator>chandra.shekar.g</dc:creator>
    <dc:date>2019-07-23T06:33:48Z</dc:date>
    <item>
      <title>How do delete the Angle Constraint of Selected Components in Assembly ILogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-do-delete-the-angle-constraint-of-selected-components-in/m-p/8922636#M99869</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;I want to delete the Angle Constraint of Components which are selecting by me.&lt;BR /&gt;I have tried below Loop code but it showing attached error. Can you please help me to find the error in this code.&lt;BR /&gt;&lt;BR /&gt;Dim oAsm As AssemblyDocument = ThisApplication.ActiveDocument&lt;BR /&gt;Dim oAsmCompDef As AssemblyComponentDefinition = oAsm.ComponentDefinition&lt;BR /&gt;Line1 :&lt;BR /&gt;comp = ThisApplication.CommandManager.Pick(&lt;BR /&gt;SelectionFilterEnum.kAssemblyOccurrenceFilter,&lt;BR /&gt;"Select a components")&lt;BR /&gt;AngleConstraint.Delete(comp)&lt;BR /&gt;GoTo Line1&lt;BR /&gt;&lt;BR /&gt;Thanks &amp;amp; Regards,&lt;BR /&gt;Manoj Sampath&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jul 2019 11:47:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-do-delete-the-angle-constraint-of-selected-components-in/m-p/8922636#M99869</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-07-22T11:47:23Z</dc:date>
    </item>
    <item>
      <title>Re: How do delete the Angle Constraint of Selected Components in Assembly ILogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-do-delete-the-angle-constraint-of-selected-components-in/m-p/8924543#M99898</link>
      <description>&lt;P&gt;@Anonymous&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try below iLogic code&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Dim oAsm As AssemblyDocument = ThisApplication.ActiveDocument
Dim oAsmCompDef As AssemblyComponentDefinition = oAsm.ComponentDefinition
Line1 :
comp = ThisApplication.CommandManager.Pick(
SelectionFilterEnum.kAssemblyOccurrenceFilter,
"Select a components")

Dim oConstraint As AssemblyConstraint
For Each oConstraint In comp.Constraints
    If oConstraint.Type = kAngleConstraintObject Then
         Call oConstraint.Delete()		 
    End If
Next

GoTo Line1&lt;/PRE&gt;
&lt;P&gt;Thanks and regards,&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jul 2019 06:33:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-do-delete-the-angle-constraint-of-selected-components-in/m-p/8924543#M99898</guid>
      <dc:creator>chandra.shekar.g</dc:creator>
      <dc:date>2019-07-23T06:33:48Z</dc:date>
    </item>
    <item>
      <title>Re: How do delete the Angle Constraint of Selected Components in Assembly ILogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-do-delete-the-angle-constraint-of-selected-components-in/m-p/8924549#M99899</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4427777"&gt;@chandra.shekar.g&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi Sir,&lt;/P&gt;&lt;P&gt;I have done some update the Loop Code. Now I'm using below code and it is working fine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dim oAsm As AssemblyDocument&lt;BR /&gt;oAsm = ThisApplication.ActiveDocument&lt;/P&gt;&lt;P&gt;Dim oAsmCompDef As AssemblyComponentDefinition&lt;BR /&gt;oAsmCompDef = oAsm.ComponentDefinition&lt;/P&gt;&lt;P&gt;Line1 :&lt;/P&gt;&lt;P&gt;Dim oComp As ComponentOccurrence&lt;BR /&gt;oComp = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kAssemblyOccurrenceFilter, "Select a components")&lt;/P&gt;&lt;P&gt;If oComp Is Nothing Then&lt;BR /&gt;Exit Sub&lt;BR /&gt;End If&lt;/P&gt;&lt;P&gt;Dim oCons As AssemblyConstraint&lt;/P&gt;&lt;P&gt;For Each oCons In oComp.Constraints&lt;BR /&gt;If oCons.Type = Inventor.ObjectTypeEnum.kAngleConstraintObject Or oCons.Type = Inventor.ObjectTypeEnum.kAngleConstraintProxyObject Then&lt;BR /&gt;oCons.Delete&lt;BR /&gt;End If&lt;BR /&gt;Next&lt;/P&gt;&lt;P&gt;GoTo Line1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Manoj Sampath&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jul 2019 06:37:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-do-delete-the-angle-constraint-of-selected-components-in/m-p/8924549#M99899</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-07-23T06:37:16Z</dc:date>
    </item>
  </channel>
</rss>

