<?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: Object type 'System.__ComObject' cannot be converted to 'Inventor.ComponentO in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/object-type-system-comobject-cannot-be-converted-to-inventor/m-p/9448813#M108112</link>
    <description>&lt;P&gt;Quite a bit more playing, the root of it all appears to be stemmed from some declarations...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;Sub&lt;/SPAN&gt; &lt;SPAN&gt;FlatPlanes&lt;/SPAN&gt;
&lt;SPAN&gt;CreateFlatPlanes&lt;/SPAN&gt; = &lt;SPAN&gt;False&lt;/SPAN&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;Document&lt;/SPAN&gt; = &lt;SPAN&gt;ThisDoc&lt;/SPAN&gt;.&lt;SPAN&gt;Document&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oAsmCompDef&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  'Error occurs here&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;At this point, I get this error after the file is saved..&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;&amp;nbsp;Error in rule: Plane Generator, in document: Plane Int Test.iam&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;Member not found. (Exception from HRESULT: 0x80020003 (DISP_E_MEMBERNOTFOUND))&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;Making this document declaration change...&lt;/FONT&gt;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;Sub&lt;/SPAN&gt; &lt;SPAN&gt;FlatPlanes&lt;/SPAN&gt;
&lt;SPAN&gt;CreateFlatPlanes&lt;/SPAN&gt; = &lt;SPAN&gt;False&lt;/SPAN&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;Assembly&lt;FONT color="#FF0000"&gt;Document&lt;/FONT&gt;&lt;/SPAN&gt; = &lt;SPAN&gt;ThisDoc&lt;/SPAN&gt;.&lt;SPAN&gt;Document&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oAsmCompDef&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 'Error occurs here&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;SPAN&gt;Gives me this error instead...&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;Error in rule: Plane Generator, in document: Plane Int Test.iam&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;Object of type 'System.__ComObject' cannot be converted to type 'Inventor.ComponentOccurrence'.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;For some reason, I am now getting errors when I try to declare a variable name for my assembly component definitions.&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 16 Apr 2020 20:06:43 GMT</pubDate>
    <dc:creator>llorden4</dc:creator>
    <dc:date>2020-04-16T20:06:43Z</dc:date>
    <item>
      <title>Object type 'System.__ComObject' cannot be converted to 'Inventor.ComponentOccur</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/object-type-system-comobject-cannot-be-converted-to-inventor/m-p/9446252#M108078</link>
      <description>&lt;P&gt;I'm baffled on this error, I've run into it before typically with Event Triggers that conflict with iLogic for some reason (such as run rule on file open).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've added a New Rule to one of my template files and am now constantly getting this error run my other "tried and proven" rules is fired after an object has been installed.&amp;nbsp; What's baffling to me is that the rules run just fine (still) as-is in my previous file and is un-altered.&amp;nbsp; Suppressing the new rule does not make this error go away.&amp;nbsp; It's nothing terribly complex, I am creating a series of planes and then moving them into a folder in an assembly file (no other action).&amp;nbsp; Removing ALL event triggers does nothing to stop this here either.&lt;/P&gt;&lt;P&gt;Error Message:&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;Error in rule: Plane Generator, in document: Plane Int Test.iam&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;Object of type 'System.__ComObject' cannot be converted to type 'Inventor.ComponentOccurrence'&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;More Info:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;System.Runtime.InteropServices.COMException (0x80004005): Object of type 'System.__ComObject' cannot be converted to type 'Inventor.ComponentOccurrence'.&lt;BR /&gt;at System.RuntimeType.ForwardCallToInvokeMember(String memberName, BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData&amp;amp; msgData)&lt;BR /&gt;at Inventor.BrowserPaneObject.AddBrowserFolder(String Name, Object BrowserNodes)&lt;BR /&gt;at LmiRuleScript.FlatPlanes()&lt;BR /&gt;at LmiRuleScript.Main()&lt;BR /&gt;at Autodesk.iLogic.Exec.AppDomExec.ExecRuleInAssembly(Assembly assem)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;at iLogic.RuleEvalContainer.ExecRuleEval(String execRule)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;FONT color="#000000"&gt;I have located the error to be occurring in this section of iLogic, I can Try/Catch to skip but the result means I don't get these moved to a folder.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;PlaneClear&lt;/SPAN&gt; = &lt;SPAN&gt;True&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt;
	&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oFolder&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;BrowserFolder&lt;/SPAN&gt; = &lt;SPAN&gt;Nothing&lt;/SPAN&gt;
	&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oTopNode&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;BrowserNode&lt;/SPAN&gt; = &lt;SPAN&gt;oPane&lt;/SPAN&gt;.&lt;SPAN&gt;TopNode&lt;/SPAN&gt;
	&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;plFlatNodes&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;ObjectCollection&lt;/SPAN&gt; = &lt;SPAN&gt;ThisApplication&lt;/SPAN&gt;.&lt;SPAN&gt;TransientObjects&lt;/SPAN&gt;.&lt;SPAN&gt;CreateObjectCollection&lt;/SPAN&gt;
	&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oNode&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;BrowserNode&lt;/SPAN&gt;
	&lt;SPAN&gt;For&lt;/SPAN&gt; &lt;SPAN&gt;Each&lt;/SPAN&gt; &lt;SPAN&gt;oNode&lt;/SPAN&gt; &lt;SPAN&gt;In&lt;/SPAN&gt; &lt;SPAN&gt;oTopNode&lt;/SPAN&gt;.&lt;SPAN&gt;BrowserNodes&lt;/SPAN&gt;
		&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;idx&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Integer&lt;/SPAN&gt;: &lt;SPAN&gt;idx&lt;/SPAN&gt; = &lt;SPAN&gt;InStr&lt;/SPAN&gt;(&lt;SPAN&gt;oNode&lt;/SPAN&gt;.&lt;SPAN&gt;FullPath&lt;/SPAN&gt;, &lt;SPAN&gt;"Plane "&lt;/SPAN&gt;)
		&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;idx&lt;/SPAN&gt; &amp;gt; 0 &lt;SPAN&gt;Then&lt;/SPAN&gt; &lt;SPAN&gt;Call&lt;/SPAN&gt; &lt;SPAN&gt;plFlatNodes&lt;/SPAN&gt;.&lt;SPAN&gt;Add&lt;/SPAN&gt;(&lt;SPAN&gt;oNode&lt;/SPAN&gt;)
	&lt;SPAN&gt;Next&lt;/SPAN&gt; &lt;SPAN&gt;oNode&lt;/SPAN&gt;
	&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;plFlatNodes&lt;/SPAN&gt;.&lt;SPAN&gt;Count&lt;/SPAN&gt; &amp;gt; 0 &lt;SPAN&gt;Then&lt;/SPAN&gt; &lt;SPAN&gt;oFolder&lt;/SPAN&gt; = &lt;SPAN&gt;oPane&lt;/SPAN&gt;.&lt;SPAN&gt;AddBrowserFolder&lt;/SPAN&gt;(&lt;SPAN&gt;"WorkPlanes - Flat"&lt;/SPAN&gt;, &lt;SPAN&gt;plFlatNodes&lt;/SPAN&gt;)
