<?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: ilogic Log , get code Line? in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-log-get-code-line/m-p/10809877#M71844</link>
    <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/105031"&gt;@Curtis_W&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/782848"&gt;@floccipier&lt;/a&gt;&amp;nbsp;, and&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5011186"&gt;@JelteDeJong&lt;/a&gt;&amp;nbsp;: Inventor 2022.2 will show the line number in error messages.&lt;/P&gt;</description>
    <pubDate>Wed, 08 Dec 2021 19:34:06 GMT</pubDate>
    <dc:creator>MjDeck</dc:creator>
    <dc:date>2021-12-08T19:34:06Z</dc:date>
    <item>
      <title>ilogic Log , get code Line?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-log-get-code-line/m-p/9008797#M71836</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/537534"&gt;@MjDeck&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there some way to have the code line of a rule show up in the iLogic Log ? (without having to add it manually)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Something like this where "Current.Line" would just return the line the Debug line is on?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The goal here would be to see the last line number before an error occurred... something like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="111.JPG" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/674444iD75BF46E87B22D4F/image-size/large?v=v2&amp;amp;px=999" role="button" title="111.JPG" alt="111.JPG" /&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;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="222.JPG" style="width: 567px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/674435iA9BE3B53AB6BE4AC/image-size/large?v=v2&amp;amp;px=999" role="button" title="222.JPG" alt="222.JPG" /&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;Even better would be to be able to see the line of code that creates the error in the error message, something like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="555.JPG" style="width: 497px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/674445iC6C7250FD2109EF9/image-size/large?v=v2&amp;amp;px=999" role="button" title="555.JPG" alt="555.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 05 Sep 2019 18:38:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-log-get-code-line/m-p/9008797#M71836</guid>
      <dc:creator>Curtis_W</dc:creator>
      <dc:date>2019-09-05T18:38:03Z</dc:date>
    </item>
    <item>
      <title>Re: ilogic Log , get code Line?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-log-get-code-line/m-p/9009008#M71837</link>
      <description>&lt;P&gt;Hi Curtis,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;It might be possible to show the line number with the error message in a future version.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;There is an alternative that works now: you can debug errors in Visual Studio. That will bring you right to the line in a slightly modified version of the rule.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Sep 2019 20:20:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-log-get-code-line/m-p/9009008#M71837</guid>
      <dc:creator>MjDeck</dc:creator>
      <dc:date>2019-09-05T20:20:30Z</dc:date>
    </item>
    <item>
      <title>Re: ilogic Log , get code Line?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-log-get-code-line/m-p/9009041#M71838</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/537534"&gt;@MjDeck&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&lt;SPAN style="font-family: inherit;"&gt;... in a future version.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;ok, well when I was looking at the iLogic Log tools, and it seemed so obvious to me that grabbing the code line would provide some extremely helpful ability, that I thought maybe I was just missing something...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;but yes if we could get the line of code that causes an error in the error message, it would be helpful too.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thanks for the reply!&lt;/P&gt;</description>
      <pubDate>Thu, 05 Sep 2019 20:37:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-log-get-code-line/m-p/9009041#M71838</guid>
      <dc:creator>Curtis_W</dc:creator>
      <dc:date>2019-09-05T20:37:43Z</dc:date>
    </item>
    <item>
      <title>Re: ilogic Log , get code Line?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-log-get-code-line/m-p/10385335#M71839</link>
      <description>HI MjDeck,&lt;BR /&gt;Do we have update on this?&lt;BR /&gt;Thank you.</description>
      <pubDate>Sat, 12 Jun 2021 17:25:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-log-get-code-line/m-p/10385335#M71839</guid>
      <dc:creator>floccipier</dc:creator>
      <dc:date>2021-06-12T17:25:29Z</dc:date>
    </item>
    <item>
      <title>Re: ilogic Log , get code Line?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-log-get-code-line/m-p/10385337#M71840</link>
      <description>Thanks for this tip.</description>
      <pubDate>Sat, 12 Jun 2021 17:25:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-log-get-code-line/m-p/10385337#M71840</guid>
      <dc:creator>floccipier</dc:creator>
      <dc:date>2021-06-12T17:25:54Z</dc:date>
    </item>
    <item>
      <title>Re: ilogic Log , get code Line?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-log-get-code-line/m-p/10385523#M71841</link>
      <description>&lt;P&gt;if you want to write the line number to the logger. you can create a function that will give you the line number. You would get something like this:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN style="color: #ff0000;"&gt;Sub&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;Main&lt;/SPAN&gt;()
    &lt;SPAN style="color: #808080;"&gt;' your rule code here &lt;/SPAN&gt;
    &lt;SPAN style="color: #800080;"&gt;Logger&lt;/SPAN&gt;.&lt;SPAN style="color: #800080;"&gt;Info&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;LineNumber&lt;/SPAN&gt;() &amp;amp; &lt;SPAN style="color: #008080;"&gt;": Foo"&lt;/SPAN&gt;)
    &lt;SPAN style="color: #808080;"&gt;' and more rule code here&lt;/SPAN&gt;
