Announcements

The Autodesk Community Forums has a new look. Read more about what's changed on the Community Announcements board.

Community
cancel
Showing results forĀ 
ShowĀ Ā onlyĀ  | Search instead forĀ 
Did you mean:Ā 

iLogic Events Trigger - Before Check in

iLogic Events Trigger - Before Check in

I would love to have an iLogic trigger that would fire when a user tried to check in a file to Vault.

 

Rules Triggered by Events_2015-07-01_09-08-25.jpg

 

If I had this trigger event then I can write code so that the user can do a final check over before the file is submitted to vault. If the user find a mistake then the code can cancel the check in and the user can fix it.

13 Comments
I was also looking to use that, in particular to avoid users from checking in files with the wrong value under a custom iProperty that defines the file Lifecycle in Vault. Some users cannot see certain Lifecycle files and when they check those files in with the wrong identifier, the files become invisible to them.
Anonymous
Not applicable

I've read a lot of comments when searching on this subject to just use  the "before save" trigger. But anyone who uses Inventor knows that you should be saving your work much more often that when you just check it in! As Galaxybane and douthett point out, there a many reasons to only run the iLogic code at check in. There is already a type of hard coded "before check in" taking place in the background to see if the file has been modified since the last save. Seems like there could be an iLogic trigger action thrown in there too.

Anonymous
Not applicable

For anyone else looking for a way to trigger iLogic rules at Check in, I found a simple macro that will call an iLogic rule. I then created a custom user button on the ribbon called "CheckInDwg" that when clicked, runs the macro that then runs my iLogic rule. I make the last command in my iLogic rule: 

ThisApplication.CommandManager.ControlDefinitions.Item("VaultCheckinTop").Execute2(False)

This will open the Check in dialog box after the iLogic code has run. I did this for drawings, but you can do the same thing for .ipt and .iam files. 

 

I used the below VBA Macro. Just change the name of your macro in the first line (your ribbon button will need to use this same name) and the iLogic rule you want to call in the "INTERNALrule =" or "EXTERNALrule =" lines. At the bottom of the code, comment out the line for internal or external rule that you are not going to use. In this case I'm using an external rule, so I commented out the internal rule line. The second line of the code is a link to where I found this macro. Follow that link to get more info and to see how to create the button on the ribbon.

 

Public Sub CheckInDwg()
'From https://www.cadlinecommunity.co.uk/hc/en-us/articles/115000859309
Dim addIn As ApplicationAddIn
Dim addIns As ApplicationAddIns
Set addIns = ThisApplication.ApplicationAddIns
For Each addIn In addIns
If InStr(addIn.DisplayName, "iLogic") > 0 Then
addIn.Activate
Dim iLogicAuto As Object
Set iLogicAuto = addIn.Automation
Exit For
End If
Next
Debug.Print addIn.DisplayName

Dim RuleName1 As String
EXTERNALrule = "\\Server\Folder\iLogic\iLogicRuleName"

Dim RuleName2 As String
INTERNALrule = "Rule0"

Dim oDoc As Document

Set oDoc = ThisApplication.ActiveDocument
If oDoc Is Nothing Then
MsgBox "Missing Inventor Document"
Exit Sub
End If

'iLogicAuto.RunRule oDoc, INTERNALrule 'for internal rule
iLogicAuto.RunExternalRule oDoc, EXTERNALrule 'for external rule

End Sub

Bram_Baars
Enthusiast

I totally agree with @douthett . We use iLogic for iProperty validation, and the most important moment to check that would be before checkin.

Now I have to bug my colleagues with MessageBoxes everytime they save (if they have invalid iProperty values).

 

The macro by @Anonymous is a good workaround, but then I have to distribute and assign a macro and button to my users, and teach them to use that button instead of regular checkin.

 

(Double with this idea on Ideastation)

Yijiang.Cai
Autodesk
Status changed to: Under Review

Many thanks for posting the idea, and tracked as [INVGEN-59953].

MjDeck
Autodesk

For iProperty validation, you can use Vault Data Standard.

Bram_Baars
Enthusiast

Thanks, we have DataStandard active in Vault Professional, but not yet in Inventor. I'll look into that!

Yijiang.Cai
Autodesk

@Bram_Baars, does VDS in Inventor work for you? Besides iProperty validation, is there any other scenario that requests to have the check before Vault file check-in? Many thanks!

Bram_Baars
Enthusiast

Hi @Yijiang.Cai,

We have not implemented it in Inventor yet, other priorities... First I will try to get it implemented and test with it.

And then I have to find out if and how its possible to make some more difficult validation checks (that we currently have in iLogic) through DataStandard: eg. When a property value is from a rawmaterial list, then property LENGTH may not be empty.

glenland77
Contributor

@Yijiang.Cai 

I'd also like to have the before check-in trigger added. One thing I'd use to do (that I didn't see mentioned above) is to ensure that all of the styles in the document are updated to match the style library in design data. We do a lot of sheet metal design, and as we implement new tools / equipment and that need different bend radii & kFactors we'd want to make sure that any part gets updated to the latest standard before we check it into the vault as part of our release process.

Bram_Baars
Enthusiast

In another (duplicate?) thread this initial idea is mentioned as "Implemented in Inventor 2024".

https://forums.autodesk.com/t5/inventor-ideas/check-in-as-an-event-trigger-for-ilogic-rules/idc-p/12...

dan_szymanski
Autodesk
Status changed to: Accepted

Accepted idea [INVGEN-59953]. Thanks!

Yijiang.Cai
Autodesk
Status changed to: Implemented

This idea has been implemented within Autodesk Inventor 2025. Please review the Inventor 2025 What's New article here. For more information regarding how you may leverage the feature, and please review this page. Special thanks to everyone who cast a vote for it.

Can't find what you're looking for? Ask the community or share your knowledge.

Submit Idea  

Autodesk Design & Make Report