Hello,
So I used an Event trigger "after document opens" to open a form that will enact changes to an assembly.
However, I noticed that the trigger happens before all parts in the assembly even load. Since the form will make changes to the parts and they are not there, the form won't work correctly. A form that is making changes to a parts that are not there is not too useful.
On my first attempt, the opening of the form would stop everything from loading so you would have to close the form in order for to work properly. Then I realized I could use the iLogicForm.Show(" ", FormMode.NonModal) so operations can still occur in the background. So now the user would basically have to figure out that they should wait for everything to load before they start clicking on options. I am using large assemblies so I can imagine this happening often. This seems dangerously prone to error.
I also added a pop-up message for this trigger but the pop-up message is just to inform the user. However, the pop-up stops the file from loading so it is a waste of computational time when the designer is just reading the message. I do not see a Non.Modal version for pop-ups so it seems that I cannot allow parts to load when a simple ok message pop ups.
I can not see how this Event trigger "after document opens"can be used in a responsible manner and can be practical. Has anyone else notice this issue or have any ideas?
-Thank you
Solved! Go to Solution.
Hello Aj,
There will be many OpenDocument events triggered when you open the assembly and also for its referenced components.
Its not so easy and not recommended directly to use OpenDocument
I think you have to use OnActivateDocument once the OpenDocument is complete.
Steps which i followed to load a form after loading a Assembly:
There will be Before & After events for OpenDocument and OnActivateDocument, you need to monitor only the After Events
To understand more on events there is a sample application which is shipped with Inventor called "Event Watcher".
Use that application for understanding on Inventor events.
Hope this helps....
http://forums.autodesk.com/t5/user/viewprofilepage/user-id/82872