<?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: Get Sketch Line From Geometric Constraint in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/get-sketch-line-from-geometric-constraint/m-p/11466268#M143531</link>
    <description>&lt;P&gt;Hi &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/684354"&gt;@johnster100&lt;/a&gt;.&amp;nbsp; As you might have noticed, the &lt;A href="https://help.autodesk.com/view/INVNTOR/2022/ENU/?guid=GeometricConstraint" target="_blank" rel="noopener"&gt;GeometricConstraint&lt;/A&gt; object is a generic base class for a whole bunch of other more specific types of geometric constraint objects (&lt;A href="https://help.autodesk.com/view/INVNTOR/2022/ENU/?guid=CoincidentConstraint" target="_blank" rel="noopener"&gt;CoincidentConstraint&lt;/A&gt;, &lt;A href="https://help.autodesk.com/view/INVNTOR/2022/ENU/?guid=CollinearConstraint" target="_blank" rel="noopener"&gt;CollinearConstraint&lt;/A&gt;, &lt;A href="https://help.autodesk.com/view/INVNTOR/2022/ENU/?guid=ConcentricConstraint" target="_blank" rel="noopener"&gt;ConcentricConstraint&lt;/A&gt;, etc, etc.).&amp;nbsp; Not all types of geometric constraints have that 'EntityOne' property, so that may be the main problem.&amp;nbsp; It is likely encountering a constraint that does not have that 'EntityOne' property, so that line of code fails.&amp;nbsp; Plus, what if the line is actually the value of the 'EntityTwo' property of one of the ones that has that property, instead of its 'EntityOne' property.&amp;nbsp; Your code will likely have to filter for what more specific Type of constraint it is first, then use the appropriate property check that would work on that type of constraint object.&lt;/P&gt;</description>
    <pubDate>Thu, 06 Oct 2022 15:25:22 GMT</pubDate>
    <dc:creator>WCrihfield</dc:creator>
    <dc:date>2022-10-06T15:25:22Z</dc:date>
    <item>
      <title>Get Sketch Line From Geometric Constraint</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/get-sketch-line-from-geometric-constraint/m-p/11466172#M143526</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm trying to delete all the geometric constraints from a sketchline. I can check the EntityOne and I can see it's the curve I want but the 'Is' statement in the 'If' statement returns false &lt;img class="lia-deferred-image lia-image-emoji" src="https://forums.autodesk.com/html/@F462EEC827775DA92CB03B7FC147D389/emoticons/1f61e.png" alt=":disappointed_face:" title=":disappointed_face:" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What am i doing wrong?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;	&lt;SPAN&gt;For&lt;/SPAN&gt; &lt;SPAN&gt;Each&lt;/SPAN&gt; &lt;SPAN&gt;oConstraint&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;GeometricConstraint&lt;/SPAN&gt; &lt;SPAN&gt;In&lt;/SPAN&gt; &lt;SPAN&gt;oSketch&lt;/SPAN&gt;.&lt;SPAN&gt;GeometricConstraints&lt;/SPAN&gt;
		&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;oConstraint&lt;/SPAN&gt;.&lt;SPAN&gt;EntityOne&lt;/SPAN&gt; &lt;SPAN&gt;is&lt;/SPAN&gt; &lt;SPAN&gt;oL&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt;
			&lt;SPAN&gt;oConstraint&lt;/SPAN&gt;.&lt;SPAN&gt;Delete&lt;/SPAN&gt;
	&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;
	&lt;SPAN&gt;Next&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2022 14:50:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/get-sketch-line-from-geometric-constraint/m-p/11466172#M143526</guid>
      <dc:creator>johnster100</dc:creator>
      <dc:date>2022-10-06T14:50:44Z</dc:date>
    </item>
    <item>
      <title>Re: Get Sketch Line From Geometric Constraint</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/get-sketch-line-from-geometric-constraint/m-p/11466268#M143531</link>
      <description>&lt;P&gt;Hi &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/684354"&gt;@johnster100&lt;/a&gt;.&amp;nbsp; As you might have noticed, the &lt;A href="https://help.autodesk.com/view/INVNTOR/2022/ENU/?guid=GeometricConstraint" target="_blank" rel="noopener"&gt;GeometricConstraint&lt;/A&gt; object is a generic base class for a whole bunch of other more specific types of geometric constraint objects (&lt;A href="https://help.autodesk.com/view/INVNTOR/2022/ENU/?guid=CoincidentConstraint" target="_blank" rel="noopener"&gt;CoincidentConstraint&lt;/A&gt;, &lt;A href="https://help.autodesk.com/view/INVNTOR/2022/ENU/?guid=CollinearConstraint" target="_blank" rel="noopener"&gt;CollinearConstraint&lt;/A&gt;, &lt;A href="https://help.autodesk.com/view/INVNTOR/2022/ENU/?guid=ConcentricConstraint" target="_blank" rel="noopener"&gt;ConcentricConstraint&lt;/A&gt;, etc, etc.).&amp;nbsp; Not all types of geometric constraints have that 'EntityOne' property, so that may be the main problem.&amp;nbsp; It is likely encountering a constraint that does not have that 'EntityOne' property, so that line of code fails.&amp;nbsp; Plus, what if the line is actually the value of the 'EntityTwo' property of one of the ones that has that property, instead of its 'EntityOne' property.&amp;nbsp; Your code will likely have to filter for what more specific Type of constraint it is first, then use the appropriate property check that would work on that type of constraint object.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2022 15:25:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/get-sketch-line-from-geometric-constraint/m-p/11466268#M143531</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2022-10-06T15:25:22Z</dc:date>
    </item>
  </channel>
</rss>

