<?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: Error in Rule - InventorVb.RunMacro in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/error-in-rule-inventorvb-runmacro/m-p/8861987#M98564</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your help. Unfortunately the situation is the same. The macro completed, my costum property made, but I got the error message. I need to use this property in another Rule.&lt;/P&gt;&lt;P&gt;A solution could be for me a rule which can close this error message.&lt;/P&gt;</description>
    <pubDate>Thu, 20 Jun 2019 06:32:31 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-06-20T06:32:31Z</dc:date>
    <item>
      <title>Error in Rule - InventorVb.RunMacro</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/error-in-rule-inventorvb-runmacro/m-p/8861242#M98551</link>
      <description>&lt;P&gt;Hello Everybody,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a macro, which one is working perfectly if I let run it from the Menu (Tools/Macros)&lt;/P&gt;&lt;P&gt;I made a little Rule to start this macro automaticly.&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;InventorVb&lt;/SPAN&gt;.&lt;SPAN&gt;RunMacro&lt;/SPAN&gt;(&lt;SPAN&gt;"ApplicationProject"&lt;/SPAN&gt;, &lt;SPAN&gt;"Module2"&lt;/SPAN&gt;, &lt;SPAN&gt;"Perimeter"&lt;/SPAN&gt;)&lt;/PRE&gt;&lt;P&gt;If I try to use this Rule I got the following message:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Error in rule: Rule0, in document: Part1&lt;/P&gt;&lt;P&gt;User interrupt.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;System.Runtime.InteropServices.COMException (0x80040561): User interrupt.&lt;BR /&gt;at System.RuntimeType.ForwardCallToInvokeMember(String memberName, BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData&amp;amp; msgData)&lt;BR /&gt;at Inventor.InventorVBAMember.Execute(Object&amp;amp; FunctionReturnValue)&lt;BR /&gt;at iLogic.LowLevelInRule.RunMacro(String projectName, String componentName, String macroName, Object[] args)&lt;BR /&gt;at ThisRule.Main()&lt;BR /&gt;at Autodesk.iLogic.Exec.AppDomExec.ExecRuleInAssembly(Assembly assem)&lt;BR /&gt;at iLogic.RuleEvalContainer.ExecRuleEval(String execRule)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately I can't find any solution to solve this problem. Can anybody help for me?&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jun 2019 19:12:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/error-in-rule-inventorvb-runmacro/m-p/8861242#M98551</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-06-19T19:12:00Z</dc:date>
    </item>
    <item>
      <title>Re: Error in Rule - InventorVb.RunMacro</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/error-in-rule-inventorvb-runmacro/m-p/8861443#M98553</link>
      <description>&lt;P&gt;&lt;SPAN style="font-family: inherit;"&gt;Hi, try this ilogic code to trigger a macro, if you can not activate it with the previous code.&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;Dim oP As InventorVBAProject
For Each oP In ThisApplication.VBAProjects
	If oP.Name = "ApplicationProject" Then
	  Dim oC As InventorVBAComponent
	  For Each oC In oP.InventorVBAComponents
	    If oC.Name = "Module1" Then
	      Dim oM As InventorVBAMember
	      For Each oM In oC.InventorVBAMembers
	        If oM.Name = "prueba" Then ' "MyFunction"
	          oM.Execute()
	        End If
	      Next oM
	    End If
	  Next oC
	End If
Next oP&lt;/PRE&gt;&lt;P&gt;Check correctly the location path of the macro, otherwise it will not perform any action&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.jpg" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/648951i5B53151AEBB855BF/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.jpg" alt="1.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;SPAN class="tlid-translation translation"&gt;&lt;SPAN class=""&gt;I hope this helps solve your problem&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jun 2019 20:51:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/error-in-rule-inventorvb-runmacro/m-p/8861443#M98553</guid>
      <dc:creator>Sergio.D.Suárez</dc:creator>
      <dc:date>2019-06-19T20:51:59Z</dc:date>
    </item>
    <item>
      <title>Re: Error in Rule - InventorVb.RunMacro</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/error-in-rule-inventorvb-runmacro/m-p/8861987#M98564</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your help. Unfortunately the situation is the same. The macro completed, my costum property made, but I got the error message. I need to use this property in another Rule.&lt;/P&gt;&lt;P&gt;A solution could be for me a rule which can close this error message.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jun 2019 06:32:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/error-in-rule-inventorvb-runmacro/m-p/8861987#M98564</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-06-20T06:32:31Z</dc:date>
    </item>
    <item>
      <title>Re: Error in Rule - InventorVb.RunMacro</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/error-in-rule-inventorvb-runmacro/m-p/8862098#M98566</link>
      <description>&lt;P&gt;Hi, What kind of error does the rule that provides you?&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jun 2019 07:52:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/error-in-rule-inventorvb-runmacro/m-p/8862098#M98566</guid>
      <dc:creator>Sergio.D.Suárez</dc:creator>
      <dc:date>2019-06-20T07:52:42Z</dc:date>
    </item>
    <item>
      <title>Re: Error in Rule - InventorVb.RunMacro</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/error-in-rule-inventorvb-runmacro/m-p/10831852#M132759</link>
      <description>&lt;P&gt;I have a similar issue. Apparently the "ApplicationProject" was not loading correctly when this was run from a .dll, but worked from a local rule. This resolved it.&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4253164"&gt;@Sergio.D.Suárez&lt;/a&gt;&amp;nbsp; Thank you very much! - Tim&lt;/P&gt;</description>
      <pubDate>Sun, 19 Dec 2021 06:05:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/error-in-rule-inventorvb-runmacro/m-p/10831852#M132759</guid>
      <dc:creator>tmueller6RR3D</dc:creator>
      <dc:date>2021-12-19T06:05:41Z</dc:date>
    </item>
  </channel>
</rss>

