> For the complete documentation index, see [llms.txt](https://help.besmart.software/older-26.0.0/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.besmart.software/older-26.0.0/commands-overview/holixa-t4i/edit-settings/ilogic.md).

# iLogic

This tool allows configuring iLogic rules that will be executed when some application events happen.

<figure><img src="/files/4FuYbm497VPXnOa7hLQX" alt=""><figcaption><p>iLogic settings</p></figcaption></figure>

Sections 1 to 5 allow users to pair the application events and iLogic rules that should be executed on the application events. The iLogic rules can be of the following two types:

* full path to an external ilogic rule,
* name of the iLogic rule imported to an external rules list.

Samples of rules that can handle those application events are available in the installation path of T4I:

* `c:\ProgramData\Autodesk\ApplicationPlugins\Holixa.Tools4Inventor.bundle\Samples\iLogic`

The sample rules have the following naming scheme:

* `HolixaT4I_AutoRule_<NameOfEvent>.iLogicVb`

## Event Enhancement

With these event handlers, you can use additional information to 'enhance' the default (built-in) iLogic event handlers. Below are the code samples showing what information is available and links to Autodesk Inventor API reference for more information.

### AfterNew

```vbnet
Dim TemplateFileName As String = RuleArguments("TemplateFileName")
Dim NewFileName As String = RuleArguments("NewFileName")
```

For more information, see the [ApplicationEvents.OnNewDocument Event](https://help.autodesk.com/view/INVNTOR/2023/ENU/?guid=GUID-F42EE4DF-0479-433B-8760-DEC5A6F802C2) web page.

### AfterOpen

```vbnet
Dim FullDocumentName As String = RuleArguments("FullDocumentName")
Dim TopLevelFilename As String = RuleArguments("TopLevelFilename")
```

For more information, see the [ApplicationEvents.OnOpenDocument Event](https://help.autodesk.com/view/INVNTOR/2023/ENU/?guid=GUID-5BC3333D-2E8C-4670-B4E6-D1491FA9CB05) web page.