&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;FONT color="#000000"&gt;Any ideas on what's might be triggering this issue and a means to catch/prevent the error?&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Apr 2020 22:36:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/object-type-system-comobject-cannot-be-converted-to-inventor/m-p/9446252#M108078</guid>
      <dc:creator>llorden4</dc:creator>
      <dc:date>2020-04-15T22:36:02Z</dc:date>
    </item>
    <item>
      <title>Re: Object type 'System.__ComObject' cannot be converted to 'Inventor.ComponentO</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/object-type-system-comobject-cannot-be-converted-to-inventor/m-p/9447049#M108085</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/560097"&gt;@llorden4&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm sorry to hear you're having troubles with your new rule.&lt;/P&gt;
&lt;P&gt;Which version of Inventor are you working on?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are you certain that the error is caused by your provided code? From the exception it appears that the rule is not able to cast a previously defined object to the type "ComponentOccurrence". In your snippet you don't have any objects related to that type.&lt;/P&gt;
&lt;P&gt;When running just that snippet in a document, it works as expected on my end.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Would you be able to provide more of your code? Specifically where you use "&lt;SPAN&gt;LmiRuleScript.FlatPlanes()"&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Many thanks,&lt;/P&gt;
&lt;P&gt;Tobias&lt;/P&gt;</description>
      <pubDate>Thu, 16 Apr 2020 08:54:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/object-type-system-comobject-cannot-be-converted-to-inventor/m-p/9447049#M108085</guid>
      <dc:creator>tobias.orlow</dc:creator>
      <dc:date>2020-04-16T08:54:18Z</dc:date>
    </item>
    <item>
      <title>Re: Object type 'System.__ComObject' cannot be converted to 'Inventor.ComponentO</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/object-type-system-comobject-cannot-be-converted-to-inventor/m-p/9447892#M108094</link>
      <description>&lt;P&gt;An overnight PC power-off solved my problem.&amp;nbsp; Restarting Inventor and a Re-boot of the PC did not clear this error, but a new day did.&amp;nbsp; That's what I call weird.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Inventor Pro 2018.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Apr 2020 14:00:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/object-type-system-comobject-cannot-be-converted-to-inventor/m-p/9447892#M108094</guid>
      <dc:creator>llorden4</dc:creator>
      <dc:date>2020-04-16T14:00:21Z</dc:date>
    </item>
    <item>
      <title>Re: Object type 'System.__ComObject' cannot be converted to 'Inventor.ComponentO</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/object-type-system-comobject-cannot-be-converted-to-inventor/m-p/9448023#M108097</link>
      <description>&lt;P&gt;I spoke too soon... problem is back but I have more details to offer.&lt;/P&gt;&lt;P&gt;When I open the template, the rules work just fine.&amp;nbsp; When I "Save As" to a desired work location this error now occurs.&amp;nbsp; Haven't added any objects, the only task performed was the save-as.&amp;nbsp; Until that point, I can run and re-run these rules as many times as I like.&amp;nbsp; It's never been a problem before, so I'm at a loss why now there's an issue just because a new rule was added to the list.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Blank template attached for the whole shabang...&amp;nbsp; &amp;nbsp;Toggle the Parameter "CreateFlatPlanes" to True to activate rule.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm unfamiliar with your comment on&amp;nbsp;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;LmiRuleScript.FlatPlanes()", perhaps this is a missing link I've managed without until now?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Apr 2020 14:44:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/object-type-system-comobject-cannot-be-converted-to-inventor/m-p/9448023#M108097</guid>
      <dc:creator>llorden4</dc:creator>
      <dc:date>2020-04-16T14:44:40Z</dc:date>
    </item>
    <item>
      <title>Re: Object type 'System.__ComObject' cannot be converted to 'Inventor.ComponentO</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/object-type-system-comobject-cannot-be-converted-to-inventor/m-p/9448813#M108112</link>
      <description>&lt;P&gt;Quite a bit more playing, the root of it all appears to be stemmed from some declarations...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;Sub&lt;/SPAN&gt; &lt;SPAN&gt;FlatPlanes&lt;/SPAN&gt;
