Message 1 of 14
Ilogic Trigger - New Document
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I have created a simple external rule to set the active Material library to a custom library of my company. This rule runs great from the iLogic browser. But when I set it to run as an event trigger for "New Document", the library wont change on the 1st New document event per inventor session. Every subsequent "New document" event, the rule runs. I'm at a loss. Here is the code block:
Sub Main() ' This section sets the active material library to custom library Dim oHMaterialLibrary As AssetLibrary oHMaterialLibrary = ThisApplication.AssetLibraries.Item("Autodesk Material Library") ThisApplication.ActiveMaterialLibrary() = oHMaterialLibrary End Sub
After debugging with a message box, I noticed the material updates on the first documents. So maybe there is an issue with timing? Does anyone have a tip?
running Inventor 2020.2