> For the complete documentation index, see [llms.txt](https://help.besmart.software/t4i/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/t4i/commands-overview/be.smart-t4i/edit-settings/ilogic.md).

# iLogic

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

<figure><img src="https://4060565498-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FL8qMZuBhZUXGRVospdct%2Fuploads%2FDwP8eROsu2ygEM7ZEhMN%2Fimage.png?alt=media&amp;token=cb41ad43-2558-4d42-afe5-8f3d5be7076a" alt=""><figcaption></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.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.besmart.software/t4i/commands-overview/be.smart-t4i/edit-settings/ilogic.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