&lt;SPAN&gt;CreateFlatPlanes&lt;/SPAN&gt; = &lt;SPAN&gt;False&lt;/SPAN&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;Document&lt;/SPAN&gt; = &lt;SPAN&gt;ThisDoc&lt;/SPAN&gt;.&lt;SPAN&gt;Document&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oAsmCompDef&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  'Error occurs here&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;At this point, I get this error after the file is saved..&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;&amp;nbsp;Error in rule: Plane Generator, in document: Plane Int Test.iam&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;Member not found. (Exception from HRESULT: 0x80020003 (DISP_E_MEMBERNOTFOUND))&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;Making this document declaration change...&lt;/FONT&gt;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;Sub&lt;/SPAN&gt; &lt;SPAN&gt;FlatPlanes&lt;/SPAN&gt;
&lt;SPAN&gt;CreateFlatPlanes&lt;/SPAN&gt; = &lt;SPAN&gt;False&lt;/SPAN&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;Assembly&lt;FONT color="#FF0000"&gt;Document&lt;/FONT&gt;&lt;/SPAN&gt; = &lt;SPAN&gt;ThisDoc&lt;/SPAN&gt;.&lt;SPAN&gt;Document&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oAsmCompDef&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 'Error occurs here&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;SPAN&gt;Gives me this error instead...&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;Error in rule: Plane Generator, in document: Plane Int Test.iam&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;Object of type 'System.__ComObject' cannot be converted to type 'Inventor.ComponentOccurrence'.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;For some reason, I am now getting errors when I try to declare a variable name for my assembly component definitions.&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Apr 2020 20:06:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/object-type-system-comobject-cannot-be-converted-to-inventor/m-p/9448813#M108112</guid>
      <dc:creator>llorden4</dc:creator>
      <dc:date>2020-04-16T20:06:43Z</dc:date>
    </item>
    <item>
      <title>Re: Object type 'System.__ComObject' cannot be converted to 'Inventor.ComponentO</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/object-type-system-comobject-cannot-be-converted-to-inventor/m-p/9449704#M108120</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/560097"&gt;@llorden4&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for the update. My bad, the LmiRuleScript is class behind the scenes, but the new code you provided seems to be closer to the root of the issue.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you try declaring&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;SPAN&gt;oAsmCompDef&lt;/SPAN&gt; as WeldmentComponentDefinition&lt;/PRE&gt;