&lt;SPAN style="color: #ff0000;"&gt;End&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;Sub&lt;/SPAN&gt;

&lt;SPAN style="color: #ff0000;"&gt;Private&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;Shared&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;Function&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;LineNumber&lt;/SPAN&gt;(&amp;lt;&lt;SPAN style="color: #800000;"&gt;Runtime&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;CompilerServices&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;CallerLineNumber&lt;/SPAN&gt;&amp;gt; &lt;SPAN style="color: #ff0000;"&gt;ByVal&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;Optional&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;lineNumberCaller&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;Integer&lt;/SPAN&gt; = 0) &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;String&lt;/SPAN&gt;
        &lt;SPAN style="color: #808080;"&gt;' the number 2 here is the difference between the line number &lt;/SPAN&gt;
	&lt;SPAN style="color: #808080;"&gt;' in your rule and the code that is actual run. You might need&lt;/SPAN&gt;
	&lt;SPAN style="color: #808080;"&gt;' to tweak this number in your inventor version&lt;/SPAN&gt;
	&lt;SPAN style="color: #ff0000;"&gt;Return&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;lineNumberCaller&lt;/SPAN&gt; - 2
&lt;SPAN style="color: #ff0000;"&gt;End&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;Function&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 12 Jun 2021 20:21:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-log-get-code-line/m-p/10385523#M71841</guid>
      <dc:creator>JelteDeJong</dc:creator>
      <dc:date>2021-06-12T20:21:40Z</dc:date>
    </item>
    <item>
      <title>Re: ilogic Log , get code Line?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-log-get-code-line/m-p/10385565#M71842</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5011186"&gt;@JelteDeJong&lt;/a&gt;&amp;nbsp;, that is useful.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/782848"&gt;@floccipier&lt;/a&gt;&amp;nbsp;, there is no progress yet on the ability to show the line number in the error message. This is internal issue number INVGEN-53774.&lt;BR /&gt;&lt;BR /&gt;If you have Visual Studio, you can &lt;A href="https://modthemachine.typepad.com/my_weblog/2019/12/using-visual-studio-to-debug-ilogic-rules.html" target="_blank" rel="noopener"&gt;debug iLogic rules&lt;/A&gt;.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 12 Jun 2021 20:59:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-log-get-code-line/m-p/10385565#M71842</guid>
      <dc:creator>MjDeck</dc:creator>
      <dc:date>2021-06-12T20:59:36Z</dc:date>
    </item>
    <item>
      <title>Re: ilogic Log , get code Line?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-log-get-code-line/m-p/10387303#M71843</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/537534"&gt;@MjDeck&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using VS to debug the code and I must say it is impressive.&lt;/P&gt;</description>
      <pubDate>Sun, 13 Jun 2021 22:20:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-log-get-code-line/m-p/10387303#M71843</guid>
      <dc:creator>floccipier</dc:creator>
      <dc:date>2021-06-13T22:20:56Z</dc:date>
    </item>
    <item>
      <title>Re: ilogic Log , get code Line?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-log-get-code-line/m-p/10809877#M71844</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/105031"&gt;@Curtis_W&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/782848"&gt;@floccipier&lt;/a&gt;&amp;nbsp;, and&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5011186"&gt;@JelteDeJong&lt;/a&gt;&amp;nbsp;: Inventor 2022.2 will show the line number in error messages.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Dec 2021 19:34:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-log-get-code-line/m-p/10809877#M71844</guid>
      <dc:creator>MjDeck</dc:creator>
      <dc:date>2021-12-08T19:34:06Z</dc:date>
    </item>
  </channel>
</rss>

