<?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: how will the vb code look like if I wanted til use before save trigger in an exe program ? in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-will-the-vb-code-look-like-if-i-wanted-til-use-before-save/m-p/11701517#M148205</link>
    <description>&lt;P&gt;You can use handlers to let your code respond to events in Inventor.&lt;/P&gt;&lt;P&gt;I use this for application events in my visual studio project:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Public Class ApplicationEvents&lt;BR /&gt;Implements Inventor.ApplicationAddInServer&lt;BR /&gt;Private AppEvents As Inventor.ApplicationEvents&lt;/P&gt;&lt;P&gt;Public InventorApp As Inventor.Application&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Public Sub Activate(siteObj As Inventor.ApplicationAddInSite, loaded1stTime As Boolean) Implements ApplicationAddInServer.Activate&lt;/P&gt;&lt;P&gt;InventorApp =&amp;nbsp;siteObj.Application&lt;/P&gt;&lt;P&gt;AppEvents = InventorApp.ApplicationEvents&lt;/P&gt;&lt;P&gt;AddHandler AppEvents.OnActivateDocument, AddressOf oAppEvents_OnActivateDocument&lt;/P&gt;&lt;P&gt;End Sub&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Private Sub oAppEvents_OnActivateDocument(ByVal DocumentObject As Inventor._Document, ByVal BeforeOrAfter As Inventor.EventTimingEnum, ByVal Context As Inventor.NameValueMap, ByRef HandlingCode As Inventor.HandlingCodeEnum) 'Handles oAppEvents.OnActivateDocument&lt;BR /&gt;If BeforeOrAfter = EventTimingEnum.kBefore Then&lt;BR /&gt;'your code here&lt;BR /&gt;End If&lt;BR /&gt;End Sub&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Public Sub Deactivate() Implements ApplicationAddInServer.Deactivate&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If InventorApp IsNot Nothing Then&lt;BR /&gt;Marshal.FinalReleaseComObject(InventorApp)&lt;BR /&gt;End If&lt;/P&gt;&lt;P&gt;End Sub&lt;/P&gt;</description>
    <pubDate>Tue, 24 Jan 2023 12:08:40 GMT</pubDate>
    <dc:creator>Cadkunde.nl</dc:creator>
    <dc:date>2023-01-24T12:08:40Z</dc:date>
    <item>
      <title>how will the vb code look like if I wanted til use before save trigger in an exe program ?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-will-the-vb-code-look-like-if-i-wanted-til-use-before-save/m-p/11701473#M148203</link>
      <description>&lt;P&gt;how will the vb code look like if I wanted til use before save trigger in an exe program ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to create a program that run some ilogic code by start an exe file...that run. while I use inventor&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I dont want to use that inventor build in version.&amp;nbsp; because I wanted to a more complex control of with ilogic that might be run. Maybe as a group of users or as each user level... or maybe multi profile that the users can easily change betwine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but to start with I just need to know how to use the trigger form the exe program&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jan 2023 11:44:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-will-the-vb-code-look-like-if-i-wanted-til-use-before-save/m-p/11701473#M148203</guid>
      <dc:creator>Darkforce_the_ilogic_guy</dc:creator>
      <dc:date>2023-01-24T11:44:33Z</dc:date>
    </item>
    <item>
      <title>Re: how will the vb code look like if I wanted til use before save trigger in an exe program ?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-will-the-vb-code-look-like-if-i-wanted-til-use-before-save/m-p/11701517#M148205</link>
      <description>&lt;P&gt;You can use handlers to let your code respond to events in Inventor.&lt;/P&gt;&lt;P&gt;I use this for application events in my visual studio project:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Public Class ApplicationEvents&lt;BR /&gt;Implements Inventor.ApplicationAddInServer&lt;BR /&gt;Private AppEvents As Inventor.ApplicationEvents&lt;/P&gt;&lt;P&gt;Public InventorApp As Inventor.Application&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Public Sub Activate(siteObj As Inventor.ApplicationAddInSite, loaded1stTime As Boolean) Implements ApplicationAddInServer.Activate&lt;/P&gt;&lt;P&gt;InventorApp =&amp;nbsp;siteObj.Application&lt;/P&gt;&lt;P&gt;AppEvents = InventorApp.ApplicationEvents&lt;/P&gt;&lt;P&gt;AddHandler AppEvents.OnActivateDocument, AddressOf oAppEvents_OnActivateDocument&lt;/P&gt;&lt;P&gt;End Sub&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Private Sub oAppEvents_OnActivateDocument(ByVal DocumentObject As Inventor._Document, ByVal BeforeOrAfter As Inventor.EventTimingEnum, ByVal Context As Inventor.NameValueMap, ByRef HandlingCode As Inventor.HandlingCodeEnum) 'Handles oAppEvents.OnActivateDocument&lt;BR /&gt;If BeforeOrAfter = EventTimingEnum.kBefore Then&lt;BR /&gt;'your code here&lt;BR /&gt;End If&lt;BR /&gt;End Sub&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Public Sub Deactivate() Implements ApplicationAddInServer.Deactivate&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If InventorApp IsNot Nothing Then&lt;BR /&gt;Marshal.FinalReleaseComObject(InventorApp)&lt;BR /&gt;End If&lt;/P&gt;&lt;P&gt;End Sub&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jan 2023 12:08:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-will-the-vb-code-look-like-if-i-wanted-til-use-before-save/m-p/11701517#M148205</guid>
      <dc:creator>Cadkunde.nl</dc:creator>
      <dc:date>2023-01-24T12:08:40Z</dc:date>
    </item>
  </channel>
</rss>

