<?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: Component Edit in 2013 in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/component-edit-in-2013/m-p/3750836#M132998</link>
    <description>&lt;P&gt;ps. I'm running SP1.1&lt;/P&gt;</description>
    <pubDate>Fri, 11 Jan 2013 08:59:22 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2013-01-11T08:59:22Z</dc:date>
    <item>
      <title>Component Edit in 2013</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/component-edit-in-2013/m-p/3740496#M132995</link>
      <description>&lt;P&gt;I've just upgraded from 2011 to 2013 and come across this problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In 2011 I could edit a component from the top level anywhere in the tree - i.e. From an iLogic rule in the top level, I could edit a component in a subassembly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This doesn't seem to work in 2013 - I can only edit the first child of a component.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In 2011 I could simply use :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;compo = Component.InventorComponent("TOP")
compo.Edit&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Has anybody else come across this? Is there a workaround?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for any help,&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;</description>
      <pubDate>Thu, 20 Dec 2012 09:52:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/component-edit-in-2013/m-p/3740496#M132995</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-12-20T09:52:13Z</dc:date>
    </item>
    <item>
      <title>Re: Component Edit in 2013</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/component-edit-in-2013/m-p/3750800#M132996</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I seemed not to reproduce this issue. Probably I did not get the scenario correctly. Could you elaborate the steps and provide a copy of the assemblies you are using?&lt;/P&gt;</description>
      <pubDate>Fri, 11 Jan 2013 07:27:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/component-edit-in-2013/m-p/3750800#M132996</guid>
      <dc:creator>xiaodong_liang</dc:creator>
      <dc:date>2013-01-11T07:27:52Z</dc:date>
    </item>
    <item>
      <title>Re: Component Edit in 2013</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/component-edit-in-2013/m-p/3750828#M132997</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have attached a simple example of the issue. The rule in the top level demonstrates it.&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG border="0" alt="compedit.jpg" align="center" title="compedit.jpg" src="https://forums.autodesk.com/t5/image/serverpage/image-id/45839i361F9F3C7BD9A2BF/image-size/original?v=mpbl-1&amp;amp;px=-1" /&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;</description>
      <pubDate>Fri, 11 Jan 2013 08:48:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/component-edit-in-2013/m-p/3750828#M132997</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-01-11T08:48:09Z</dc:date>
    </item>
    <item>
      <title>Re: Component Edit in 2013</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/component-edit-in-2013/m-p/3750836#M132998</link>
      <description>&lt;P&gt;ps. I'm running SP1.1&lt;/P&gt;</description>
      <pubDate>Fri, 11 Jan 2013 08:59:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/component-edit-in-2013/m-p/3750836#M132998</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-01-11T08:59:22Z</dc:date>
    </item>
    <item>
      <title>Re: Component Edit in 2013</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/component-edit-in-2013/m-p/3756196#M132999</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have no Inventror 2012 at this moment, so cannot test how Inventor 2012 works. But firstly, I do not think this line is correct &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;EM&gt;&lt;FONT color="#999999"&gt; &amp;nbsp; oOcc = Component.InventorComponent("Part1:1")&lt;/FONT&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;FONT color="#999999"&gt;&amp;nbsp; &amp;nbsp; oOcc.Edit&lt;/FONT&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="line-height: 14px;"&gt;becasue&amp;nbsp;Component.InventorComponent returns the occurrence in the current context. In this case, it is top assembly. While part1:1 is in sub assembly.&amp;nbsp;&lt;/SPAN&gt;So I thought&amp;nbsp;it should be&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &lt;EM&gt;&lt;FONT color="#999999"&gt;&amp;nbsp; oOcc = Component.InventorComponent(&lt;STRONG&gt;MakePath&lt;/STRONG&gt;("subassy","Part1:1"))&lt;/FONT&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&lt;FONT color="#999999"&gt;&amp;nbsp; &amp;nbsp; oOcc.Edit&lt;/FONT&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;this does not work either. But it is not strange to me because the occurrence got by this line is still in the context of sub assembly. While in top assembly, it should be proxy occurrence.&amp;nbsp;So I thought it should be&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&lt;FONT color="#999999"&gt;&amp;nbsp; ' Try To Get proxy occurrence In top Assembly&lt;/FONT&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;FONT color="#999999"&gt;&amp;nbsp; &amp;nbsp;oOcc = Component.InventorComponent("subassy")&lt;/FONT&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;FONT color="#999999"&gt;&amp;nbsp; &amp;nbsp;oSubOcc = Component.InventorComponent(MakePath("subassy","Part1:1")) &lt;/FONT&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;FONT color="#999999"&gt;&amp;nbsp; Dim oTempObj As Object&lt;/FONT&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;FONT color="#999999"&gt;&amp;nbsp; &amp;nbsp;'oOcc.CreateGeometryProxy(oSubOcc,oTempObj) ' failed at this line&amp;nbsp;&lt;/FONT&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;FONT color="#999999"&gt;&amp;nbsp; &amp;nbsp;Dim oProxyOcc as ComponentOccurrenceProxy&lt;/FONT&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;FONT color="#999999"&gt;&amp;nbsp; &amp;nbsp;oProxyOcc = oTempObj&lt;/FONT&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;FONT color="#999999"&gt;&amp;nbsp; &amp;nbsp;oProxyOcc.Edit&lt;/FONT&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Unfortunetly, it failed at&amp;nbsp;&lt;SPAN&gt;CreateGeometryProxy.&amp;nbsp;&lt;/SPAN&gt;Finally, I have to use Inventor API directly. i.e. get the occurrence from assembly, instead of using the wrapped functions of iLogic. It works well.&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I cannot say if there is problems with&amp;nbsp;&lt;SPAN&gt;InventorComponent. These are what I can see. Hope the final workaround helps you.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;SPAN&gt;'&lt;/SPAN&gt;&lt;SPAN&gt;works :&lt;/SPAN&gt;&lt;SPAN&gt;
