Mejoras de iLogic

Obtenga más información sobre las nuevas mejoras de iLogic en esta versión de Inventor.

Compatibilidad de iLogic con el evento Antes de aplicar check-in a Vault

Se ha añadido un nuevo evento denominado Antes de aplicar check-in a Vault al cuadro de diálogo "Activadores de evento". Esto permite realizar una comprobación final de los archivos antes de enviarlos a Vault.

Puede escribir una regla que realiza una comprobación y establece un indicador específico para cancelar el proceso de check-in. Si se aplica check-in a un grupo de archivos juntos, como archivos padre o hijo, y se cancela uno de ellos, no se aplicará check-in a ningún archivo. A continuación, se muestra un código de ejemplo para su referencia:

    Dim checkIn = RuleArguments.VaultCheckIn
        If checkIn.InProgress Then
            If String.IsNullOrEmpty(iProperties.Value("Project", "Stock Number")) Then
                        checkIn.Cancel = True
                        checkIn.ReasonsForCancel.Add("The Stock Number iProperty is empty.")
            End If
        End If
\```

If a rule that runs on an event throws an error, the check-in is cancelled, and you must fix the error before proceeding with the check-in. If there is a failure in a parent file (for example, an assembly), the check-in for the child files (such as parts) is also cancelled, and vice versa. If an external rule is attached to the event and that external rule is not found when the check-in occurs, then the check-in will be cancelled. An error in a single file cancels the entire check-in operation.

A rule executing on this event must treat the file as read-only. Once saved, the file is prepared for check-in. While the rule can verify values, it cannot modify them.



<!--MD
<div class="card-thumbnail">
MD-->


![Markdown card metadata](../../../../../images/wn2025_ilogic_vault_check_in.png)



<!--MD
</div>
MD-->


For more information, see [To Work with Event Triggers in iLogic](topicid=GUID-B14A47F4-81D2-4627-A973-2BC7F790DF89).

![](../../../../../images/inv_ideas_icon_TX-35x35.png) [**An Inventor® Ideas submission**](https://forums.autodesk.com/t5/inventor-ideas/ilogic-events-trigger-before-check-in/idi-p/5701514)

![](../../../../../images/inv_ideas_icon_TX-35x35.png) [**An Inventor® Ideas submission**](https://forums.autodesk.com/t5/inventor-ideas/check-in-as-an-event-trigger-for-ilogic-rules/idc-p/11268532#M45738)

## iLogic Support for Control of the Edit Scope with Model States

Use the snippets to control editing for Model States.

![](../../../../../images/wn2025_ilogic_model_states_scope.png)

![](../../../../../images/inv_ideas_icon_TX-35x35.png) [**An Inventor® Ideas submission**](https://forums.autodesk.com/t5/inventor-ideas/provide-the-ability-to-edit-multiple-model-states/idi-p/11140182)

![](../../../../../images/inv_ideas_icon_TX-35x35.png) [**An Inventor® Ideas submission**](https://forums.autodesk.com/t5/inventor-ideas/ilogic-api-get-document-of-each-model-state-without-activation/idi-p/10343165)

## Ability to Choose Image Files for Ribbon Buttons

In the "Options" tab of the Rule editor (for an external rule), the current icons are displayed. Clicking on the folder button will open a file dialog where you can select another bitmap file from any folder. The file you select will be copied to the same folder as the rule, with the name changed to follow the naming convention. The recommended resolution for the image (in pixels) is 16x16 for small and 32x32 for large. However, other sizes will be automatically scaled.

![](../../../../../images/wn2025_ilogic_select_icons.png)

## Enable iLogic security scanning of rules by default

The "Inspect rules for malicious code" option is now checked by default after the installation. This option can be accessed from either of the following:

- Event Triggers dialog > Options
- Tools tab > iLogic > iLogic Configuration > Security Options

![](../../../../../images/wn2025_ilogic_inspect_rules.png)

## Technology Enhancements

The latest version of the syntax editor for editing rules is now available, along with the latest version of .NET used to compile rules.