<?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 - Need to get ThisDoc.Document throught the API in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-need-to-get-thisdoc-document-throught-the-api/m-p/6556941#M66736</link>
    <description>&lt;P&gt;Thanks for the reply Justin, but this solution doesn't quite work for me. I have a routine (written with the API as a dll) that is run from the main assembly. This routine will call iLogic rules from every part and subassembly, and those rules may call other rules and so on. Unfortunatelly, Active document always points to the main assembly, and&amp;nbsp;&lt;SPAN&gt;ActivatedObject/ActiveEditDocument only works if edits are&amp;nbsp;happening. Often times, It will run a rule in a part that only reads data, thus can't use either of those members for my application. For the time being I keep track of ThisDoc by carefully maintaining a global variable within my code. What I am doing is working just fine, but it's very difficult to keep everything straight in my head. Getting iLogic's ThisDoc member would be ideal for me.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 12 Sep 2016 14:21:27 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2016-09-12T14:21:27Z</dc:date>
    <item>
      <title>iLogic - Need to get ThisDoc.Document throught the API</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-need-to-get-thisdoc-document-throught-the-api/m-p/6553607#M66711</link>
      <description>&lt;P&gt;Hi All,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I wrote my own RunRule for iLogic through the Inventor API (I have my reasons), and I am having a hell of a time keeping track of the document in which the rule is currently running in. Looking through the ilogic API there is an Interface called&amp;nbsp;&lt;SPAN&gt;Autodesk.i&lt;/SPAN&gt;&lt;SPAN&gt;Logic.Inte&lt;/SPAN&gt;&lt;SPAN&gt;rfaces.ICa&lt;/SPAN&gt;&lt;SPAN&gt;dDoc which has the member Document (exactly what I need), but I can't figure out how I can get this object through the API to save my life. Any help would be highly appreciated. Answers in any (Computer) language are welcome.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Nik&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2016 19:44:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-need-to-get-thisdoc-document-throught-the-api/m-p/6553607#M66711</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-09-09T19:44:25Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic - Need to get ThisDoc.Document throught the API</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-need-to-get-thisdoc-document-throught-the-api/m-p/6556888#M66735</link>
      <description>&lt;P&gt;I often use&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Dim oDoc As Document&lt;/P&gt;
&lt;P&gt;oDoc = ThisApplication.ActiveDocument&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you will be running a rule in a part that's activated from within an assembly file, you should also perform a check on the ActivatedObject/ActiveEditDocument to ensure that the rule is pulling the PART as the oDoc, since calling ActiveDocument will grab the ASSEMBLY.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Sep 2016 14:03:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-need-to-get-thisdoc-document-throught-the-api/m-p/6556888#M66735</guid>
      <dc:creator>MechMachineMan</dc:creator>
      <dc:date>2016-09-12T14:03:51Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic - Need to get ThisDoc.Document throught the API</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-need-to-get-thisdoc-document-throught-the-api/m-p/6556941#M66736</link>
      <description>&lt;P&gt;Thanks for the reply Justin, but this solution doesn't quite work for me. I have a routine (written with the API as a dll) that is run from the main assembly. This routine will call iLogic rules from every part and subassembly, and those rules may call other rules and so on. Unfortunatelly, Active document always points to the main assembly, and&amp;nbsp;&lt;SPAN&gt;ActivatedObject/ActiveEditDocument only works if edits are&amp;nbsp;happening. Often times, It will run a rule in a part that only reads data, thus can't use either of those members for my application. For the time being I keep track of ThisDoc by carefully maintaining a global variable within my code. What I am doing is working just fine, but it's very difficult to keep everything straight in my head. Getting iLogic's ThisDoc member would be ideal for me.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Sep 2016 14:21:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-need-to-get-thisdoc-document-throught-the-api/m-p/6556941#M66736</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-09-12T14:21:27Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic - Need to get ThisDoc.Document throught the API</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-need-to-get-thisdoc-document-throught-the-api/m-p/9683069#M114394</link>
      <description>&lt;P&gt;Did you ever find a solution to your problem?&lt;/P&gt;</description>
      <pubDate>Mon, 10 Aug 2020 16:52:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-need-to-get-thisdoc-document-throught-the-api/m-p/9683069#M114394</guid>
      <dc:creator>shiftctrl.io</dc:creator>
      <dc:date>2020-08-10T16:52:37Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic - Need to get ThisDoc.Document throught the API</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-need-to-get-thisdoc-document-throught-the-api/m-p/9683255#M114397</link>
      <description>&lt;P&gt;Unfortunately no.&amp;nbsp; I ended up writing code that keep track of my version of ThisDoc. Not saying it's not possible, but I wasn't able to find anything I could use from the API.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It was a bit confusing to do, but it's now been working flawlessly for years. Good luck!&lt;/P&gt;</description>
      <pubDate>Mon, 10 Aug 2020 18:05:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-need-to-get-thisdoc-document-throught-the-api/m-p/9683255#M114397</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-08-10T18:05:22Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic - Need to get ThisDoc.Document throught the API</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-need-to-get-thisdoc-document-throught-the-api/m-p/9683383#M114402</link>
      <description>&lt;P&gt;I imported the Autodesk.ilogic.Interfaces&amp;nbsp; DLL as a reference in Visual Studio and am able to get the ICadDoc interface but not sure how to initialize a document to be the equivalent of "ThisDoc"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;At any rate thanks for the quick response.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If anyone else has had any luck with this - a solution would be appreciated.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Aug 2020 18:58:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-need-to-get-thisdoc-document-throught-the-api/m-p/9683383#M114402</guid>
      <dc:creator>shiftctrl.io</dc:creator>
      <dc:date>2020-08-10T18:58:38Z</dc:date>
    </item>
  </channel>
</rss>