'&lt;/SPAN&gt;&lt;SPAN&gt;oOcc = Component.InventorComponent("subassy")&lt;/SPAN&gt;&lt;SPAN&gt;
'&lt;/SPAN&gt;&lt;SPAN&gt;oOcc.Edit&lt;/SPAN&gt;
&lt;SPAN&gt;'&lt;/SPAN&gt;&lt;SPAN&gt; does not work&lt;/SPAN&gt;&lt;SPAN&gt;
'&lt;/SPAN&gt;&lt;SPAN&gt;oOcc = Component.InventorComponent("Part1:1")&lt;/SPAN&gt;&lt;SPAN&gt;
'&lt;/SPAN&gt;&lt;SPAN&gt;oOcc.Edit&lt;/SPAN&gt;
&lt;SPAN&gt;'&lt;/SPAN&gt;&lt;SPAN&gt;doesn't work either because the occurrence is in the context of sub assembly&lt;/SPAN&gt;&lt;SPAN&gt;
'&lt;/SPAN&gt;&lt;SPAN&gt;oOcc = Component.InventorComponent(MakePath("subassy","Part1:1"))&lt;/SPAN&gt;&lt;SPAN&gt;
'&lt;/SPAN&gt;&lt;SPAN&gt;oOcc.Edit&lt;/SPAN&gt;

&lt;SPAN&gt;'&lt;/SPAN&gt;&lt;SPAN&gt;Try To Get proxy occurrence In top Assembly&lt;/SPAN&gt;&lt;SPAN&gt;
'&lt;/SPAN&gt;&lt;SPAN&gt;oOcc = Component.InventorComponent("subassy")&lt;/SPAN&gt;&lt;SPAN&gt;
'&lt;/SPAN&gt;&lt;SPAN&gt;oSubOcc = Component.InventorComponent(MakePath("subassy","Part1:1")) &lt;/SPAN&gt;&lt;SPAN&gt;
'&lt;/SPAN&gt;&lt;SPAN&gt;Dim oTempObj As Object&lt;/SPAN&gt;&lt;SPAN&gt;
'&lt;/SPAN&gt;&lt;SPAN&gt;'oOcc.CreateGeometryProxy(oSubOcc,oTempObj)  ' failed at this line&lt;/SPAN&gt;&lt;SPAN&gt;
'&lt;/SPAN&gt;&lt;SPAN&gt; Dim oProxyOcc as ComponentOccurrenceProxy&lt;/SPAN&gt;&lt;SPAN&gt;
'&lt;/SPAN&gt;&lt;SPAN&gt;oProxyOcc = oTempObj&lt;/SPAN&gt;&lt;SPAN&gt;
'&lt;/SPAN&gt;&lt;SPAN&gt; oProxyOcc.Edit&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG&gt;' use Inventor API directly
' works!Dim oAssDef As AssemblyComponentDefinition
oAssDef = ThisApplication.ActiveDocument.ComponentDefinition

Dim oOcc As ComponentOccurrence
oOcc = oAssDef.Occurrences.ItemByName("subassy")

Dim oSubOcc As ComponentOccurrence
'oSubOcc = oOcc.SubOccurrences(1)   'SubOccurrences does not support ItemByName&lt;BR /&gt;oSubOcc = oOcc.Definition.Occurrences.ItemByName("Part1:1")

'oSubOcc is  in the context of sub assembly
' to edit it in the context of top assembly, need  proxy of occurrenceDim oTempObj As Object
oOcc.CreateGeometryProxy(oSubOcc, oTempObj)
Dim oSubOccProxy As ComponentOccurrenceProxy
oSubOccProxy = oTempObj

oSubOccProxy.Edit

&lt;/STRONG&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Jan 2013 06:33:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/component-edit-in-2013/m-p/3756196#M132999</guid>
      <dc:creator>xiaodong_liang</dc:creator>
      <dc:date>2013-01-18T06:33:08Z</dc:date>
    </item>
    <item>
      <title>Re: Component Edit in 2013</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/component-edit-in-2013/m-p/3756287#M133000</link>
      <description>&lt;P&gt;Thanks for that, it's interesting.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In iLogic I don't HAVE to explicitly declare my variables, so&lt;STRONG&gt; in theory&lt;/STRONG&gt; I should be able to use :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;oOcc = Component.InventorComponent("subassy")