&lt;P&gt;in case the used template is a weldment assembly, do the same in your "Sub FacePlanes()", and let me know if the behavior changes?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The only declaration of type ComponentOccurrence I can see is in the 'for each.. loop' also in Sub FacePlanes(),&amp;nbsp; you could try changing it like&lt;/P&gt;
&lt;PRE&gt;For Each tComp as Object in tComps&lt;/PRE&gt;
&lt;P&gt;to try to let the compiler cast the type.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Many thanks,&lt;/P&gt;
&lt;P&gt;Tobias&lt;/P&gt;</description>
      <pubDate>Fri, 17 Apr 2020 07:07:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/object-type-system-comobject-cannot-be-converted-to-inventor/m-p/9449704#M108120</guid>
      <dc:creator>tobias.orlow</dc:creator>
      <dc:date>2020-04-17T07:07:24Z</dc:date>
    </item>
    <item>
      <title>Re: Object type 'System.__ComObject' cannot be converted to 'Inventor.ComponentO</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/object-type-system-comobject-cannot-be-converted-to-inventor/m-p/9450621#M108127</link>
      <description>&lt;P&gt;I'm getting the same results.&amp;nbsp; While I'm in the file and working on it, everything works good.&amp;nbsp; As soon as I "Save-As" another filename the same error returns.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I do not get the error using a simple "Save", I can re-open the file, run the rules, no problem.&amp;nbsp; Closing and re-opening the "save-as" file still results in the error.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Apr 2020 13:38:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/object-type-system-comobject-cannot-be-converted-to-inventor/m-p/9450621#M108127</guid>
      <dc:creator>llorden4</dc:creator>
      <dc:date>2020-04-17T13:38:40Z</dc:date>
    </item>
    <item>
      <title>Re: Object type 'System.__ComObject' cannot be converted to 'Inventor.ComponentO</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/object-type-system-comobject-cannot-be-converted-to-inventor/m-p/9450723#M108130</link>
      <description>&lt;P&gt;Just tried this on Inv 2021 and works fine in that version.&amp;nbsp; Looks like I may be forced to update.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Apr 2020 14:24:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/object-type-system-comobject-cannot-be-converted-to-inventor/m-p/9450723#M108130</guid>
      <dc:creator>llorden4</dc:creator>
      <dc:date>2020-04-17T14:24:15Z</dc:date>
    </item>
    <item>
      <title>Re: Object type 'System.__ComObject' cannot be converted to 'Inventor.ComponentO</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/object-type-system-comobject-cannot-be-converted-to-inventor/m-p/9450733#M108131</link>
      <description>&lt;P&gt;Hi &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/560097"&gt;@llorden4&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Which version is it not working in?&lt;/P&gt;
&lt;P&gt;I'll give it a try with your steps to reproduce then.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Apr 2020 14:27:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/object-type-system-comobject-cannot-be-converted-to-inventor/m-p/9450733#M108131</guid>
      <dc:creator>tobias.orlow</dc:creator>
      <dc:date>2020-04-17T14:27:05Z</dc:date>
    </item>
    <item>
      <title>Re: Object type 'System.__ComObject' cannot be converted to 'Inventor.ComponentO</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/object-type-system-comobject-cannot-be-converted-to-inventor/m-p/9450741#M108132</link>
      <description>&lt;P&gt;We are running Inventor Pro 2018.3.9&lt;/P&gt;</description>
      <pubDate>Fri, 17 Apr 2020 14:30:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/object-type-system-comobject-cannot-be-converted-to-inventor/m-p/9450741#M108132</guid>
      <dc:creator>llorden4</dc:creator>
      <dc:date>2020-04-17T14:30:10Z</dc:date>
    </item>
    <item>
      <title>Re: Object type 'System.__ComObject' cannot be converted to 'Inventor.ComponentO</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/object-type-system-comobject-cannot-be-converted-to-inventor/m-p/9450921#M108135</link>
      <description>&lt;P&gt;Interesting turn of events, now that I've installed 2021 and have gone back to 2018 to resume developing, the error no longer appears on my station but still does on other stations that haven't done so.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What feature of installation bleeds over to a previous install that might be the fix?&lt;/P&gt;</description>
      <pubDate>Fri, 17 Apr 2020 15:28:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/object-type-system-comobject-cannot-be-converted-to-inventor/m-p/9450921#M108135</guid>
      <dc:creator>llorden4</dc:creator>
      <dc:date>2020-04-17T15:28:06Z</dc:date>
    </item>
  </channel>
</rss>