oSubOcc = oOcc.Definition.Occurrences.ItemByName("Part1:1")
oOcc.CreateGeometryProxy(oSubOcc, oTempObj)

oTempObj.Edit()&lt;/PRE&gt;&lt;P&gt;However, I get a Type Mismatch error.&lt;/P&gt;&lt;P&gt;If I declare oOcc as ComponentOccurrence it works fine :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Dim oOcc As ComponentOccurrence
oOcc = Component.InventorComponent("subassy")
oSubOcc = oOcc.Definition.Occurrences.ItemByName("Part1:1")
oOcc.CreateGeometryProxy(oSubOcc, oTempObj)

oTempObj.Edit()&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does that suggest that there is an issue with the object being returned from the Component.InventorComponent() function ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;</description>
      <pubDate>Fri, 18 Jan 2013 10:19:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/component-edit-in-2013/m-p/3756287#M133000</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-01-18T10:19:12Z</dc:date>
    </item>
    <item>
      <title>Re: Component Edit in 2013</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/component-edit-in-2013/m-p/3756295#M133001</link>
      <description>&lt;P&gt;Ps. The type mismatch error comes from the line :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;oOcc.CreateGeometryProxy(oSubOcc, oTempObj)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Jan 2013 10:27:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/component-edit-in-2013/m-p/3756295#M133001</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-01-18T10:27:07Z</dc:date>
    </item>
    <item>
      <title>Re: Component Edit in 2013</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/component-edit-in-2013/m-p/3759362#M133002</link>
      <description>&lt;P&gt;this was why I commented it as "failed at this line". &amp;nbsp;I do not know how the wrapped function&amp;nbsp;Component.InventorComponent is implemented, however it looks problematic in this scenario, at least from what we saw.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Jan 2013 01:08:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/component-edit-in-2013/m-p/3759362#M133002</guid>
      <dc:creator>xiaodong_liang</dc:creator>
      <dc:date>2013-01-23T01:08:17Z</dc:date>
    </item>
    <item>
      <title>Re: Component Edit in 2013</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/component-edit-in-2013/m-p/3904154#M133003</link>
      <description>&lt;P&gt;Tom,&lt;BR /&gt;&amp;nbsp;The behavior of&amp;nbsp;Component.InventorComponent changed in 2013. There's a new function:&lt;/P&gt;
&lt;P&gt;compo = Component.InventorComponentInThisContext("TOP")&lt;BR /&gt;compo.Edit&lt;BR /&gt;&lt;BR /&gt;It will give you a ComponentOccurrenceProxy if the component is in a subassembly.&lt;/P&gt;</description>
      <pubDate>Fri, 03 May 2013 04:11:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/component-edit-in-2013/m-p/3904154#M133003</guid>
      <dc:creator>MjDeck</dc:creator>
      <dc:date>2013-05-03T04:11:08Z</dc:date>
    </item>
    <item>
      <title>Re: Component Edit in 2013</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/component-edit-in-2013/m-p/3904447#M133004</link>
      <description>&lt;P&gt;Mike,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks very much for the reply, that's exaclty what I was looking for.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Are these iLogic / API changes documented anywhere?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 14px;"&gt;I ask because we have another issue with Constraint.IsActive() sometimes returning an error "Cannot complete the function ConstraintIsActive("XX")" which we never had in 2011, and I can't figure out why.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 14px;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 14px;"&gt;Thanks again,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 14px;"&gt;Tom&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 03 May 2013 08:21:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/component-edit-in-2013/m-p/3904447#M133004</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-05-03T08:21:08Z</dc:date>
    </item>
    <item>
      <title>Re: Component Edit in 2013</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/component-edit-in-2013/m-p/3905484#M133005</link>
      <description>&lt;P&gt;InventorComponentInThisContext is not documented yet.&lt;BR /&gt;Can you post more details about the Constraint.IsActive failure, maybe with a sample model?&lt;/P&gt;</description>
      <pubDate>Fri, 03 May 2013 15:25:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/component-edit-in-2013/m-p/3905484#M133005</guid>
      <dc:creator>MjDeck</dc:creator>
      <dc:date>2013-05-03T15:25:39Z</dc:date>
    </item>
    <item>
      <title>Re: Component Edit in 2013</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/component-edit-in-2013/m-p/3905567#M133006</link>
      <description>&lt;P&gt;The ConstraintIsActive error is a strange one and has been bugging me for months.&lt;/P&gt;&lt;P&gt;I THINK it happens when the Design Doctor is showing an issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anyway, I posted a topic about it here :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A target="_blank" href="https://forums.autodesk.com/t5/Autodesk-Inventor-Customization/Strange-Constraint-IsActive-Error/m-p/3768704#M42148"&gt;http://forums.autodesk.com/t5/Autodesk-Inventor-Customization/Strange-Constraint-IsActive-Error/m-p/3768704#M42148&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In which I've just uploaded an example model.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;</description>
      <pubDate>Fri, 03 May 2013 16:19:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/component-edit-in-2013/m-p/3905567#M133006</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-05-03T16:19:06Z</dc:date>
    </item>
  </channel>
</rss>

